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

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaudenz Alder <gaudenz@jgraph.com>2019-11-28 11:15:54 +0300
committerGaudenz Alder <gaudenz@jgraph.com>2019-11-28 11:15:54 +0300
commitda2260b845bbfb27abdfe8d802c7843a3bd6e621 (patch)
treebe6544b548cd14fe6ab68bc7106e064274118549
parente65db58a196a9ac31e92dcf2109eb023bfce0067 (diff)
12.3.3 releasev12.3.3
-rw-r--r--ChangeLog4
-rw-r--r--VERSION2
-rw-r--r--src/main/webapp/cache.manifest2
-rw-r--r--src/main/webapp/js/app.min.js1856
-rw-r--r--src/main/webapp/js/diagramly/App.js178
-rw-r--r--src/main/webapp/js/diagramly/DrawioClient.js45
-rw-r--r--src/main/webapp/js/diagramly/EditorUi.js108
-rw-r--r--src/main/webapp/js/diagramly/Init.js7
-rw-r--r--src/main/webapp/js/diagramly/Menus.js14
-rw-r--r--src/main/webapp/js/diagramly/Pages.js31
-rw-r--r--src/main/webapp/js/diagramly/sidebar/Sidebar-ER.js130
-rw-r--r--src/main/webapp/js/mxgraph/Actions.js12
-rw-r--r--src/main/webapp/js/mxgraph/Editor.js13
-rw-r--r--src/main/webapp/js/mxgraph/EditorUi.js15
-rw-r--r--src/main/webapp/js/mxgraph/Shapes.js22
-rw-r--r--src/main/webapp/js/viewer.min.js2399
-rw-r--r--src/main/webapp/plugins/update.js2
-rw-r--r--src/main/webapp/resources/dia_ca.txt156
-rw-r--r--src/main/webapp/resources/dia_zh.txt2
19 files changed, 2599 insertions, 2399 deletions
diff --git a/ChangeLog b/ChangeLog
index 771b6ae5..8577da43 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+28-NOV-2019: 12.3.3
+
+- Adds more ERD shapes
+
27-NOV-2019: 12.3.2
- Fixes moving and resizing on iOS 13
diff --git a/VERSION b/VERSION
index 67b9cc92..10d05699 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-12.3.2 \ No newline at end of file
+12.3.3 \ No newline at end of file
diff --git a/src/main/webapp/cache.manifest b/src/main/webapp/cache.manifest
index 69fb13be..ac0ea7eb 100644
--- a/src/main/webapp/cache.manifest
+++ b/src/main/webapp/cache.manifest
@@ -1,7 +1,7 @@
CACHE MANIFEST
# THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 11/27/2019 10:56 AM
+# 11/28/2019 09:05 AM
app.html
index.html?offline=1
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index 06d28b76..d12a461f 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -131,9 +131,10 @@ d[k>>>24]^e[n>>>16&255]^j[g>>>8&255]^l[h&255]^c[p++],n=d[n>>>24]^e[g>>>16&255]^j
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a,b){var c="",d,e,f,g,k,l,m=0;for(null!=b&&b||(a=Base64._utf8_encode(a));m<a.length;)d=a.charCodeAt(m++),e=a.charCodeAt(m++),f=a.charCodeAt(m++),g=d>>2,d=(d&3)<<4|e>>4,k=(e&15)<<2|f>>6,l=f&63,isNaN(e)?k=l=64:isNaN(f)&&(l=64),c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return c},decode:function(a,b){b=null!=b?b:!1;var c="",d,e,f,g,k,l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,
"");l<a.length;)d=this._keyStr.indexOf(a.charAt(l++)),e=this._keyStr.indexOf(a.charAt(l++)),g=this._keyStr.indexOf(a.charAt(l++)),k=this._keyStr.indexOf(a.charAt(l++)),d=d<<2|e>>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|k,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=k&&(c+=String.fromCharCode(f));b||(c=Base64._utf8_decode(c));return c},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):(127<d&&2048>d?b+=
String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){var b="",c=0,d;for(c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.mxLoadSettings=window.mxLoadSettings||"1"!=urlParams.configure;window.isSvgBrowser=window.isSvgBrowser||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";window.PLANT_URL=window.PLANT_URL||"https://exp-plant.draw.io/plantuml4";window.DRAW_MATH_URL=window.DRAW_MATH_URL||"https://www.draw.io/math";
-window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.draw.io/VsdConverter/api/converter";window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"https://convert.draw.io/emf2png/convertEMF";window.DRAWIO_GITLAB_URL=window.DRAWIO_GITLAB_URL||"https://gitlab.com";window.DRAWIO_GITLAB_ID=window.DRAWIO_GITLAB_ID||"5cdc018a32acddf6eba37592d9374945241e644b8368af847422d74c8709bc44";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"open";window.PROXY_URL=window.PROXY_URL||"proxy";
-window.VIEWER_URL=null;window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":"https://www.draw.io/iconSearch");window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";
-window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||function(){var a="1"==urlParams.offline?"en":urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}();
+window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.draw.io/VsdConverter/api/converter";window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"https://convert.draw.io/emf2png/convertEMF";window.REALTIME_URL=window.REALTIME_URL||"https://rt.draw.io/cache";window.DRAWIO_GITLAB_URL=window.DRAWIO_GITLAB_URL||"https://gitlab.com";window.DRAWIO_GITLAB_ID=window.DRAWIO_GITLAB_ID||"5cdc018a32acddf6eba37592d9374945241e644b8368af847422d74c8709bc44";window.SAVE_URL=window.SAVE_URL||"save";
+window.OPEN_URL=window.OPEN_URL||"open";window.PROXY_URL=window.PROXY_URL||"proxy";window.VIEWER_URL=null;window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":"https://www.draw.io/iconSearch");window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";
+window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1;
+window.mxLanguage=window.mxLanguage||function(){var a="1"==urlParams.offline?"en":urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}();
window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Bahasa Melayu",bs:"Bosanski",bg:"Bulgarian",ca:"Català",cs:"Čeština",da:"Dansk",de:"Deutsch",et:"Eesti",en:"English",es:"Español",fil:"Filipino",fr:"Français",it:"Italiano",hu:"Magyar",nl:"Nederlands",no:"Norsk",pl:"Polski","pt-br":"Português (Brasil)",pt:"Português (Portugal)",ro:"Română",fi:"Suomi",sv:"Svenska",vi:"Tiếng Việt",tr:"Türkçe",el:"Ελληνικά",ru:"Русский",sr:"Српски",uk:"Українська",he:"עברית",ar:"العربية",th:"ไทย",
ko:"한국어",ja:"日本語",zh:"简体中文","zh-tw":"繁體中文"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph");if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMap)"en"!=lang&&window.mxLanguages.push(lang)}
window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&"undefined"!==typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}try{null==a&&414>=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(a="min")}catch(c){}return a}();function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
@@ -2062,11 +2063,12 @@ c.addListener(mxEvent.UNDO,d);c.addListener(mxEvent.REDO,d);return c};Editor.pro
OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
function Dialog(a,c,d,b,f,e,h,g,k,l,m){var n=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(n=80);d+=n;b+=n;var p=d,q=b,v=mxUtils.getDocumentSize(),t=v.height,u=Math.max(1,Math.round((v.width-d-64)/2)),w=Math.max(1,Math.round((t-b-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");d=null!=document.body?Math.min(d,document.body.scrollWidth-64):d;b=Math.min(b,t-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),
this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=t+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));v=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=v.x+"px";this.bg.style.top=v.y+"px";u+=v.x;w+=v.y;f&&document.body.appendChild(this.bg);var r=a.createDiv(k?"geTransDialog":"geDialog");f=this.getPosition(u,w,d,b);u=f.x;w=f.y;r.style.width=
-d+"px";r.style.height=b+"px";r.style.left=u+"px";r.style.top=w+"px";r.style.zIndex=this.zIndex;r.appendChild(c);document.body.appendChild(r);!g&&c.clientHeight>r.clientHeight-64&&(c.style.overflowY="auto");e&&(e=document.createElement("img"),e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("close")),e.className="geDialogClose",e.style.top=w+14+"px",e.style.left=u+d+38-n+"px",e.style.zIndex=this.zIndex,mxEvent.addListener(e,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),
-document.body.appendChild(e),this.dialogImg=e,m||mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(b){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var e=l();null!=e&&(p=d=e.w,q=b=e.h)}e=mxUtils.getDocumentSize();t=e.height;this.bg.style.height=t+"px";u=Math.max(1,Math.round((e.width-d-64)/2));w=Math.max(1,Math.round((t-b-a.footerHeight)/3));d=null!=document.body?Math.min(p,document.body.scrollWidth-64):p;b=Math.min(q,t-64);e=this.getPosition(u,
-w,d,b);u=e.x;w=e.y;r.style.left=u+"px";r.style.top=w+"px";r.style.width=d+"px";r.style.height=b+"px";!g&&c.clientHeight>r.clientHeight-64&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=w+14+"px",this.dialogImg.style.left=u+d+38-n+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=h;this.container=r;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
-Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":
-IMAGE_PATH+"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
+d+"px";r.style.height=b+"px";r.style.left=u+"px";r.style.top=w+"px";r.style.zIndex=this.zIndex;r.appendChild(c);document.body.appendChild(r);!g&&c.clientHeight>r.clientHeight-64&&(c.style.overflowY="auto");if(e&&(e=document.createElement("img"),e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("close")),e.className="geDialogClose",e.style.top=w+14+"px",e.style.left=u+d+38-n+"px",e.style.zIndex=this.zIndex,mxEvent.addListener(e,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),
+document.body.appendChild(e),this.dialogImg=e,!m)){var x=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){x=!0}),null,mxUtils.bind(this,function(b){x&&(a.hideDialog(!0),x=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var e=l();null!=e&&(p=d=e.w,q=b=e.h)}e=mxUtils.getDocumentSize();t=e.height;this.bg.style.height=t+"px";u=Math.max(1,Math.round((e.width-d-64)/2));w=Math.max(1,Math.round((t-b-a.footerHeight)/3));d=null!=document.body?Math.min(p,document.body.scrollWidth-
+64):p;b=Math.min(q,t-64);e=this.getPosition(u,w,d,b);u=e.x;w=e.y;r.style.left=u+"px";r.style.top=w+"px";r.style.width=d+"px";r.style.height=b+"px";!g&&c.clientHeight>r.clientHeight-64&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=w+14+"px",this.dialogImg.style.left=u+d+38-n+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=h;this.container=r;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";
+Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
+Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
+"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
"/clear.gif";
Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCODExNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCODIxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3RjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI4MDE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvqMCFYAAAAVUExURZmZmb+/v7KysqysrMzMzLGxsf///4g8N1cAAAAHdFJOU////////wAaSwNGAAAAPElEQVR42lTMQQ4AIQgEwUa0//9kTQirOweYOgDqAMbZUr10AGlAwx4/BJ2QJ4U0L5brYjovvpv32xZgAHZaATFtMbu4AAAAAElFTkSuQmCC":IMAGE_PATH+
@@ -2097,9 +2099,9 @@ d.height==c.format.height?(g.value=c.key,e.setAttribute("checked","checked"),e.d
g.value="custom",k.style.display="none",m.style.display="")}}c="format-"+c;var e=document.createElement("input");e.setAttribute("name",c);e.setAttribute("type","radio");e.setAttribute("value","portrait");var h=document.createElement("input");h.setAttribute("name",c);h.setAttribute("type","radio");h.setAttribute("value","landscape");var g=document.createElement("select");g.style.marginBottom="8px";g.style.width="202px";var k=document.createElement("div");k.style.marginLeft="4px";k.style.width="210px";
k.style.height="24px";e.style.marginRight="6px";k.appendChild(e);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));k.appendChild(c);h.style.marginLeft="10px";h.style.marginRight="6px";k.appendChild(h);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));k.appendChild(l);var m=document.createElement("div");m.style.marginLeft="4px";m.style.width="210px";m.style.height="24px";var n=document.createElement("input");
n.setAttribute("size","7");n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in x ");var p=document.createElement("input");p.setAttribute("size","7");p.style.textAlign="right";m.appendChild(p);mxUtils.write(m," in");k.style.display="none";m.style.display="none";for(var q={},v=PageSetupDialog.getFormats(),t=0;t<v.length;t++){var u=v[t];q[u.key]=u;var w=document.createElement("option");w.setAttribute("value",u.key);mxUtils.write(w,u.title);g.appendChild(w)}var r=!1;f();a.appendChild(g);mxUtils.br(a);
-a.appendChild(k);a.appendChild(m);var y=d,x=function(a,c){var e=q[g.value];null!=e.format?(n.value=e.format.width/100,p.value=e.format.height/100,m.style.display="none",k.style.display=""):(k.style.display="none",m.style.display="");e=parseFloat(n.value);if(isNaN(e)||0>=e)n.value=d.width/100;e=parseFloat(p.value);if(isNaN(e)||0>=e)p.value=d.height/100;e=new mxRectangle(0,0,Math.floor(100*parseFloat(n.value)),Math.floor(100*parseFloat(p.value)));"custom"!=g.value&&h.checked&&(e=new mxRectangle(0,0,
-e.height,e.width));c&&r||e.width==y.width&&e.height==y.height||(y=e,null!=b&&b(y))};mxEvent.addListener(c,"click",function(a){e.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(l,"click",function(a){h.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(n,"blur",x);mxEvent.addListener(n,"click",x);mxEvent.addListener(p,"blur",x);mxEvent.addListener(p,"click",x);mxEvent.addListener(h,"change",x);mxEvent.addListener(e,"change",x);mxEvent.addListener(g,"change",function(a){r="custom"==g.value;
-x(a,!0)});x();return{set:function(a){d=a;f(null,null,!0)},get:function(){return y},widthInput:n,heightInput:p}};
+a.appendChild(k);a.appendChild(m);var x=d,y=function(a,c){var e=q[g.value];null!=e.format?(n.value=e.format.width/100,p.value=e.format.height/100,m.style.display="none",k.style.display=""):(k.style.display="none",m.style.display="");e=parseFloat(n.value);if(isNaN(e)||0>=e)n.value=d.width/100;e=parseFloat(p.value);if(isNaN(e)||0>=e)p.value=d.height/100;e=new mxRectangle(0,0,Math.floor(100*parseFloat(n.value)),Math.floor(100*parseFloat(p.value)));"custom"!=g.value&&h.checked&&(e=new mxRectangle(0,0,
+e.height,e.width));c&&r||e.width==x.width&&e.height==x.height||(x=e,null!=b&&b(x))};mxEvent.addListener(c,"click",function(a){e.checked=!0;y(a);mxEvent.consume(a)});mxEvent.addListener(l,"click",function(a){h.checked=!0;y(a);mxEvent.consume(a)});mxEvent.addListener(n,"blur",y);mxEvent.addListener(n,"click",y);mxEvent.addListener(p,"blur",y);mxEvent.addListener(p,"click",y);mxEvent.addListener(h,"change",y);mxEvent.addListener(e,"change",y);mxEvent.addListener(g,"change",function(a){r="custom"==g.value;
+y(a,!0)});y();return{set:function(a){d=a;f(null,null,!0)},get:function(){return x},widthInput:n,heightInput:p}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,1600,900)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1920,1200)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1600,1200)},{key:"custom",title:mxResources.get("custom"),format:null}]};
@@ -2111,8 +2113,8 @@ d="url("+this.gridImage+")";var f=c=0;null!=a.view.backgroundPageShape&&(f=this.
b,a.container.className="geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=e,c.style.backgroundColor=b,c.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var c=this.gridSteps*b,d=[],e=1;e<this.gridSteps;e++){var g=e*b;d.push("M 0 "+g+" L "+c+" "+g+" M "+g+" 0 L "+g+" "+c)}return'<svg width="'+
c+'" height="'+c+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+c+'" height="'+c+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+c+" 0 L 0 0 0 "+c+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,c){a.apply(this,arguments);if(null!=this.shiftPreview1){var d=
this.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+b,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+c,e))+"px";d.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,e=this.view.translate,g=this.pageFormat,f=d*this.pageScale,h=this.view.getBackgroundPageBounds();b=h.width;c=h.height;var k=
-new mxRectangle(d*e.x,d*e.y,g.width*f,g.height*f),l=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(c/k.height)-1:0,w=a?Math.ceil(b/k.width)-1:0,r=h.x+b,y=h.y+c;null==this.horizontalPageBreaks&&0<l&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<w&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?l:w,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(h.x),Math.round(h.y+(c+1)*k.height)),
-new mxPoint(Math.round(r),Math.round(h.y+(c+1)*k.height))]:[new mxPoint(Math.round(h.x+(c+1)*k.width),Math.round(h.y)),new mxPoint(Math.round(h.x+(c+1)*k.width),Math.round(y))];null!=a[c]?(a[c].points=d,a[c].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[c]=d)}for(c=b;c<a.length;c++)a[c].destroy();a.splice(b,a.length-b)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
+new mxRectangle(d*e.x,d*e.y,g.width*f,g.height*f),l=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(c/k.height)-1:0,w=a?Math.ceil(b/k.width)-1:0,r=h.x+b,x=h.y+c;null==this.horizontalPageBreaks&&0<l&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<w&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?l:w,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(h.x),Math.round(h.y+(c+1)*k.height)),
+new mxPoint(Math.round(r),Math.round(h.y+(c+1)*k.height))]:[new mxPoint(Math.round(h.x+(c+1)*k.width),Math.round(h.y)),new mxPoint(Math.round(h.x+(c+1)*k.width),Math.round(x))];null!=a[c]?(a[c].points=d,a[c].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[c]=d)}for(c=b;c<a.length;c++)a[c].destroy();a.splice(b,a.length-b)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,d){for(var e=0;e<b.length;e++)if(this.graph.getModel().isVertex(b[e])){var g=this.graph.getCellGeometry(b[e]);if(null!=g&&g.relative)return!1}return c.apply(this,arguments)};var d=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=d.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,c){return this.isConnecting()?
!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,e=this.graph.pageScale,f=d.width*e,d=d.height*e,e=Math.floor(Math.min(0,b)/f),h=Math.floor(Math.min(0,
c)/d);return new mxRectangle(this.scale*(this.translate.x+e*f),this.scale*(this.translate.y+h*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/f)-e)*f,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/d)-h)*d)};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,c){b.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=
@@ -2130,13 +2132,13 @@ mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF
0;e<p.length;e++)this.toolbar.container.appendChild(p[e]);this.toolbar.fontMenu=m;this.toolbar.sizeMenu=n}l=b.cellEditor.isContentEditing();m=a;n=d;p=c}}),v=this,t=b.cellEditor.startEditing;b.cellEditor.startEditing=function(){t.apply(this,arguments);q();if(b.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=b.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&
null!=v.toolbar)){var d=c.fontFamily;"'"==d.charAt(0)&&(d=d.substring(1));"'"==d.charAt(d.length-1)&&(d=d.substring(0,d.length-1));v.toolbar.setFontName(d);v.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(b.cellEditor.textarea,"input",c);mxEvent.addListener(b.cellEditor.textarea,"touchend",c);mxEvent.addListener(b.cellEditor.textarea,"mouseup",c);mxEvent.addListener(b.cellEditor.textarea,"keyup",c);c()}};var u=b.cellEditor.stopEditing;b.cellEditor.stopEditing=function(a,
b){u.apply(this,arguments);q()};b.container.setAttribute("tabindex","0");b.container.style.cursor="default";if(window.self===window.top&&null!=b.container.parentNode)try{b.container.focus()}catch(E){}var w=b.fireMouseEvent;b.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();w.apply(this,arguments)};b.popupMenuHandler.autoExpand=!0;null!=this.menus&&(b.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,
-mxUtils.bind(this,function(a){b.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var r="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),y="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){try{var c=b.view.getState(a);if(null!=c){var d=a.clone();d.style="";var e=b.getCellStyle(d);a=[];var d=[],f;for(f in c.style)e[f]!=c.style[f]&&(a.push(c.style[f]),
+mxUtils.bind(this,function(a){b.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var r="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),x="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){try{var c=b.view.getState(a);if(null!=c){var d=a.clone();d.style="";var e=b.getCellStyle(d);a=[];var d=[],f;for(f in c.style)e[f]!=c.style[f]&&(a.push(c.style[f]),
d.push(f));for(var g=b.getModel().getStyle(c.cell),h=null!=g?g.split(";"):[],g=0;g<h.length;g++){var k=h[g],l=k.indexOf("=");if(0<=l){f=k.substring(0,l);var m=k.substring(l+1);null!=e[f]&&"none"==m&&(a.push(m),d.push(f))}}b.getModel().isEdge(c.cell)?b.currentEdgeStyle={}:b.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",d,"values",a,"cells",[c.cell]))}}catch(K){this.handleError(K)}};this.clearDefaultStyle=function(){b.currentEdgeStyle=mxUtils.clone(b.defaultEdgeStyle);
-b.currentVertexStyle=mxUtils.clone(b.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var x=["fontFamily","fontSize","fontColor"],D="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),z=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],x,["opacity"],["align"],["html"]];for(a=0;a<z.length;a++)for(c=
-0;c<z[a].length;c++)r.push(z[a][c]);for(a=0;a<y.length;a++)0>mxUtils.indexOf(r,y[a])&&r.push(y[a]);var C=function(a,c){var d=b.getModel();d.beginUpdate();try{if(c)for(var e=d.isEdge(k),f=e?b.currentEdgeStyle:b.currentVertexStyle,e=["fontSize","fontFamily","fontColor"],g=0;g<e.length;g++){var h=f[e[g]];null!=h&&b.setCellStyles(e[g],h,a)}else for(h=0;h<a.length;h++){for(var k=a[h],l=d.getStyle(k),m=null!=l?l.split(";"):[],n=r.slice(),g=0;g<m.length;g++){var p=m[g],v=p.indexOf("=");if(0<=v){var q=p.substring(0,
-v),A=mxUtils.indexOf(n,q);0<=A&&n.splice(A,1);for(var Q=0;Q<z.length;Q++){var P=z[Q];if(0<=mxUtils.indexOf(P,q))for(var T=0;T<P.length;T++){var da=mxUtils.indexOf(n,P[T]);0<=da&&n.splice(da,1)}}}}for(var f=(e=d.isEdge(k))?b.currentEdgeStyle:b.currentVertexStyle,V=d.getStyle(k),g=0;g<n.length;g++){var q=n[g],u=f[q];null==u||"shape"==q&&!e||e&&!(0>mxUtils.indexOf(y,q))||(V=mxUtils.setStyle(V,q,u))}d.setStyle(k,V)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,b){C(b.getProperty("cells"))});
+b.currentVertexStyle=mxUtils.clone(b.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var y=["fontFamily","fontSize","fontColor"],D="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),z=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],y,["opacity"],["align"],["html"]];for(a=0;a<z.length;a++)for(c=
+0;c<z[a].length;c++)r.push(z[a][c]);for(a=0;a<x.length;a++)0>mxUtils.indexOf(r,x[a])&&r.push(x[a]);var C=function(a,c){var d=b.getModel();d.beginUpdate();try{if(c)for(var e=d.isEdge(k),f=e?b.currentEdgeStyle:b.currentVertexStyle,e=["fontSize","fontFamily","fontColor"],g=0;g<e.length;g++){var h=f[e[g]];null!=h&&b.setCellStyles(e[g],h,a)}else for(h=0;h<a.length;h++){for(var k=a[h],l=d.getStyle(k),m=null!=l?l.split(";"):[],n=r.slice(),g=0;g<m.length;g++){var p=m[g],v=p.indexOf("=");if(0<=v){var q=p.substring(0,
+v),A=mxUtils.indexOf(n,q);0<=A&&n.splice(A,1);for(var P=0;P<z.length;P++){var R=z[P];if(0<=mxUtils.indexOf(R,q))for(var T=0;T<R.length;T++){var W=mxUtils.indexOf(n,R[T]);0<=W&&n.splice(W,1)}}}}for(var f=(e=d.isEdge(k))?b.currentEdgeStyle:b.currentVertexStyle,ca=d.getStyle(k),g=0;g<n.length;g++){var q=n[g],u=f[q];null==u||"shape"==q&&!e||e&&!(0>mxUtils.indexOf(x,q))||(ca=mxUtils.setStyle(ca,q,u))}d.setStyle(k,ca)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,b){C(b.getProperty("cells"))});
b.addListener("textInserted",function(a,b){C(b.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT,function(a,b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));C(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var d=c.getProperty("cells"),e=!1,f=!1;if(0<d.length)for(var g=0;g<d.length&&(e=b.getModel().isVertex(d[g])||e,!(f=b.getModel().isEdge(d[g])||f)||!e);g++);else f=e=!0;for(var d=c.getProperty("keys"),
-h=c.getProperty("values"),g=0;g<d.length;g++){var k=0<=mxUtils.indexOf(x,d[g]);if("strokeColor"!=d[g]||null!=h[g]&&"none"!=h[g])if(0<=mxUtils.indexOf(y,d[g]))f||0<=mxUtils.indexOf(D,d[g])?null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]:e&&0<=mxUtils.indexOf(r,d[g])&&(null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g]);else if(0<=mxUtils.indexOf(r,d[g])){if(e||k)null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g];if(f||k||
+h=c.getProperty("values"),g=0;g<d.length;g++){var k=0<=mxUtils.indexOf(y,d[g]);if("strokeColor"!=d[g]||null!=h[g]&&"none"!=h[g])if(0<=mxUtils.indexOf(x,d[g]))f||0<=mxUtils.indexOf(D,d[g])?null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]:e&&0<=mxUtils.indexOf(r,d[g])&&(null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g]);else if(0<=mxUtils.indexOf(r,d[g])){if(e||k)null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g];if(f||k||
0<=mxUtils.indexOf(D,d[g]))null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]}}null!=this.toolbar&&(this.toolbar.setFontName(b.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(b.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==b.currentEdgeStyle.edgeStyle&&"1"==b.currentEdgeStyle.curved?"geSprite geSprite-curved":
"straight"==b.currentEdgeStyle.edgeStyle||"none"==b.currentEdgeStyle.edgeStyle||null==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==b.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==b.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):
"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==b.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==b.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==b.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",b.currentEdgeStyle.shape,
@@ -2159,9 +2161,9 @@ EditorUi.prototype.initClipboard=function(){var a=this,c=mxClipboard.cut;mxClipb
0),p=0;p<f.length;p++)m.add(n,f[p]);b.updateCustomLinks(b.createCellMapping(d,e),f);mxClipboard.insertCount=1;mxClipboard.setCells(f)}a.updatePasteActionStates();return c};var d=mxClipboard.paste;mxClipboard.paste=function(b){var c=null;b.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):c=d.apply(this,arguments);a.updatePasteActionStates();return c};var b=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){b.apply(this,arguments);a.updatePasteActionStates()};
var f=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,c){f.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),b=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,
-this.scale*a.height*b.height)};a.getPreferredPageSize=function(a,b,c){a=this.getPageLayout();b=this.getPageSize();return new mxRectangle(0,0,a.width*b.width,a.height*b.height)};var c=null,d=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(b,c,d,e){if(null!=a.container&&!a.isViewer()){d=null!=d?d:0;e=null!=e?e:0;var f=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),g=mxUtils.hasScrollbars(a.container),h=a.view.translate,k=a.view.scale,l=mxRectangle.fromRectangle(f);
-l.x=l.x/k-h.x;l.y=l.y/k-h.y;l.width/=k;l.height/=k;var h=a.container.scrollTop,m=a.container.scrollLeft,n=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)n+=3;var p=a.container.offsetWidth-n,n=a.container.offsetHeight-n;b=b?Math.max(.3,Math.min(c||1,p/l.width)):k;c=(p-b*l.width)/2/b;var v=0==this.lightboxVerticalDivider?0:(n-b*l.height)/this.lightboxVerticalDivider/b;g&&(c=Math.max(c,0),v=Math.max(v,0));if(g||f.width<p||f.height<n)a.view.scaleAndTranslate(b,
-Math.floor(c-l.x),Math.floor(v-l.y)),a.container.scrollTop=h*b/k,a.container.scrollLeft=m*b/k;else if(0!=d||0!=e)f=a.view.translate,a.view.setTranslate(Math.floor(f.x+d/k),Math.floor(f.y+e/k))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var b=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",b);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",b)});this.editor.addListener("resetGraphView",
+this.scale*a.height*b.height)};a.getPreferredPageSize=function(a,b,c){a=this.getPageLayout();b=this.getPageSize();return new mxRectangle(0,0,a.width*b.width,a.height*b.height)};var c=null,d=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(b,c,d,e){if(null!=a.container&&!a.isViewer()){d=null!=d?d:0;e=null!=e?e:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),f=mxUtils.hasScrollbars(a.container),h=a.view.translate,k=a.view.scale,l=mxRectangle.fromRectangle(g);
+l.x=l.x/k-h.x;l.y=l.y/k-h.y;l.width/=k;l.height/=k;var h=a.container.scrollTop,m=a.container.scrollLeft,n=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)n+=3;var p=a.container.offsetWidth-n,n=a.container.offsetHeight-n;b=b?Math.max(.3,Math.min(c||1,p/l.width)):k;c=(p-b*l.width)/2/b;var q=0==this.lightboxVerticalDivider?0:(n-b*l.height)/this.lightboxVerticalDivider/b;f&&(c=Math.max(c,0),q=Math.max(q,0));if(f||g.width<p||g.height<n)a.view.scaleAndTranslate(b,
+Math.floor(c-l.x),Math.floor(q-l.y)),a.container.scrollTop=h*b/k,a.container.scrollLeft=m*b/k;else if(0!=d||0!=e)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+d/k),Math.floor(g.y+e/k))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var b=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",b);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",b)});this.editor.addListener("resetGraphView",
mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(b){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(b){a.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=a.isViewer()?"0":"50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var e=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",e);e();var h=0,e=mxUtils.bind(this,function(a,b,c){h++;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",
@@ -2177,15 +2179,15 @@ this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.ed
window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=f.fullscreenBtn&&window.self!==window.top&&e(mxUtils.bind(this,function(b){f.fullscreenBtn.url?a.openLink(f.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(b)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(f.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&e(mxUtils.bind(this,
function(a){"1"==urlParams.close||f.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)||
t(30),v())}));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)?v():t(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?v():t(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||
-t(30)}));var y=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<y&&Math.abs(this.scrollTop-a.container.scrollTop)<y&&Math.abs(this.startX-c.getGraphX())<y&&Math.abs(this.startY-c.getGraphY())<
-y&&(0<parseFloat(d.chromelessToolbar.style.opacity||0)?v():t(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var x=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}x.apply(this,arguments)};if(!a.isViewer()){var D=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?D.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=
+t(30)}));var x=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<x&&Math.abs(this.scrollTop-a.container.scrollTop)<x&&Math.abs(this.startX-c.getGraphX())<x&&Math.abs(this.startY-c.getGraphY())<
+x&&(0<parseFloat(d.chromelessToolbar.style.opacity||0)?v():t(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var y=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}y.apply(this,arguments)};if(!a.isViewer()){var D=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),g=Math.ceil(2*c.y+b.height*d.height),f=a.minimumGraphSize;if(null==f||f.width!=e||f.height!=g)a.minimumGraphSize=new mxRectangle(0,0,e,g);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?D.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()))}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var z=null,C=a.view.getDrawPane(),E=a.view.getBackgroundPane();a.lazyZoom=function(b,e){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);
b?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+.01)/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-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);
-if("fast"==urlParams.zoom){var f=e?a.container.scrollWidth/2:z.x+a.container.scrollLeft-a.container.offsetLeft,g=e?a.container.scrollHeight/2:z.y+a.container.scrollTop-a.container.offsetTop;C.setAttribute("transform-origin",f+" "+g);C.setAttribute("transform","scale("+this.cumulativeZoomFactor+")");E.setAttribute("transform-origin",f+" "+g);E.setAttribute("transform","scale("+this.cumulativeZoomFactor+")");g=a.view.backgroundPageShape.node;mxUtils.setPrefixedStyle(g.style,"transform-origin",e?"50%":
-z.x+a.container.offsetLeft-g.offsetLeft+"px "+e?"50%":z.y-g.offsetTop+"px");mxUtils.setPrefixedStyle(g.style,"transform","scale("+this.cumulativeZoomFactor+")");a.view.getOverlayPane().style.opacity="0";a.view.getDecoratorPane().style.opacity="0";console.log("here",this.cumulativeZoomFactor,f,g.offsetLeft,g.offsetWidth)}this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){"fast"==
-urlParams.zoom&&(C.removeAttribute("transform-origin"),C.removeAttribute("transform"),E.removeAttribute("transform-origin"),E.removeAttribute("transform"),a.view.getOverlayPane().style.opacity="",a.view.getDecoratorPane().style.opacity="",mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null));var b=mxUtils.getOffset(a.container),e=0,g=0;null!=z&&(e=a.container.offsetWidth/2-z.x+b.x,g=
-a.container.offsetHeight/2-z.y+b.y);b=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=b&&(null!=c&&d.chromelessResize(!1,null,e*(this.cumulativeZoomFactor-1),g*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==e&&0==g||(a.container.scrollLeft-=e*(this.cumulativeZoomFactor-1),a.container.scrollTop-=g*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),"fast"==urlParams.zoom?500:this.lazyZoomDelay)};mxEvent.addMouseWheelListener(mxUtils.bind(this,
+if("fast"==urlParams.zoom){var g=e?a.container.scrollWidth/2:z.x+a.container.scrollLeft-a.container.offsetLeft,f=e?a.container.scrollHeight/2:z.y+a.container.scrollTop-a.container.offsetTop;C.setAttribute("transform-origin",g+" "+f);C.setAttribute("transform","scale("+this.cumulativeZoomFactor+")");E.setAttribute("transform-origin",g+" "+f);E.setAttribute("transform","scale("+this.cumulativeZoomFactor+")");f=a.view.backgroundPageShape.node;mxUtils.setPrefixedStyle(f.style,"transform-origin",e?"50%":
+z.x+a.container.offsetLeft-f.offsetLeft+"px "+e?"50%":z.y-f.offsetTop+"px");mxUtils.setPrefixedStyle(f.style,"transform","scale("+this.cumulativeZoomFactor+")");a.view.getOverlayPane().style.opacity="0";a.view.getDecoratorPane().style.opacity="0";console.log("here",this.cumulativeZoomFactor,g,f.offsetLeft,f.offsetWidth)}this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){"fast"==
+urlParams.zoom&&(C.removeAttribute("transform-origin"),C.removeAttribute("transform"),E.removeAttribute("transform-origin"),E.removeAttribute("transform"),a.view.getOverlayPane().style.opacity="",a.view.getDecoratorPane().style.opacity="",mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null));var b=mxUtils.getOffset(a.container),e=0,f=0;null!=z&&(e=a.container.offsetWidth/2-z.x+b.x,f=
+a.container.offsetHeight/2-z.y+b.y);b=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=b&&(null!=c&&d.chromelessResize(!1,null,e*(this.cumulativeZoomFactor-1),f*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==e&&0==f||(a.container.scrollLeft-=e*(this.cumulativeZoomFactor-1),a.container.scrollTop-=f*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),"fast"==urlParams.zoom?500:this.lazyZoomDelay)};mxEvent.addMouseWheelListener(mxUtils.bind(this,
function(b,c){if((null==this.dialogs||0==this.dialogs.length)&&a.isZoomWheelEvent(b))for(var d=mxEvent.getSource(b);null!=d;){if(d==a.container)return z=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b)),a.lazyZoom(c),mxEvent.consume(b),!1;d=d.parentNode}}),a.container)};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.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return 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){null!=this.format&&(this.formatWidth=a||0<this.formatWidth?0:240,this.formatContainer.style.display=a||0<this.formatWidth?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
@@ -2250,17 +2252,17 @@ EditorUi.prototype.showDataDialog=function(a){null!=a&&(a=new EditDataDialog(thi
EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var c=mxUtils.prompt(mxResources.get("backgroundImage"),"");if(null!=c&&0<c.length){var d=new Image;d.onload=function(){a(new mxImage(c,d.width,d.height))};d.onerror=function(){a(null);mxUtils.alert(mxResources.get("fileNotFound"))};d.src=c}else a(null)};
EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,c,d){mxUtils.confirm(a)?null!=c&&c():null!=d&&d()};
EditorUi.prototype.createOutline=function(a){var c=new mxOutline(this.editor.graph);c.border=20;mxEvent.addListener(window,"resize",function(){c.update()});this.addListener("pageFormatChanged",function(){c.update()});return c};EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize"};
-EditorUi.prototype.createKeyHandler=function(a){function c(a,c,d){h.push(function(){if(!b.isSelectionEmpty()&&b.isEnabled())if(c=null!=c?c:1,d){b.getModel().beginUpdate();try{for(var e=b.getSelectionCells(),g=0;g<e.length;g++)if(b.getModel().isVertex(e[g])&&b.isCellResizable(e[g])){var f=b.getCellGeometry(e[g]);null!=f&&(f=f.clone(),37==a?f.width=Math.max(0,f.width-c):38==a?f.height=Math.max(0,f.height-c):39==a?f.width+=c:40==a&&(f.height+=c),b.getModel().setGeometry(e[g],f))}}finally{b.getModel().endUpdate()}}else e=
-b.getSelectionCell(),g=b.model.getParent(e),f=null,1==b.getSelectionCount()&&b.model.isVertex(e)&&null!=b.layoutManager&&!b.isCellLocked(e)&&(f=b.layoutManager.getLayout(g)),null!=f&&f.constructor==mxStackLayout?(f=g.getIndex(e),37==a||38==a?b.model.add(g,e,Math.max(0,f-1)):39!=a&&40!=a||b.model.add(g,e,Math.min(b.model.getChildCount(g),f+1))):(g=e=0,37==a?e=-c:38==a?g=-c:39==a?e=c:40==a&&(g=c),b.moveCells(b.getMovableCells(b.getSelectionCells()),e,g))});null!=g&&window.clearTimeout(g);g=window.setTimeout(function(){if(0<
+EditorUi.prototype.createKeyHandler=function(a){function c(a,c,d){h.push(function(){if(!b.isSelectionEmpty()&&b.isEnabled())if(c=null!=c?c:1,d){b.getModel().beginUpdate();try{for(var e=b.getSelectionCells(),f=0;f<e.length;f++)if(b.getModel().isVertex(e[f])&&b.isCellResizable(e[f])){var g=b.getCellGeometry(e[f]);null!=g&&(g=g.clone(),37==a?g.width=Math.max(0,g.width-c):38==a?g.height=Math.max(0,g.height-c):39==a?g.width+=c:40==a&&(g.height+=c),b.getModel().setGeometry(e[f],g))}}finally{b.getModel().endUpdate()}}else e=
+b.getSelectionCell(),f=b.model.getParent(e),g=null,1==b.getSelectionCount()&&b.model.isVertex(e)&&null!=b.layoutManager&&!b.isCellLocked(e)&&(g=b.layoutManager.getLayout(f)),null!=g&&g.constructor==mxStackLayout?(g=f.getIndex(e),37==a||38==a?b.model.add(f,e,Math.max(0,g-1)):39!=a&&40!=a||b.model.add(f,e,Math.min(b.model.getChildCount(f),g+1))):(f=e=0,37==a?e=-c:38==a?f=-c:39==a?e=c:40==a&&(f=c),b.moveCells(b.getMovableCells(b.getSelectionCells()),e,f))});null!=g&&window.clearTimeout(g);g=window.setTimeout(function(){if(0<
h.length){b.getModel().beginUpdate();try{for(var a=0;a<h.length;a++)h[a]();h=[]}finally{b.getModel().endUpdate()}b.scrollCellToVisible(b.getSelectionCell())}},200)}var d=this,b=this.editor.graph,f=new mxKeyHandler(b),e=f.isEventIgnored;f.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&
!mxClient.IS_SF)&&e.apply(this,arguments)};f.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==d.dialogs||0==d.dialogs.length)};f.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var h=[],g=null,k={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},l=f.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(b.isEnabled()){if(mxEvent.isShiftDown(a)&&
mxEvent.isAltDown(a)){var e=d.actions.get(d.altShiftActions[a.keyCode]);if(null!=e)return e.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){b.selectParentCell()}:function(){b.selectChildCell()};if(null!=k[a.keyCode]&&!b.isSelectionEmpty())if(!this.isControlDown(a)&&mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(b.model.isVertex(b.getSelectionCell()))return function(){var c=b.connectVertex(b.getSelectionCell(),k[a.keyCode],b.defaultEdgeLength,a,!0);null!=c&&0<
c.length&&(1==c.length&&b.model.isEdge(c[0])?b.setSelectionCell(b.model.getTerminal(c[0],!1)):b.setSelectionCell(c[c.length-1]),b.scrollCellToVisible(b.getSelectionCell()),null!=d.hoverIcons&&d.hoverIcons.update(b.view.getState(b.getSelectionCell())))}}else return this.isControlDown(a)?function(){c(a.keyCode,mxEvent.isShiftDown(a)?b.gridSize:null,!0)}:function(){c(a.keyCode,mxEvent.isShiftDown(a)?b.gridSize:null)}}return l.apply(this,arguments)};f.bindAction=mxUtils.bind(this,function(a,b,c,d){var e=
-this.actions.get(c);null!=e&&(c=function(){e.isEnabled()&&e.funct()},b?d?f.bindControlShiftKey(a,c):f.bindControlKey(a,c):d?f.bindShiftKey(a,c):f.bindKey(a,c))});var m=f.escape;f.escape=function(a){m.apply(this,arguments)};f.enter=function(){};f.bindControlShiftKey(36,function(){b.exitGroup()});f.bindControlShiftKey(35,function(){b.enterGroup()});f.bindKey(36,function(){b.home()});f.bindKey(35,function(){b.refresh()});f.bindAction(107,!0,"zoomIn");f.bindAction(109,!0,"zoomOut");f.bindAction(80,!0,
-"print");f.bindAction(79,!0,"outline",!0);f.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)f.bindControlKey(36,function(){b.isEnabled()&&b.foldCells(!0)}),f.bindControlKey(35,function(){b.isEnabled()&&b.foldCells(!1)}),f.bindControlKey(13,function(){b.isEnabled()&&b.setSelectionCells(b.duplicateCells(b.getSelectionCells(),!1))}),f.bindAction(8,!1,"delete"),f.bindAction(8,!0,"deleteAll"),f.bindAction(46,!1,"delete"),f.bindAction(46,!0,"deleteAll"),f.bindAction(72,!0,"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.bindKey(13,function(){b.isEnabled()&&b.startEditingAtCell()}),f.bindKey(113,function(){b.isEnabled()&&b.startEditingAtCell()});mxClient.IS_WIN?f.bindAction(89,!0,"redo"):f.bindAction(90,!0,"redo",!0);return f};
+this.actions.get(c);null!=e&&(c=function(){e.isEnabled()&&e.funct()},b?d?f.bindControlShiftKey(a,c):f.bindControlKey(a,c):d?f.bindShiftKey(a,c):f.bindKey(a,c))});var m=this,n=f.escape;f.escape=function(a){n.apply(this,arguments)};f.enter=function(){};f.bindControlShiftKey(36,function(){b.exitGroup()});f.bindControlShiftKey(35,function(){b.enterGroup()});f.bindKey(36,function(){b.home()});f.bindKey(35,function(){b.refresh()});f.bindAction(107,!0,"zoomIn");f.bindAction(109,!0,"zoomOut");f.bindAction(80,
+!0,"print");f.bindAction(79,!0,"outline",!0);f.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)f.bindControlKey(36,function(){b.isEnabled()&&b.foldCells(!0)}),f.bindControlKey(35,function(){b.isEnabled()&&b.foldCells(!1)}),f.bindControlKey(13,function(){if(b.isEnabled())try{b.setSelectionCells(b.duplicateCells(b.getSelectionCells(),!1))}catch(p){m.handleError(p)}}),f.bindAction(8,!1,"delete"),f.bindAction(8,!0,"deleteAll"),f.bindAction(46,!1,"delete"),f.bindAction(46,!0,
+"deleteAll"),f.bindAction(72,!0,"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.bindKey(13,function(){b.isEnabled()&&b.startEditingAtCell()}),f.bindKey(113,function(){b.isEnabled()&&b.startEditingAtCell()});mxClient.IS_WIN?f.bindAction(89,!0,"redo"):f.bindAction(90,!0,"redo",!0);return f};
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 a=0;a<this.destroyFunctions.length;a++)this.destroyFunctions[a]();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],a=0;a<c.length;a++)null!=c[a]&&null!=c[a].parentNode&&c[a].parentNode.removeChild(c[a])};function Sidebar(a,c){this.editorUi=a;this.container=c;this.palettes={};this.taglist={};this.showTooltips=!0;this.graph=a.createTemporaryGraph(this.editorUi.editor.graph.getStylesheet());this.graph.cellRenderer.minSvgStrokeWidth=this.minThumbStrokeWidth;this.graph.cellRenderer.antiAlias=this.thumbAntiAlias;this.graph.container.style.visibility="hidden";this.graph.foldingEnabled=!1;document.body.appendChild(this.graph.container);this.pointerUpHandler=mxUtils.bind(this,function(){this.showTooltips=
@@ -2418,8 +2420,8 @@ Sidebar.prototype.createDropHandler=function(a,c,d,b){d=null!=d?d:!0;return mxUt
f.getDefaultParent())){f.model.beginUpdate();try{g=Math.round(g);k=Math.round(k);if(c&&f.isSplitTarget(h,a,e)){var n=f.cloneCells(a);f.splitEdge(h,n,null,g-b.width/2,k-b.height/2);m=n}else 0<a.length&&(m=f.importCells(a,g,k,h));if(null!=f.layoutManager){var p=f.layoutManager.getLayout(h);if(null!=p){var q=f.view.scale,v=f.view.translate,t=(g+v.x)*q,u=(k+v.y)*q;for(h=0;h<m.length;h++)p.moveCell(m[h],t,u)}}!d||null!=e&&mxEvent.isShiftDown(e)||f.fireEvent(new mxEventObject("cellsInserted","cells",m))}catch(w){this.editorUi.handleError(w)}finally{f.model.endUpdate()}null!=
m&&0<m.length&&(f.scrollCellToVisible(m[0]),f.setSelectionCells(m));f.editAfterInsert&&null!=e&&mxEvent.isMouseEvent(e)&&null!=m&&1==m.length&&window.setTimeout(function(){f.startEditing(m[0])},0)}}mxEvent.consume(e)}})};Sidebar.prototype.createDragPreview=function(a,c){var d=document.createElement("div");d.style.border=this.dragPreviewBorder;d.style.width=a+"px";d.style.height=c+"px";return d};
Sidebar.prototype.dropAndConnect=function(a,c,d,b,f){var e=this.getDropAndConnectGeometry(a,c[b],d,c),h=[];if(null!=e){var g=this.editorUi.editor.graph,k=null;g.model.beginUpdate();try{var l=g.getCellGeometry(a),m=g.getCellGeometry(c[b]),n=g.model.getParent(a),p=!0;if(null!=g.layoutManager){var q=g.layoutManager.getLayout(n);if(null!=q&&q.constructor==mxStackLayout&&(p=!1,h=g.view.getState(n),null!=h)){var v=new mxPoint(h.x/g.view.scale-g.view.translate.x,h.y/g.view.scale-g.view.translate.y);e.x+=
-v.x;e.y+=v.y;var t=e.getTerminalPoint(!1);null!=t&&(t.x+=v.x,t.y+=v.y)}}var u=m.x,w=m.y;g.model.isEdge(c[b])&&(w=u=0);var r=g.model.isEdge(a)||null!=l&&!l.relative&&p,h=c=g.importCells(c,e.x-(r?u:0),e.y-(r?w:0),r?n:null);if(g.model.isEdge(a))g.model.setTerminal(a,c[b],d==mxConstants.DIRECTION_NORTH);else if(g.model.isEdge(c[b])){g.model.setTerminal(c[b],a,!0);var y=g.getCellGeometry(c[b]);y.points=null;if(null!=y.getTerminalPoint(!1))y.setTerminalPoint(e.getTerminalPoint(!1),!1);else if(r&&g.model.isVertex(n)){var x=
-g.view.getState(n),v=x.cell!=g.view.currentRoot?new mxPoint(x.x/g.view.scale-g.view.translate.x,x.y/g.view.scale-g.view.translate.y):new mxPoint(0,0);g.cellsMoved(c,v.x,v.y,null,null,!0)}}else m=g.getCellGeometry(c[b]),u=e.x-Math.round(m.x),w=e.y-Math.round(m.y),e.x=Math.round(m.x),e.y=Math.round(m.y),g.model.setGeometry(c[b],e),g.cellsMoved(c,u,w,null,null,!0),h=c.slice(),k=1==h.length?h[0]:null,c.push(g.insertEdge(null,null,"",a,c[b],g.createCurrentEdgeStyle()));null!=f&&mxEvent.isShiftDown(f)||
+v.x;e.y+=v.y;var t=e.getTerminalPoint(!1);null!=t&&(t.x+=v.x,t.y+=v.y)}}var u=m.x,w=m.y;g.model.isEdge(c[b])&&(w=u=0);var r=g.model.isEdge(a)||null!=l&&!l.relative&&p,h=c=g.importCells(c,e.x-(r?u:0),e.y-(r?w:0),r?n:null);if(g.model.isEdge(a))g.model.setTerminal(a,c[b],d==mxConstants.DIRECTION_NORTH);else if(g.model.isEdge(c[b])){g.model.setTerminal(c[b],a,!0);var x=g.getCellGeometry(c[b]);x.points=null;if(null!=x.getTerminalPoint(!1))x.setTerminalPoint(e.getTerminalPoint(!1),!1);else if(r&&g.model.isVertex(n)){var y=
+g.view.getState(n),v=y.cell!=g.view.currentRoot?new mxPoint(y.x/g.view.scale-g.view.translate.x,y.y/g.view.scale-g.view.translate.y):new mxPoint(0,0);g.cellsMoved(c,v.x,v.y,null,null,!0)}}else m=g.getCellGeometry(c[b]),u=e.x-Math.round(m.x),w=e.y-Math.round(m.y),e.x=Math.round(m.x),e.y=Math.round(m.y),g.model.setGeometry(c[b],e),g.cellsMoved(c,u,w,null,null,!0),h=c.slice(),k=1==h.length?h[0]:null,c.push(g.insertEdge(null,null,"",a,c[b],g.createCurrentEdgeStyle()));null!=f&&mxEvent.isShiftDown(f)||
g.fireEvent(new mxEventObject("cellsInserted","cells",c))}catch(D){this.editorUi.handleError(D)}finally{g.model.endUpdate()}g.editAfterInsert&&null!=f&&mxEvent.isMouseEvent(f)&&null!=k&&window.setTimeout(function(){g.startEditing(k)},0)}return h};
Sidebar.prototype.getDropAndConnectGeometry=function(a,c,d,b){var f=this.editorUi.editor.graph,e=f.view,h=1<b.length,g=f.getCellGeometry(a);b=f.getCellGeometry(c);null!=g&&null!=b&&(b=b.clone(),f.model.isEdge(a)?(a=f.view.getState(a),g=a.absolutePoints,c=g[0],f=g[g.length-1],d==mxConstants.DIRECTION_NORTH?(b.x=c.x/e.scale-e.translate.x-b.width/2,b.y=c.y/e.scale-e.translate.y-b.height/2):(b.x=f.x/e.scale-e.translate.x-b.width/2,b.y=f.y/e.scale-e.translate.y-b.height/2)):(g.relative&&(a=f.view.getState(a),
g=g.clone(),g.x=(a.x-e.translate.x)/e.scale,g.y=(a.y-e.translate.y)/e.scale),e=f.defaultEdgeLength,f.model.isEdge(c)&&null!=b.getTerminalPoint(!0)&&null!=b.getTerminalPoint(!1)?(c=b.getTerminalPoint(!0),f=b.getTerminalPoint(!1),e=f.x-c.x,c=f.y-c.y,e=Math.sqrt(e*e+c*c),b.x=g.getCenterX(),b.y=g.getCenterY(),b.width=1,b.height=1,d==mxConstants.DIRECTION_NORTH?(b.height=e,b.y=g.y-e,b.setTerminalPoint(new mxPoint(b.x,b.y),!1)):d==mxConstants.DIRECTION_EAST?(b.width=e,b.x=g.x+g.width,b.setTerminalPoint(new mxPoint(b.x+
@@ -2430,24 +2432,24 @@ Sidebar.prototype.createDragSource=function(a,c,d,b,f){function e(a,b){var c;mxC
"inline":"inline-block"):(c=mxUtils.createImage(a.src),c.style.width=a.width+"px",c.style.height=a.height+"px");null!=b&&c.setAttribute("title",b);mxUtils.setOpacity(c,a==this.refreshTarget?30:20);c.style.position="absolute";c.style.cursor="crosshair";return c}function h(a,b,c,d){null!=d.parentNode&&(mxUtils.contains(c,a,b)?(mxUtils.setOpacity(d,100),F=d):mxUtils.setOpacity(d,d==C?30:20));return c}for(var g=this.editorUi,k=g.editor.graph,l=null,m=null,n=this,p=0;p<b.length&&(null==m&&this.editorUi.editor.graph.model.isVertex(b[p])?
m=p:null==l&&this.editorUi.editor.graph.model.isEdge(b[p])&&null==this.editorUi.editor.graph.model.getTerminal(b[p],!0)&&(l=p),null==m||null==l);p++);var q=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(a,d,e,g,f){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=b&&null!=w&&F==C){var h=a.isCellSelected(w.cell)?a.getSelectionCells():[w.cell],h=this.updateShapes(a.model.isEdge(w.cell)?b[0]:b[m],h);a.setSelectionCells(h)}else null!=b&&null!=F&&null!=
t&&F!=C?(h=a.model.isEdge(t.cell)||null==l?m:l,a.setSelectionCells(this.dropAndConnect(t.cell,b,I,h,d))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),d,0,0,k.autoscroll,!0,!0);k.addListener(mxEvent.ESCAPE,function(a,b){q.isActive()&&q.reset()});var v=q.mouseDown;q.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||(k.stopEditing(),v.apply(this,arguments))};var t=null,u=null,w=null,r=!1,
-y=e(this.triangleUp,mxResources.get("connect")),x=e(this.triangleRight,mxResources.get("connect")),D=e(this.triangleDown,mxResources.get("connect")),z=e(this.triangleLeft,mxResources.get("connect")),C=e(this.refreshTarget,mxResources.get("replace")),E=null,H=e(this.roundDrop),L=e(this.roundDrop),I=mxConstants.DIRECTION_NORTH,F=null,J=q.createPreviewElement;q.createPreviewElement=function(a){var b=J.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents="none");this.previewElementWidth=b.style.width;
-this.previewElementHeight=b.style.height;return b};var O=q.dragEnter;q.dragEnter=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("none");O.apply(this,arguments)};var S=q.dragExit;q.dragExit=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("");S.apply(this,arguments)};q.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=F&&this.currentGuide.hide();if(null!=this.previewElement){var d=a.view;if(null!=w&&F==C)this.previewElement.style.display=
+x=e(this.triangleUp,mxResources.get("connect")),y=e(this.triangleRight,mxResources.get("connect")),D=e(this.triangleDown,mxResources.get("connect")),z=e(this.triangleLeft,mxResources.get("connect")),C=e(this.refreshTarget,mxResources.get("replace")),E=null,H=e(this.roundDrop),L=e(this.roundDrop),I=mxConstants.DIRECTION_NORTH,F=null,J=q.createPreviewElement;q.createPreviewElement=function(a){var b=J.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents="none");this.previewElementWidth=b.style.width;
+this.previewElementHeight=b.style.height;return b};var N=q.dragEnter;q.dragEnter=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("none");N.apply(this,arguments)};var S=q.dragExit;q.dragExit=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("");S.apply(this,arguments)};q.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=F&&this.currentGuide.hide();if(null!=this.previewElement){var d=a.view;if(null!=w&&F==C)this.previewElement.style.display=
a.model.isEdge(w.cell)?"none":"",this.previewElement.style.left=w.x+"px",this.previewElement.style.top=w.y+"px",this.previewElement.style.width=w.width+"px",this.previewElement.style.height=w.height+"px";else if(null!=t&&null!=F){var e=a.model.isEdge(t.cell)||null==l?m:l,g=n.getDropAndConnectGeometry(t.cell,b[e],I,b),h=a.model.isEdge(t.cell)?null:a.getCellGeometry(t.cell),k=a.getCellGeometry(b[e]),p=a.model.getParent(t.cell),v=d.translate.x*d.scale,u=d.translate.y*d.scale;null!=h&&!h.relative&&a.model.isVertex(p)&&
p!=d.currentRoot&&(u=d.getState(p),v=u.x,u=u.y);h=k.x;k=k.y;a.model.isEdge(b[e])&&(k=h=0);this.previewElement.style.left=(g.x-h)*d.scale+v+"px";this.previewElement.style.top=(g.y-k)*d.scale+u+"px";1==b.length&&(this.previewElement.style.width=g.width*d.scale+"px",this.previewElement.style.height=g.height*d.scale+"px");this.previewElement.style.display=""}else null!=q.currentHighlight.state&&a.model.isEdge(q.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-
-f.width*d.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-f.height*d.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var R=(new Date).getTime(),G=0,K=null,M=this.editorUi.editor.graph.getCellStyle(b[0]);q.getDropTarget=mxUtils.bind(this,function(a,c,d,e){var g=mxEvent.isAltDown(e)||null==b?null:a.getCellAt(c,d);if(null!=g&&!this.graph.isCellConnectable(g)){var f=
-this.graph.getModel().getParent(g);this.graph.getModel().isVertex(f)&&this.graph.isCellConnectable(f)&&(g=f)}a.isCellLocked(g)&&(g=null);var k=a.view.getState(g),f=F=null;K!=k?(K=k,R=(new Date).getTime(),G=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=k&&(this.updateThread=window.setTimeout(function(){null==F&&(K=k,q.getDropTarget(a,c,d,e))},this.dropTargetDelay+10))):G=(new Date).getTime()-R;if(2500>G&&null!=k&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!=
-mxUtils.getValue(M,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(k.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(M,mxConstants.STYLE_SHAPE)||1500<G||a.model.isEdge(k.cell))&&G>this.dropTargetDelay&&(a.model.isVertex(k.cell)&&null!=m||a.model.isEdge(k.cell)&&a.model.isEdge(b[0]))){w=
+f.width*d.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-f.height*d.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var Q=(new Date).getTime(),G=0,K=null,O=this.editorUi.editor.graph.getCellStyle(b[0]);q.getDropTarget=mxUtils.bind(this,function(a,c,d,e){var g=mxEvent.isAltDown(e)||null==b?null:a.getCellAt(c,d);if(null!=g&&!this.graph.isCellConnectable(g)){var f=
+this.graph.getModel().getParent(g);this.graph.getModel().isVertex(f)&&this.graph.isCellConnectable(f)&&(g=f)}a.isCellLocked(g)&&(g=null);var k=a.view.getState(g),f=F=null;K!=k?(K=k,Q=(new Date).getTime(),G=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=k&&(this.updateThread=window.setTimeout(function(){null==F&&(K=k,q.getDropTarget(a,c,d,e))},this.dropTargetDelay+10))):G=(new Date).getTime()-Q;if(2500>G&&null!=k&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!=
+mxUtils.getValue(O,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(k.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(O,mxConstants.STYLE_SHAPE)||1500<G||a.model.isEdge(k.cell))&&G>this.dropTargetDelay&&(a.model.isVertex(k.cell)&&null!=m||a.model.isEdge(k.cell)&&a.model.isEdge(b[0]))){w=
k;var l=a.model.isEdge(k.cell)?a.view.getPoint(k):new mxPoint(k.getCenterX(),k.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);C.style.left=Math.floor(l.x)+"px";C.style.top=Math.floor(l.y)+"px";null==E&&(a.container.appendChild(C),E=C.parentNode);h(c,d,l,C)}else null==w||!mxUtils.contains(w,c,d)||1500<G&&!mxEvent.isShiftDown(e)?(w=null,null!=E&&(C.parentNode.removeChild(C),E=null)):null!=w&&null!=E&&
(l=a.model.isEdge(w.cell)?a.view.getPoint(w):new mxPoint(w.getCenterX(),w.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),h(c,d,l,C));if(r&&null!=t&&!mxEvent.isAltDown(e)&&null==F){f=mxRectangle.fromRectangle(t);if(a.model.isEdge(t.cell)){var A=t.absolutePoints;null!=H.parentNode&&(l=A[0],f.add(h(c,d,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),
H)));null!=L.parentNode&&(A=A[A.length-1],f.add(h(c,d,new mxRectangle(A.x-this.roundDrop.width/2,A.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),L)))}else l=mxRectangle.fromRectangle(t),null!=t.shape&&null!=t.shape.boundingBox&&(l=mxRectangle.fromRectangle(t.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),A=this.graph.selectionCellsHandler.getHandler(t.cell),null!=A&&(l.x-=A.horizontalOffset/2,l.y-=A.verticalOffset/2,l.width+=A.horizontalOffset,
-l.height+=A.verticalOffset,null!=A.rotationShape&&null!=A.rotationShape.node&&"hidden"!=A.rotationShape.node.style.visibility&&"none"!=A.rotationShape.node.style.display&&null!=A.rotationShape.boundingBox&&l.add(A.rotationShape.boundingBox)),f.add(h(c,d,new mxRectangle(t.getCenterX()-this.triangleUp.width/2,l.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),y)),f.add(h(c,d,new mxRectangle(l.x+l.width,t.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),
-x)),f.add(h(c,d,new mxRectangle(t.getCenterX()-this.triangleDown.width/2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),D)),f.add(h(c,d,new mxRectangle(l.x-this.triangleLeft.width,t.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),z));null!=f&&f.grow(10)}I=mxConstants.DIRECTION_NORTH;F==x?I=mxConstants.DIRECTION_EAST:F==D||F==L?I=mxConstants.DIRECTION_SOUTH:F==z&&(I=mxConstants.DIRECTION_WEST);null!=w&&F==C&&(k=w);l=(null==m||a.isCellConnectable(b[m]))&&
-(a.model.isEdge(g)&&null!=m||a.model.isVertex(g)&&a.isCellConnectable(g));if(null!=t&&5E3<=G||t!=k&&(null==f||!mxUtils.contains(f,c,d)||500<G&&null==F&&l))if(r=!1,t=5E3>G&&G>this.dropTargetDelay||a.model.isEdge(g)?k:null,null!=t&&l){f=[H,L,y,x,D,z];for(l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);a.model.isEdge(g)?(A=k.absolutePoints,null!=A&&(l=A[0],A=A[A.length-1],f=a.tolerance,new mxRectangle(c-f,d-f,2*f,2*f),H.style.left=Math.floor(l.x-this.roundDrop.width/2)+"px",
+l.height+=A.verticalOffset,null!=A.rotationShape&&null!=A.rotationShape.node&&"hidden"!=A.rotationShape.node.style.visibility&&"none"!=A.rotationShape.node.style.display&&null!=A.rotationShape.boundingBox&&l.add(A.rotationShape.boundingBox)),f.add(h(c,d,new mxRectangle(t.getCenterX()-this.triangleUp.width/2,l.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),x)),f.add(h(c,d,new mxRectangle(l.x+l.width,t.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),
+y)),f.add(h(c,d,new mxRectangle(t.getCenterX()-this.triangleDown.width/2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),D)),f.add(h(c,d,new mxRectangle(l.x-this.triangleLeft.width,t.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),z));null!=f&&f.grow(10)}I=mxConstants.DIRECTION_NORTH;F==y?I=mxConstants.DIRECTION_EAST:F==D||F==L?I=mxConstants.DIRECTION_SOUTH:F==z&&(I=mxConstants.DIRECTION_WEST);null!=w&&F==C&&(k=w);l=(null==m||a.isCellConnectable(b[m]))&&
+(a.model.isEdge(g)&&null!=m||a.model.isVertex(g)&&a.isCellConnectable(g));if(null!=t&&5E3<=G||t!=k&&(null==f||!mxUtils.contains(f,c,d)||500<G&&null==F&&l))if(r=!1,t=5E3>G&&G>this.dropTargetDelay||a.model.isEdge(g)?k:null,null!=t&&l){f=[H,L,x,y,D,z];for(l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);a.model.isEdge(g)?(A=k.absolutePoints,null!=A&&(l=A[0],A=A[A.length-1],f=a.tolerance,new mxRectangle(c-f,d-f,2*f,2*f),H.style.left=Math.floor(l.x-this.roundDrop.width/2)+"px",
H.style.top=Math.floor(l.y-this.roundDrop.height/2)+"px",L.style.left=Math.floor(A.x-this.roundDrop.width/2)+"px",L.style.top=Math.floor(A.y-this.roundDrop.height/2)+"px",null==a.model.getTerminal(g,!0)&&a.container.appendChild(H),null==a.model.getTerminal(g,!1)&&a.container.appendChild(L))):(l=mxRectangle.fromRectangle(k),null!=k.shape&&null!=k.shape.boundingBox&&(l=mxRectangle.fromRectangle(k.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),A=this.graph.selectionCellsHandler.getHandler(k.cell),
-null!=A&&(l.x-=A.horizontalOffset/2,l.y-=A.verticalOffset/2,l.width+=A.horizontalOffset,l.height+=A.verticalOffset,null!=A.rotationShape&&null!=A.rotationShape.node&&"hidden"!=A.rotationShape.node.style.visibility&&"none"!=A.rotationShape.node.style.display&&null!=A.rotationShape.boundingBox&&l.add(A.rotationShape.boundingBox)),y.style.left=Math.floor(k.getCenterX()-this.triangleUp.width/2)+"px",y.style.top=Math.floor(l.y-this.triangleUp.height)+"px",x.style.left=Math.floor(l.x+l.width)+"px",x.style.top=
-Math.floor(k.getCenterY()-this.triangleRight.height/2)+"px",D.style.left=y.style.left,D.style.top=Math.floor(l.y+l.height)+"px",z.style.left=Math.floor(l.x-this.triangleLeft.width)+"px",z.style.top=x.style.top,"eastwest"!=k.style.portConstraint&&(a.container.appendChild(y),a.container.appendChild(D)),a.container.appendChild(x),a.container.appendChild(z));null!=k&&(u=a.selectionCellsHandler.getHandler(k.cell),null!=u&&null!=u.setHandlesVisible&&u.setHandlesVisible(!1));r=!0}else for(f=[H,L,y,x,D,z],
+null!=A&&(l.x-=A.horizontalOffset/2,l.y-=A.verticalOffset/2,l.width+=A.horizontalOffset,l.height+=A.verticalOffset,null!=A.rotationShape&&null!=A.rotationShape.node&&"hidden"!=A.rotationShape.node.style.visibility&&"none"!=A.rotationShape.node.style.display&&null!=A.rotationShape.boundingBox&&l.add(A.rotationShape.boundingBox)),x.style.left=Math.floor(k.getCenterX()-this.triangleUp.width/2)+"px",x.style.top=Math.floor(l.y-this.triangleUp.height)+"px",y.style.left=Math.floor(l.x+l.width)+"px",y.style.top=
+Math.floor(k.getCenterY()-this.triangleRight.height/2)+"px",D.style.left=x.style.left,D.style.top=Math.floor(l.y+l.height)+"px",z.style.left=Math.floor(l.x-this.triangleLeft.width)+"px",z.style.top=y.style.top,"eastwest"!=k.style.portConstraint&&(a.container.appendChild(x),a.container.appendChild(D)),a.container.appendChild(y),a.container.appendChild(z));null!=k&&(u=a.selectionCellsHandler.getHandler(k.cell),null!=u&&null!=u.setHandlesVisible&&u.setHandlesVisible(!1));r=!0}else for(f=[H,L,x,y,D,z],
l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);r||null==u||u.setHandlesVisible(!0);g=mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)||null!=w&&F==C?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);f=a.getModel();if(null!=g&&(null!=F||!a.isSplitTarget(g,b,e))){for(;null!=g&&!a.isValidDropTarget(g,b,e)&&f.isVertex(f.getParent(g));)g=f.getParent(g);if(a.view.currentRoot==g||!a.isValidRoot(g)&&0==a.getModel().getChildCount(g)||a.isCellLocked(g)||f.isEdge(g))g=
-null}return g});q.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var a=[H,L,C,y,x,D,z],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=t&&null!=u&&u.reset();F=E=w=t=u=null};return q};
+null}return g});q.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var a=[H,L,C,x,y,D,z],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=t&&null!=u&&u.reset();F=E=w=t=u=null};return q};
Sidebar.prototype.itemClicked=function(a,c,d,b){b=this.editorUi.editor.graph;b.container.focus();if(mxEvent.isAltDown(d)&&1==b.getSelectionCount()&&b.model.isVertex(b.getSelectionCell())){c=null;for(var f=0;f<a.length&&null==c;f++)b.model.isVertex(a[f])&&(c=f);null!=c&&(b.setSelectionCells(this.dropAndConnect(b.getSelectionCell(),a,mxEvent.isMetaDown(d)||mxEvent.isControlDown(d)?mxEvent.isShiftDown(d)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(d)?mxConstants.DIRECTION_EAST:
mxConstants.DIRECTION_SOUTH,c,d)),b.scrollCellToVisible(b.getSelectionCell()))}else if(mxEvent.isShiftDown(d)&&!b.isSelectionEmpty())this.updateShapes(a[0],b.getSelectionCells()),b.scrollCellToVisible(b.getSelectionCell());else{a=b.getFreeInsertPoint();if(mxEvent.isAltDown(d)){var f=b.getGraphBounds(),e=b.view.translate,h=b.view.scale;a.x=f.x/h-e.x+f.width/h+b.gridSize;a.y=f.y/h-e.y}c.drop(b,d,null,a.x,a.y,!0);null!=this.editorUi.hoverIcons&&(mxEvent.isTouchEvent(d)||mxEvent.isPenEvent(d))&&this.editorUi.hoverIcons.update(b.view.getState(b.getSelectionCell()))}};
Sidebar.prototype.addClickHandler=function(a,c,d){var b=c.mouseDown,f=c.mouseMove,e=c.mouseUp,h=this.editorUi.editor.graph.tolerance,g=null,k=this;c.mouseDown=function(c){b.apply(this,arguments);g=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));null!=this.dragElement&&(this.dragElement.style.display="none",mxUtils.setOpacity(a,50))};c.mouseMove=function(b){null!=this.dragElement&&"none"==this.dragElement.style.display&&null!=g&&(Math.abs(g.x-mxEvent.getClientX(b))>h||Math.abs(g.y-mxEvent.getClientY(b))>
@@ -2485,8 +2487,8 @@ mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(a,b){retur
e=null!=e?e.style:this.graph.getCellStyle(b[d]);"1"==mxUtils.getValue(e,"part","0")?(e=this.graph.model.getParent(b[d]),this.graph.model.isVertex(e)&&0>mxUtils.indexOf(b,e)&&c.push(e)):c.push(b[d])}return c};this.connectionHandler.createTargetVertex=function(a,b){var c=this.graph.view.getState(b),c=null!=c?c.style:this.graph.getCellStyle(b);mxUtils.getValue(c,"part",!1)&&(c=this.graph.model.getParent(b),this.graph.model.isVertex(c)&&(b=c));return mxConnectionHandler.prototype.createTargetVertex.apply(this,
arguments)};var p=new mxRubberband(this);this.getRubberband=function(){return p};var q=(new Date).getTime(),v=0,t=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;t.apply(this,arguments);a!=this.currentState?(q=(new Date).getTime(),v=0):v=(new Date).getTime()-q};var u=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<v||(null==
this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&u.apply(this,arguments)};var w=this.isToggleEvent;this.isToggleEvent=function(a){return w.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var r=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(a){return r.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&
-mxEvent.isTouchEvent(a.getEvent())};var y=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(y=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=y)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var x=this.click;this.click=
-function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!b||a.isConsumed())return x.apply(this,arguments);var c=b?a.sourceState.cell:a.getCell();null!=c&&(c=this.getLinkForCell(c),null!=c&&(this.isCustomLink(c)?this.customLinkClicked(c):this.openLink(c)));this.isEnabled()&&b&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var b=null==a.state&&null!=a.sourceState&&
+mxEvent.isTouchEvent(a.getEvent())};var x=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(x=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=x)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var y=this.click;this.click=
+function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!b||a.isConsumed())return y.apply(this,arguments);var c=b?a.sourceState.cell:a.getCell();null!=c&&(c=this.getLinkForCell(c),null!=c&&(this.isCustomLink(c)?this.customLinkClicked(c):this.openLink(c)));this.isEnabled()&&b&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var b=null==a.state&&null!=a.sourceState&&
this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(b?a.sourceState.cell:a.getCell())};var D=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return D.apply(this,arguments)};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,g){g=null!=g?g:[];
if(0<c||0<d){var f=this.getModel(),h=a+c,k=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=f.getRoot()));if(null!=e)for(var l=f.getChildCount(e),m=0;m<l;m++){var n=f.getChildAt(e,m),p=this.view.getState(n);if(null!=p&&this.isCellVisible(n)&&"1"!=mxUtils.getValue(p.style,"locked","0")){var A=mxUtils.getValue(p.style,mxConstants.STYLE_ROTATION)||0;0!=A&&(p=mxUtils.getBoundingBox(p,A));(f.isEdge(n)||f.isVertex(n))&&p.x>=a&&p.y+p.height<=k&&p.y>=b&&p.x+p.width<=h&&g.push(n);this.getAllCells(a,b,c,d,
n,g)}}}return g};var z=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:z.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var C=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=
@@ -2592,11 +2594,11 @@ HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstra
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var c=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,b){b=null!=b?b:!0;var d=this.getState(a);null!=d&&b&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&!d.invalid&&this.updateLineJumps(d)&&this.graph.cellRenderer.redraw(d,!1,this.isRendering());d=c.apply(this,
arguments);null!=d&&b&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var d=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return d.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var b=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){b.apply(this,arguments);this.graph.model.isEdge(a.cell)&&
1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,d=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(b,c,e){var g=new mxPoint(c,e);g.type=b;d.push(g);g=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==g||g.type!=b||g.x!=c||g.y!=e},g=.5*this.scale,c=!1,d=[],f=0;f<b.length-1;f++){for(var h=
-b[f+1],k=b[f],w=[],r=b[f+2];f<b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,r.x,r.y,h.x,h.y)<1*this.scale*this.scale;)h=r,f++,r=b[f+2];for(var c=e(0,k.x,k.y)||c,y=0;y<this.validEdges.length;y++){var x=this.validEdges[y],D=x.absolutePoints;if(null!=D&&mxUtils.intersects(a,x)&&"1"!=x.style.noJump)for(x=0;x<D.length-1;x++){for(var z=D[x+1],C=D[x],r=D[x+2];x<D.length-2&&mxUtils.ptSegDistSq(C.x,C.y,r.x,r.y,z.x,z.y)<1*this.scale*this.scale;)z=r,x++,r=D[x+2];r=mxUtils.intersection(k.x,k.y,h.x,h.y,C.x,C.y,z.x,
-z.y);if(null!=r&&(Math.abs(r.x-k.x)>g||Math.abs(r.y-k.y)>g)&&(Math.abs(r.x-h.x)>g||Math.abs(r.y-h.y)>g)&&(Math.abs(r.x-C.x)>g||Math.abs(r.y-C.y)>g)&&(Math.abs(r.x-z.x)>g||Math.abs(r.y-z.y)>g)){z=r.x-k.x;C=r.y-k.y;r={distSq:z*z+C*C,x:r.x,y:r.y};for(z=0;z<w.length;z++)if(w[z].distSq>r.distSq){w.splice(z,0,r);r=null;break}null==r||0!=w.length&&w[w.length-1].x===r.x&&w[w.length-1].y===r.y||w.push(r)}}}for(x=0;x<w.length;x++)c=e(1,w[x].x,w[x].y)||c}r=b[b.length-1];c=e(0,r.x,r.y)||c}a.routedPoints=d;return c}return!1};
+b[f+1],k=b[f],w=[],r=b[f+2];f<b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,r.x,r.y,h.x,h.y)<1*this.scale*this.scale;)h=r,f++,r=b[f+2];for(var c=e(0,k.x,k.y)||c,x=0;x<this.validEdges.length;x++){var y=this.validEdges[x],D=y.absolutePoints;if(null!=D&&mxUtils.intersects(a,y)&&"1"!=y.style.noJump)for(y=0;y<D.length-1;y++){for(var z=D[y+1],C=D[y],r=D[y+2];y<D.length-2&&mxUtils.ptSegDistSq(C.x,C.y,r.x,r.y,z.x,z.y)<1*this.scale*this.scale;)z=r,y++,r=D[y+2];r=mxUtils.intersection(k.x,k.y,h.x,h.y,C.x,C.y,z.x,
+z.y);if(null!=r&&(Math.abs(r.x-k.x)>g||Math.abs(r.y-k.y)>g)&&(Math.abs(r.x-h.x)>g||Math.abs(r.y-h.y)>g)&&(Math.abs(r.x-C.x)>g||Math.abs(r.y-C.y)>g)&&(Math.abs(r.x-z.x)>g||Math.abs(r.y-z.y)>g)){z=r.x-k.x;C=r.y-k.y;r={distSq:z*z+C*C,x:r.x,y:r.y};for(z=0;z<w.length;z++)if(w[z].distSq>r.distSq){w.splice(z,0,r);r=null;break}null==r||0!=w.length&&w[w.length-1].x===r.x&&w[w.length-1].y===r.y||w.push(r)}}}for(y=0;y<w.length;y++)c=e(1,w[y].x,w[y].y)||c}r=b[b.length-1];c=e(0,r.x,r.y)||c}a.routedPoints=d;return c}return!1};
var f=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){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)f.apply(this,arguments);else{var d=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"),h,k=!0,l=null,m=null;h=[];var r=null;a.begin();for(var y=0;y<this.state.routedPoints.length;y++){var x=this.state.routedPoints[y],D=new mxPoint(x.x/this.scale,x.y/this.scale);0==y?D=b[0]:y==this.state.routedPoints.length-1&&(D=b[b.length-1]);var z=!1;if(null!=l&&1==x.type){var C=this.state.routedPoints[y+1],x=C.x/this.scale-D.x,C=C.y/this.scale-D.y,x=x*x+C*C;null==r&&(r=new mxPoint(D.x-l.x,D.y-l.y),m=Math.sqrt(r.x*r.x+r.y*r.y),0<m?(r.x=r.x*e/m,r.y=r.y*e/m):r=null);x>e*e&&0<m&&
-(x=l.x-D.x,C=l.y-D.y,x=x*x+C*C,x>e*e&&(z=new mxPoint(D.x-r.x,D.y-r.y),x=new mxPoint(D.x+r.x,D.y+r.y),h.push(z),this.addPoints(a,h,c,d,!1,null,k),h=0>Math.round(r.x)||0==Math.round(r.x)&&0>=Math.round(r.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(z.x-r.y*h,z.y+r.x*h),a.lineTo(x.x-r.y*h,x.y+r.x*h),a.lineTo(x.x,x.y)):"arc"==g?(h*=1.3,a.curveTo(z.x-r.y*h,z.y+r.x*h,x.x-r.y*h,x.y+r.x*h,x.x,x.y)):(a.moveTo(x.x,x.y),k=!0),h=[x],z=!0))}else r=null;z||(h.push(D),l=D)}this.addPoints(a,h,c,d,!1,null,k);a.stroke()}};var e=
+"jumpStyle","none"),h,k=!0,l=null,m=null;h=[];var r=null;a.begin();for(var x=0;x<this.state.routedPoints.length;x++){var y=this.state.routedPoints[x],D=new mxPoint(y.x/this.scale,y.y/this.scale);0==x?D=b[0]:x==this.state.routedPoints.length-1&&(D=b[b.length-1]);var z=!1;if(null!=l&&1==y.type){var C=this.state.routedPoints[x+1],y=C.x/this.scale-D.x,C=C.y/this.scale-D.y,y=y*y+C*C;null==r&&(r=new mxPoint(D.x-l.x,D.y-l.y),m=Math.sqrt(r.x*r.x+r.y*r.y),0<m?(r.x=r.x*e/m,r.y=r.y*e/m):r=null);y>e*e&&0<m&&
+(y=l.x-D.x,C=l.y-D.y,y=y*y+C*C,y>e*e&&(z=new mxPoint(D.x-r.x,D.y-r.y),y=new mxPoint(D.x+r.x,D.y+r.y),h.push(z),this.addPoints(a,h,c,d,!1,null,k),h=0>Math.round(r.x)||0==Math.round(r.x)&&0>=Math.round(r.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(z.x-r.y*h,z.y+r.x*h),a.lineTo(y.x-r.y*h,y.y+r.x*h),a.lineTo(y.x,y.y)):"arc"==g?(h*=1.3,a.curveTo(z.x-r.y*h,z.y+r.x*h,y.x-r.y*h,y.y+r.x*h,y.x,y.y)):(a.moveTo(y.x,y.y),k=!0),h=[y],z=!0))}else r=null;z||(h.push(D),l=D)}this.addPoints(a,h,c,d,!1,null,k);a.stroke()}};var e=
mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)e.apply(this,arguments);else{b=this.getTerminalPort(a,b,d);var g=this.getNextPoint(a,c,d),f=this.graph.isOrthogonal(a),h=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),k=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=h)var l=Math.cos(-h),m=Math.sin(-h),g=mxUtils.getRotatedPoint(g,l,m,k);
l=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);l+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);g=this.getPerimeterPoint(b,g,0==h&&f,l);0!=h&&(l=Math.cos(h),m=Math.sin(h),g=mxUtils.getRotatedPoint(g,l,m,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,d,g),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,d,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);d=c=null;if(null!=a)for(var g=
0;g<a.length;g++){var f=this.graph.getConnectionPoint(b,a[g]);if(null!=f){var h=(f.x-e.x)*(f.x-e.x)+(f.y-e.y)*(f.y-e.y);if(null==d||h<d)c=f,d=h}}null!=c&&(e=c)}return e};var h=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var d=h.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(d=c.state.view.graph.replacePlaceholders(c.state.cell,d));return d};var g=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=
@@ -2622,7 +2624,7 @@ function(a,b,c){c=null!=c?c:{};for(var d in a){var e=b[d];null==c[e]&&(c[e]=a[d]
a.concat(this.model.getChildren(this.moveCells([h[g]],b,c,!1,this.model.getRoot())[0]));else a=this.moveCells(g.getChildren(h[0]),b,c,!1,this.getDefaultParent()),f[g.getChildAt(g.root,0).getId()]=this.getDefaultParent().getId();this.createCellMapping(e,k,f);this.updateCustomLinks(f,a);if(d){this.isGridEnabled()&&(b=this.snap(b),c=this.snap(c));var l=this.getBoundingBoxFromGeometry(a,!0);null!=l&&this.moveCells(a,b-l.x,c-l.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var b=
{},c=this.cloneCells(a,null,b),d=new mxDictionary,e=0;e<a.length;e++)d.put(a[e],!0);for(e=0;e<c.length;e++){var g=this.view.getState(a[e]);if(null!=g){var f=this.getCellGeometry(c[e]);null==f||!f.relative||this.model.isEdge(a[e])||d.get(this.model.getParent(a[e]))||(f.relative=!1,f.x=g.x/g.view.scale-g.view.translate.x,f.y=g.y/g.view.scale-g.view.translate.y)}}d=new mxCodec;g=new mxGraphModel;f=g.getChildAt(g.getRoot(),0);for(e=0;e<c.length;e++)g.add(f,c[e]);this.updateCustomLinks(this.createCellMapping(b,
this.createCellLookup(a)),c);return d.encode(g)};var e=Graph.prototype.moveCells;Graph.prototype.moveCells=function(a,b,c,d,g,f,h){h=null!=h?h:{};var k=e.apply(this,arguments);d&&this.updateCustomLinks(this.createCellMapping(h,this.createCellLookup(a)),k);return k};Graph.prototype.updateCustomLinks=function(a,b){for(var c=0;c<b.length;c++)null!=b[c]&&this.updateCustomLinksForCell(a,b[c])};Graph.prototype.updateCustomLinksForCell=function(a,b){};Graph.prototype.getAllConnectionConstraints=function(a,
-b){if(null!=a){var c=mxUtils.getValue(a.style,"points",null);if(null!=c){var d=[];try{for(var e=JSON.parse(c),c=0;c<e.length;c++){var g=e[c];d.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(U){}return d}if(null!=a.shape&&null!=a.shape.bounds){g=a.shape.direction;e=a.shape.bounds;c=a.shape.scale;d=e.width/c;e=e.height/c;if(g==mxConstants.DIRECTION_NORTH||g==mxConstants.DIRECTION_SOUTH)g=d,d=e,e=g;c=a.shape.getConstraints(a.style,
+b){if(null!=a){var c=mxUtils.getValue(a.style,"points",null);if(null!=c){var d=[];try{for(var e=JSON.parse(c),c=0;c<e.length;c++){var g=e[c];d.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(aa){}return d}if(null!=a.shape&&null!=a.shape.bounds){g=a.shape.direction;e=a.shape.bounds;c=a.shape.scale;d=e.width/c;e=e.height/c;if(g==mxConstants.DIRECTION_NORTH||g==mxConstants.DIRECTION_SOUTH)g=d,d=e,e=g;c=a.shape.getConstraints(a.style,
d,e);if(null!=c)return c;if(null!=a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);null!=b&&(b=mxUtils.getValue(b,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,
b,[a]))}};Graph.prototype.isValidRoot=function(a){for(var b=this.model.getChildCount(a),c=0,d=0;d<b;d++){var e=this.model.getChildAt(a,d);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||c++)}return 0<c||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(b,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(b,
"dropTarget","1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(b&&null!=a&&null!=this.layoutManager){var c=this.model.getParent(a);null!=c&&(c=this.layoutManager.getLayout(c),null!=c&&c.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=function(a){var b=
@@ -2655,12 +2657,12 @@ this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return b||"0"!=mxUt
c.length){c.sort(function(b,c){return a?b.x-c.x:b.y-c.y});f=this.view.translate;h=this.view.scale;e=e/h-(a?f.x:f.y);d=d/h-(a?f.x:f.y);this.getModel().beginUpdate();try{for(var k=(d-e)/(c.length-1),d=e,g=1;g<c.length-1;g++){var l=this.view.getState(this.model.getParent(c[g].cell)),m=this.getCellGeometry(c[g].cell),d=d+k;null!=m&&null!=l&&(m=m.clone(),a?m.x=Math.round(d-m.width/2)-l.origin.x:m.y=Math.round(d-m.height/2)-l.origin.y,this.getModel().setGeometry(c[g].cell,m))}}finally{this.getModel().endUpdate()}}}return b};
Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,c,d,e,g,f,h,k,l){var m=this.useCssTransforms;m&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;g=null!=g?g:
!0;f=null!=f?f:!0;var n=g||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==n)throw Error(mxResources.get("drawingEmpty"));var A=this.view.scale,p=mxUtils.createXmlDocument(),q=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=a&&(null!=q.style?q.style.backgroundColor=a:q.setAttribute("style","background-color:"+a));null==p.createElementNS?(q.setAttribute("xmlns",mxConstants.NS_SVG),q.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):
-q.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/A;var v=Math.max(1,Math.ceil(n.width*a)+2*c)+(l?5:0),Q=Math.max(1,Math.ceil(n.height*a)+2*c)+(l?5:0);q.setAttribute("version","1.1");q.setAttribute("width",v+"px");q.setAttribute("height",Q+"px");q.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+v+" "+Q);p.appendChild(q);var t=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"g"):p.createElement("g");q.appendChild(t);var r=this.createSvgCanvas(t);
-r.foOffset=e?-.5:0;r.textOffset=e?-.5:0;r.imageOffset=e?-.5:0;r.translate(Math.floor((c/b-n.x)/A),Math.floor((c/b-n.y)/A));var P=document.createElement("textarea"),u=r.createAlternateContent;r.createAlternateContent=function(a,b,c,d,e,g,f,h,k,l,m,n,p){var A=this.state;if(null!=this.foAltText&&(0==d||0!=A.fontSize&&g.length<5*d/A.fontSize)){var q=this.createElement("text");q.setAttribute("x",Math.round(d/2));q.setAttribute("y",Math.round((e+A.fontSize)/2));q.setAttribute("fill",A.fontColor||"black");
-q.setAttribute("text-anchor","middle");q.setAttribute("font-size",Math.round(A.fontSize)+"px");q.setAttribute("font-family",A.fontFamily);(A.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&q.setAttribute("font-weight","bold");(A.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&q.setAttribute("font-style","italic");(A.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&q.setAttribute("text-decoration","underline");try{return P.innerHTML=g,q.textContent=P.value,q}catch(fa){return u.apply(this,
-arguments)}}else return u.apply(this,arguments)};var x=this.backgroundImage;if(null!=x){b=A/b;var w=this.view.translate,D=new mxRectangle(w.x*b,w.y*b,x.width*b,x.height*b);mxUtils.intersects(n,D)&&r.image(w.x,w.y,x.width,x.height,x.src,!0)}r.scale(a);r.textEnabled=f;h=null!=h?h:this.createSvgImageExport();var z=h.drawCellState,ba=h.getLinkForCellState;h.getLinkForCellState=function(a,b){var c=ba.apply(this,arguments);return null==c||a.view.graph.isCustomLink(c)?null:c};h.drawCellState=function(a,
-b){for(var c=a.view.graph,d=c.isCellSelected(a.cell),e=c.model.getParent(a.cell);!g&&!d&&null!=e;)d=c.isCellSelected(e),e=c.model.getParent(e);(g||d)&&z.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),r);this.updateSvgLinks(q,k,!0);return q}finally{m&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,b,c){a=a.getElementsByTagName("a");for(var d=0;d<a.length;d++){var e=a[d].getAttribute("href");null==e&&(e=
-a[d].getAttribute("xlink:href"));null!=e&&(null!=b&&/^https?:\/\//.test(e)?a[d].setAttribute("target",b):c&&this.isCustomLink(e)&&a[d].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());
+q.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/A;var v=Math.max(1,Math.ceil(n.width*a)+2*c)+(l?5:0),P=Math.max(1,Math.ceil(n.height*a)+2*c)+(l?5:0);q.setAttribute("version","1.1");q.setAttribute("width",v+"px");q.setAttribute("height",P+"px");q.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+v+" "+P);p.appendChild(q);var t=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"g"):p.createElement("g");q.appendChild(t);var r=this.createSvgCanvas(t);
+r.foOffset=e?-.5:0;r.textOffset=e?-.5:0;r.imageOffset=e?-.5:0;r.translate(Math.floor((c/b-n.x)/A),Math.floor((c/b-n.y)/A));var R=document.createElement("textarea"),u=r.createAlternateContent;r.createAlternateContent=function(a,b,c,d,e,g,f,h,k,l,m,n,p){var A=this.state;if(null!=this.foAltText&&(0==d||0!=A.fontSize&&g.length<5*d/A.fontSize)){var q=this.createElement("text");q.setAttribute("x",Math.round(d/2));q.setAttribute("y",Math.round((e+A.fontSize)/2));q.setAttribute("fill",A.fontColor||"black");
+q.setAttribute("text-anchor","middle");q.setAttribute("font-size",Math.round(A.fontSize)+"px");q.setAttribute("font-family",A.fontFamily);(A.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&q.setAttribute("font-weight","bold");(A.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&q.setAttribute("font-style","italic");(A.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&q.setAttribute("text-decoration","underline");try{return R.innerHTML=g,q.textContent=R.value,q}catch(oa){return u.apply(this,
+arguments)}}else return u.apply(this,arguments)};var y=this.backgroundImage;if(null!=y){b=A/b;var w=this.view.translate,D=new mxRectangle(w.x*b,w.y*b,y.width*b,y.height*b);mxUtils.intersects(n,D)&&r.image(w.x,w.y,y.width,y.height,y.src,!0)}r.scale(a);r.textEnabled=f;h=null!=h?h:this.createSvgImageExport();var z=h.drawCellState,Y=h.getLinkForCellState;h.getLinkForCellState=function(a,b){var c=Y.apply(this,arguments);return null==c||a.view.graph.isCustomLink(c)?null:c};h.drawCellState=function(a,b){for(var c=
+a.view.graph,d=c.isCellSelected(a.cell),e=c.model.getParent(a.cell);!g&&!d&&null!=e;)d=c.isCellSelected(e),e=c.model.getParent(e);(g||d)&&z.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),r);this.updateSvgLinks(q,k,!0);return q}finally{m&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,b,c){a=a.getElementsByTagName("a");for(var d=0;d<a.length;d++){var e=a[d].getAttribute("href");null==e&&(e=a[d].getAttribute("xlink:href"));
+null!=e&&(null!=b&&/^https?:\/\//.test(e)?a[d].setAttribute("target",b):c&&this.isCustomLink(e)&&a[d].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());
return a};Graph.prototype.getParentByName=function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,b,c){for(;null!=a&&!(0<=mxUtils.indexOf(b,a.nodeName));){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&
"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=c.rows[0].cells,e=0,g=0;g<d.length;g++)var f=d[g].getAttribute("colspan"),e=e+(null!=f?parseInt(f):1);c=c.insertRow(b);for(g=0;g<e;g++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=
0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c=a.tBodies[0];for(d=0;d<c.rows.length;d++)e=c.rows[d].insertCell(b),mxUtils.br(e);return c.rows[0].cells[0<=b?b:c.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,b){if(0<=b)for(var c=a.tBodies[0].rows,d=0;d<c.length;d++)c[d].cells.length>b&&c[d].deleteCell(b)};Graph.prototype.pasteHtmlAtCaret=function(a){var b;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){b=
@@ -2714,15 +2716,15 @@ new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(g,
this.update(d,c),this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=c-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor=
"white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+
"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),b.consume()}};var r=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
-this.secondDiv=null);r.apply(this,arguments)};var y=(new Date).getTime(),x=0,D=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){D.apply(this,arguments);c!=this.currentTerminalState?(y=(new Date).getTime(),x=0):x=(new Date).getTime()-y;this.currentTerminalState=c};var z=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&
-2E3<x||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&z.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,
+this.secondDiv=null);r.apply(this,arguments)};var x=(new Date).getTime(),y=0,D=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){D.apply(this,arguments);c!=this.currentTerminalState?(x=(new Date).getTime(),y=0):y=(new Date).getTime()-x;this.currentTerminalState=c};var z=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&
+2E3<y||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&z.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,
d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE;this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var C=mxVertexHandler.prototype.createSizerShape;
mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return C.apply(this,arguments)};var E=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),
null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return E.apply(this,arguments)};var H=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=H.apply(this,arguments),b=[],c=0;c<a.length;c++)"1"!=mxUtils.getValue(a[c].style,"part","0")&&b.push(a[c]);return b};var L=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),
c=b.getParent(a.cell),d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):L.apply(this,arguments)};var I=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&I.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};
var F=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){F.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 J=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){J.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="")};var O=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){O.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var b=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&
+(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};var N=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){N.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var b=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(a,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));b()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,b){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,
this.editingHandler);var c=this.graph.getLinkForCell(this.state.cell),d=this.graph.getLinksForState(this.state);this.updateLinkHint(c,d);if(null!=c||null!=d&&0<d.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(b,c){if(null==b&&(null==c||0==c.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=b||null!=c&&0<c.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding=
"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=b&&(this.linkHint.appendChild(this.graph.createLinkForHint(b)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var d=document.createElement("img");d.setAttribute("src",Editor.editImage);d.setAttribute("title",mxResources.get("editLink"));d.setAttribute("width","11");d.setAttribute("height","11");d.style.marginLeft="10px";
@@ -2730,11 +2732,11 @@ d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d
d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=c)for(d=0;d<c.length;d++){var e=document.createElement("div");e.style.marginTop=null!=b||0<d?"6px":"0px";e.appendChild(this.graph.createLinkForHint(c[d].getAttribute("href"),mxUtils.getTextContent(c[d])));this.linkHint.appendChild(e)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;
var S=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){S.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=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(b,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell),c=this.graph.getLinksForState(this.state);if(null!=b||null!=c&&0<c.length)this.updateLinkHint(b,c),this.redrawHandles()};
-var R=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){R.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var G=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?
+var Q=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Q.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var G=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?
"none":"");G.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),c=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=c?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,b=null!=this.state.text?this.state.text.boundingBox:null;null==c&&(c=this.state);c=c.y+c.height;
null!=b&&(c=Math.max(c,b.y+b.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(c+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var K=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){K.apply(this,arguments);null!=this.linkHint&&(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 M=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(M.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=
-Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var ba=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ba.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Y=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Y.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
+this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var O=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(O.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=
+Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var Y=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Y.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var ea=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ea.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)}}();Format=function(a,c){this.editorUi=a;this.container=c};Format.prototype.labelIndex=0;Format.prototype.currentIndex=0;Format.prototype.showCloseButton=!0;Format.prototype.inactiveTabBackgroundColor="#f1f3f4";Format.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput curlyBracket singleArrow callout doubleArrow flexArrow card umlLifeline".split(" ");
Format.prototype.init=function(){var a=this.editorUi.editor,c=a.graph;this.update=mxUtils.bind(this,function(a,b){this.clearSelectionState();this.refresh()});c.getSelectionModel().addListener(mxEvent.CHANGE,this.update);c.addListener(mxEvent.EDITING_STARTED,this.update);c.addListener(mxEvent.EDITING_STOPPED,this.update);c.getModel().addListener(mxEvent.CHANGE,this.update);c.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){this.refresh()}));a.addListener("autosaveChanged",mxUtils.bind(this,function(){this.refresh()}));
this.refresh()};Format.prototype.clearSelectionState=function(){this.selectionState=null};Format.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};Format.prototype.createSelectionState=function(){for(var a=this.editorUi.editor.graph.getSelectionCells(),c=this.initSelectionState(),d=0;d<a.length;d++)this.updateSelectionStateForCell(c,a[d],a);return c};
@@ -2807,10 +2809,10 @@ BaseFormatPanel.prototype.getUnitStep=function(){switch(this.editorUi.editor.gra
ArrangePanel.prototype.addGeometry=function(a){var c=this,d=this.editorUi,b=d.editor.graph,f=this.format.getSelectionState(),e=this.createPanel();e.style.paddingBottom="8px";var h=document.createElement("div");h.style.position="absolute";h.style.width="50px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("size"));e.appendChild(h);var g,k,l,m,n=this.addUnitInput(e,this.getUnit(),84,44,function(){g.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),
p=this.addUnitInput(e,this.getUnit(),20,44,function(){k.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),q=document.createElement("div");q.className="geSprite geSprite-fit";q.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");q.style.position="relative";q.style.cursor="pointer";q.style.marginTop="-3px";q.style.border="0px";q.style.left="52px";mxUtils.setOpacity(q,50);mxEvent.addListener(q,"mouseenter",function(){mxUtils.setOpacity(q,
100)});mxEvent.addListener(q,"mouseleave",function(){mxUtils.setOpacity(q,50)});mxEvent.addListener(q,"click",function(){d.actions.get("autosize").funct()});e.appendChild(q);this.addLabel(e,mxResources.get("width"),84);this.addLabel(e,mxResources.get("height"),20);mxUtils.br(e);h=document.createElement("div");h.style.paddingTop="8px";h.style.paddingRight="20px";h.style.whiteSpace="nowrap";h.style.textAlign="right";var v=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,
-null,"fixed","null");v.style.width="100%";h.appendChild(v);e.appendChild(h);var t=v.getElementsByTagName("input")[0];this.addKeyHandler(n,y);this.addKeyHandler(p,y);g=this.addGeometryHandler(n,function(a,b){0<a.width&&(b=Math.max(1,c.fromUnit(b)),t.checked&&(a.height=Math.round(a.height*b*100/a.width)/100),a.width=b)});k=this.addGeometryHandler(p,function(a,b){0<a.height&&(b=Math.max(1,c.fromUnit(b)),t.checked&&(a.width=Math.round(a.width*b*100/a.height)/100),a.height=b)});a.appendChild(e);var u=
+null,"fixed","null");v.style.width="100%";h.appendChild(v);e.appendChild(h);var t=v.getElementsByTagName("input")[0];this.addKeyHandler(n,x);this.addKeyHandler(p,x);g=this.addGeometryHandler(n,function(a,b){0<a.width&&(b=Math.max(1,c.fromUnit(b)),t.checked&&(a.height=Math.round(a.height*b*100/a.width)/100),a.width=b)});k=this.addGeometryHandler(p,function(a,b){0<a.height&&(b=Math.max(1,c.fromUnit(b)),t.checked&&(a.width=Math.round(a.width*b*100/a.height)/100),a.height=b)});a.appendChild(e);var u=
this.createPanel();u.style.paddingBottom="30px";h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("position"));u.appendChild(h);var w=this.addUnitInput(u,this.getUnit(),84,44,function(){l.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),r=this.addUnitInput(u,this.getUnit(),20,44,function(){m.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());
-mxUtils.br(u);this.addLabel(u,mxResources.get("left"),84);this.addLabel(u,mxResources.get("top"),20);var y=mxUtils.bind(this,function(a,c,d){f=this.format.getSelectionState();if(f.containsLabel||f.vertices.length!=b.getSelectionCount()||null==f.width||null==f.height)e.style.display="none";else{e.style.display="";if(d||document.activeElement!=n)n.value=this.inUnit(f.width)+(""==f.width?"":" "+this.getUnit());if(d||document.activeElement!=p)p.value=this.inUnit(f.height)+(""==f.height?"":" "+this.getUnit())}if(f.vertices.length==
-b.getSelectionCount()&&null!=f.x&&null!=f.y){u.style.display="";if(d||document.activeElement!=w)w.value=this.inUnit(f.x)+(""==f.x?"":" "+this.getUnit());if(d||document.activeElement!=r)r.value=this.inUnit(f.y)+(""==f.y?"":" "+this.getUnit())}else u.style.display="none"});this.addKeyHandler(w,y);this.addKeyHandler(r,y);b.getModel().addListener(mxEvent.CHANGE,y);this.listeners.push({destroy:function(){b.getModel().removeListener(y)}});y();l=this.addGeometryHandler(w,function(a,b){b=c.fromUnit(b);a.relative?
+mxUtils.br(u);this.addLabel(u,mxResources.get("left"),84);this.addLabel(u,mxResources.get("top"),20);var x=mxUtils.bind(this,function(a,c,d){f=this.format.getSelectionState();if(f.containsLabel||f.vertices.length!=b.getSelectionCount()||null==f.width||null==f.height)e.style.display="none";else{e.style.display="";if(d||document.activeElement!=n)n.value=this.inUnit(f.width)+(""==f.width?"":" "+this.getUnit());if(d||document.activeElement!=p)p.value=this.inUnit(f.height)+(""==f.height?"":" "+this.getUnit())}if(f.vertices.length==
+b.getSelectionCount()&&null!=f.x&&null!=f.y){u.style.display="";if(d||document.activeElement!=w)w.value=this.inUnit(f.x)+(""==f.x?"":" "+this.getUnit());if(d||document.activeElement!=r)r.value=this.inUnit(f.y)+(""==f.y?"":" "+this.getUnit())}else u.style.display="none"});this.addKeyHandler(w,x);this.addKeyHandler(r,x);b.getModel().addListener(mxEvent.CHANGE,x);this.listeners.push({destroy:function(){b.getModel().removeListener(x)}});x();l=this.addGeometryHandler(w,function(a,b){b=c.fromUnit(b);a.relative?
a.offset.x=b:a.x=b});m=this.addGeometryHandler(r,function(a,b){b=c.fromUnit(b);a.relative?a.offset.y=b:a.y=b});a.appendChild(u)};
ArrangePanel.prototype.addGeometryHandler=function(a,c){function d(d){if(""!=a.value){var g=parseFloat(a.value);if(isNaN(g))a.value=f+" "+e.getUnit();else if(g!=f){b.getModel().beginUpdate();try{for(var h=b.getSelectionCells(),l=0;l<h.length;l++)if(b.getModel().isVertex(h[l])){var m=b.getCellGeometry(h[l]);null!=m&&(m=m.clone(),c(m,g),b.getModel().setGeometry(h[l],m))}}finally{b.getModel().endUpdate()}f=g;a.value=g+" "+e.getUnit()}}mxEvent.consume(d)}var b=this.editorUi.editor.graph,f=null,e=this;
mxEvent.addListener(a,"blur",d);mxEvent.addListener(a,"change",d);mxEvent.addListener(a,"focus",function(){f=a.value});return d};
@@ -2830,52 +2832,52 @@ TextFormatPanel.prototype.addFont=function(a){function c(a,b){mxClient.IS_IE&&(m
")");var m=this.editorUi.toolbar.addItems(["vertical"],g,!0)[0];mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(g);this.styleButtons(l);this.styleButtons([m]);var n=e.cloneNode(!1);n.style.marginLeft="-3px";n.style.paddingBottom="0px";var p=function(a){return function(){return a()}},q=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),b.cellEditor.isContentEditing()?function(a){b.cellEditor.alignText(mxConstants.ALIGN_LEFT,a)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],
[mxConstants.ALIGN_LEFT])),n),v=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),b.cellEditor.isContentEditing()?function(a){b.cellEditor.alignText(mxConstants.ALIGN_CENTER,a)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),n),t=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),b.cellEditor.isContentEditing()?function(a){b.cellEditor.alignText(mxConstants.ALIGN_RIGHT,a)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],
[mxConstants.ALIGN_RIGHT])),n);this.styleButtons([q,v,t]);if(b.cellEditor.isContentEditing()){var u=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},g);this.styleButtons([u]);u.firstChild.style.background="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)";
-u.firstChild.style.backgroundPosition="2px 2px";u.firstChild.style.backgroundSize="18px 18px";this.styleButtons([u])}var w=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),n),r=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),n),y=this.editorUi.toolbar.addButton("geSprite-bottom",
-mxResources.get("bottom"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),n);this.styleButtons([w,r,y]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(n);var x,D,z,C,E,H,L;b.cellEditor.isContentEditing()?(w.style.display="none",r.style.display="none",y.style.display="none",m.style.display="none",z=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==z.style.opacity&&document.execCommand("justifyfull",
-!1,null)},n),z.style.marginRight="9px",z.style.opacity=1,this.styleButtons([z,x=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},n),D=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},n)]),x.style.marginLeft="9px",p=n.cloneNode(!1),p.style.paddingTop="4px",n=[this.editorUi.toolbar.addButton("geSprite-orderedlist",
+u.firstChild.style.backgroundPosition="2px 2px";u.firstChild.style.backgroundSize="18px 18px";this.styleButtons([u])}var w=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),n),r=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),n),x=this.editorUi.toolbar.addButton("geSprite-bottom",
+mxResources.get("bottom"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),n);this.styleButtons([w,r,x]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(n);var y,D,z,C,E,H,L;b.cellEditor.isContentEditing()?(w.style.display="none",r.style.display="none",x.style.display="none",m.style.display="none",z=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==z.style.opacity&&document.execCommand("justifyfull",
+!1,null)},n),z.style.marginRight="9px",z.style.opacity=1,this.styleButtons([z,y=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},n),D=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},n)]),y.style.marginLeft="9px",p=n.cloneNode(!1),p.style.paddingTop="4px",n=[this.editorUi.toolbar.addButton("geSprite-orderedlist",
mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",
!1,null)},p),this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){b.cellEditor.toggleViewMode()},p)],this.styleButtons(n),n[n.length-2].style.marginLeft="9px",mxClient.IS_QUIRKS&&(mxUtils.br(a),p.style.height="40"),a.appendChild(p)):(l[2].style.marginRight="9px",t.style.marginRight="9px");n=e.cloneNode(!1);n.style.marginLeft=
"0px";n.style.paddingTop="8px";n.style.paddingBottom="4px";n.style.fontWeight="normal";mxUtils.write(n,mxResources.get("position"));var I=document.createElement("select");I.style.position="absolute";I.style.right="20px";I.style.width="97px";I.style.marginTop="-2px";for(var u="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),F={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,
mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,
mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},p=0;p<u.length;p++){var J=document.createElement("option");J.setAttribute("value",u[p]);mxUtils.write(J,mxResources.get(u[p]));I.appendChild(J)}n.appendChild(I);u=e.cloneNode(!1);u.style.marginLeft="0px";u.style.paddingTop=
-"4px";u.style.paddingBottom="4px";u.style.fontWeight="normal";mxUtils.write(u,mxResources.get("writingDirection"));var O=document.createElement("select");O.style.position="absolute";O.style.right="20px";O.style.width="97px";O.style.marginTop="-2px";for(var J=["automatic","leftToRight","rightToLeft"],S={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},p=0;p<J.length;p++){var R=document.createElement("option");R.setAttribute("value",J[p]);mxUtils.write(R,
-mxResources.get(J[p]));O.appendChild(R)}u.appendChild(O);b.isEditing()||(a.appendChild(n),mxEvent.addListener(I,"change",function(a){b.getModel().beginUpdate();try{var c=F[I.value];null!=c&&(b.setCellStyles(mxConstants.STYLE_LABEL_POSITION,c[0],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,c[1],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_ALIGN,c[2],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,c[3],b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)}),
-a.appendChild(u),mxEvent.addListener(O,"change",function(a){b.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,S[O.value],b.getSelectionCells());mxEvent.consume(a)}));var G=document.createElement("input");G.style.textAlign="right";G.style.marginTop="4px";mxClient.IS_QUIRKS||(G.style.position="absolute",G.style.right="32px");G.style.width="46px";G.style.height=mxClient.IS_QUIRKS?"21px":"17px";g.appendChild(G);var K=null,n=this.installInputHandler(G,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,
+"4px";u.style.paddingBottom="4px";u.style.fontWeight="normal";mxUtils.write(u,mxResources.get("writingDirection"));var N=document.createElement("select");N.style.position="absolute";N.style.right="20px";N.style.width="97px";N.style.marginTop="-2px";for(var J=["automatic","leftToRight","rightToLeft"],S={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},p=0;p<J.length;p++){var Q=document.createElement("option");Q.setAttribute("value",J[p]);mxUtils.write(Q,
+mxResources.get(J[p]));N.appendChild(Q)}u.appendChild(N);b.isEditing()||(a.appendChild(n),mxEvent.addListener(I,"change",function(a){b.getModel().beginUpdate();try{var c=F[I.value];null!=c&&(b.setCellStyles(mxConstants.STYLE_LABEL_POSITION,c[0],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,c[1],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_ALIGN,c[2],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,c[3],b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)}),
+a.appendChild(u),mxEvent.addListener(N,"change",function(a){b.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,S[N.value],b.getSelectionCells());mxEvent.consume(a)}));var G=document.createElement("input");G.style.textAlign="right";G.style.marginTop="4px";mxClient.IS_QUIRKS||(G.style.position="absolute",G.style.right="32px");G.style.width="46px";G.style.height=mxClient.IS_QUIRKS?"21px":"17px";g.appendChild(G);var K=null,n=this.installInputHandler(G,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,
1,999," pt",function(a){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=function(c,e){null!=b.cellEditor.textarea&&c!=b.cellEditor.textarea&&b.cellEditor.textarea.contains(c)&&(e||d.containsNode(c,!0))&&("FONT"==c.nodeName?(c.removeAttribute("size"),c.style.fontSize=a+"px"):mxUtils.getCurrentStyle(c).fontSize!=a+"px"&&(mxUtils.getCurrentStyle(c.parentNode).fontSize!=a+"px"?c.style.fontSize=a+"px":c.style.fontSize=""))},d=window.getSelection(),e=0<d.rangeCount?d.getRangeAt(0).commonAncestorContainer:
b.cellEditor.textarea;e!=b.cellEditor.textarea&&e.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");e!=b.cellEditor.textarea&&(e=e.parentNode);if(null!=e&&e.nodeType==mxConstants.NODETYPE_ELEMENT){var g=e.getElementsByTagName("*");c(e);for(e=0;e<g.length;e++)c(g[e])}G.value=a+" pt"}else if(window.getSelection||document.selection)if(c=function(a,b){for(;null!=b;){if(b===a)return!0;b=b.parentNode}return!1},g=null,document.selection?g=document.selection.createRange().parentElement():
(d=window.getSelection(),0<d.rangeCount&&(g=d.getRangeAt(0).commonAncestorContainer)),null!=g&&c(b.cellEditor.textarea,g))for(K=a,document.execCommand("fontSize",!1,"4"),g=b.cellEditor.textarea.getElementsByTagName("font"),e=0;e<g.length;e++)if("4"==g[e].getAttribute("size")){g[e].removeAttribute("size");g[e].style.fontSize=K+"px";window.setTimeout(function(){G.value=K+" pt";K=null},0);break}},!0),n=this.createStepper(G,n,1,10,!0,Menus.prototype.defaultFontSize);n.style.display=G.style.display;n.style.marginTop=
-"4px";mxClient.IS_QUIRKS||(n.style.right="20px");g.appendChild(n);g=k.getElementsByTagName("div")[0];g.style.cssFloat="right";var M=null,ba="#ffffff",Y=null,A="#000000",Q=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return ba},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){M=a},destroy:function(){M=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),
-mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff",null,function(a){b.updateLabelElements(b.getSelectionCells(),function(a){a.style.backgroundColor=null})});Q.style.fontWeight="bold";var P=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");P.style.fontWeight="bold";g=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return A},function(a){if(mxClient.IS_FF){for(var c=b.cellEditor.textarea.getElementsByTagName("font"),
+"4px";mxClient.IS_QUIRKS||(n.style.right="20px");g.appendChild(n);g=k.getElementsByTagName("div")[0];g.style.cssFloat="right";var O=null,Y="#ffffff",ea=null,A="#000000",P=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return Y},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){O=a},destroy:function(){O=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),
+mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff",null,function(a){b.updateLabelElements(b.getSelectionCells(),function(a){a.style.backgroundColor=null})});P.style.fontWeight="bold";var R=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");R.style.fontWeight="bold";g=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return A},function(a){if(mxClient.IS_FF){for(var c=b.cellEditor.textarea.getElementsByTagName("font"),
d=[],e=0;e<c.length;e++)d.push({node:c[e],color:c[e].getAttribute("color")});document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent");a=b.cellEditor.textarea.getElementsByTagName("font");for(e=0;e<a.length;e++)if(e>=d.length||a[e]!=d[e].node||a[e]==d[e].node&&a[e].getAttribute("color")!=d[e].color){d=a[e].firstChild;if(null!=d&&"A"==d.nodeName&&null==d.nextSibling&&null!=d.firstChild){a[e].parentNode.insertBefore(d,a[e]);for(c=d.firstChild;null!=c;){var g=c.nextSibling;a[e].appendChild(c);
-c=g}d.appendChild(a[e])}break}}else document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){Y=a},destroy:function(){Y=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(a){Q.style.display=null==a||a==mxConstants.NONE?"none":"";P.style.display=Q.style.display},function(a){null==a||a==mxConstants.NONE?b.setCellStyles(mxConstants.STYLE_NOLABEL,"1",b.getSelectionCells()):b.setCellStyles(mxConstants.STYLE_NOLABEL,
-null,b.getSelectionCells());b.updateLabelElements(b.getSelectionCells(),function(a){a.removeAttribute("color");a.style.color=null})});g.style.fontWeight="bold";h.appendChild(g);h.appendChild(Q);b.cellEditor.isContentEditing()||h.appendChild(P);a.appendChild(h);h=this.createPanel();h.style.paddingTop="2px";h.style.paddingBottom="4px";g=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0);g.style.fontWeight="bold";f.containsLabel||f.autoSize||
-0!=f.edges.length||h.appendChild(g);g=this.createCellOption(mxResources.get("formattedText"),"html","0",null,null,null,d.actions.get("formattedText"));g.style.fontWeight="bold";h.appendChild(g);g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="28px";g.style.fontWeight="normal";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("spacing"));g.appendChild(n);var T,da,V,
-U,ka,ca=this.addUnitInput(g,"pt",91,44,function(){T.apply(this,arguments)}),ga=this.addUnitInput(g,"pt",20,44,function(){da.apply(this,arguments)});mxUtils.br(g);this.addLabel(g,mxResources.get("top"),91);this.addLabel(g,mxResources.get("global"),20);mxUtils.br(g);mxUtils.br(g);var ha=this.addUnitInput(g,"pt",162,44,function(){V.apply(this,arguments)}),Z=this.addUnitInput(g,"pt",91,44,function(){U.apply(this,arguments)}),aa=this.addUnitInput(g,"pt",20,44,function(){ka.apply(this,arguments)});mxUtils.br(g);
-this.addLabel(g,mxResources.get("left"),162);this.addLabel(g,mxResources.get("bottom"),91);this.addLabel(g,mxResources.get("right"),20);if(b.cellEditor.isContentEditing()){var ea=null,ia=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(a){var c=""==a.value?120:parseInt(a.value),c=Math.max(0,isNaN(c)?120:c);null!=ea&&(b.cellEditor.restoreSelection(ea),ea=null);for(var d=b.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode;
-null!=d&&d==b.cellEditor.textarea&&null!=b.cellEditor.textarea.firstChild&&("P"!=b.cellEditor.textarea.firstChild.nodeName&&(b.cellEditor.textarea.innerHTML="<p>"+b.cellEditor.textarea.innerHTML+"</p>"),d=b.cellEditor.textarea.firstChild);null!=d&&null!=b.cellEditor.textarea&&d!=b.cellEditor.textarea&&b.cellEditor.textarea.contains(d)&&(d.style.lineHeight=c+"%");a.value=c+" %"},function(a){ia=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==b.cellEditor.textarea&&(ea=b.cellEditor.saveSelection())});
-mxEvent.addListener(a,"touchstart",function(){document.activeElement==b.cellEditor.textarea&&(ea=b.cellEditor.saveSelection())});a.value="120 %"}));h=e.cloneNode(!1);h.style.paddingLeft="0px";g=this.editorUi.toolbar.addItems(["link","image"],h,!0);n=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},h),this.editorUi.toolbar.addMenuFunctionInContainer(h,"geSprite-table",mxResources.get("table"),
+c=g}d.appendChild(a[e])}break}}else document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){ea=a},destroy:function(){ea=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(a){P.style.display=null==a||a==mxConstants.NONE?"none":"";R.style.display=P.style.display},function(a){null==a||a==mxConstants.NONE?b.setCellStyles(mxConstants.STYLE_NOLABEL,"1",b.getSelectionCells()):b.setCellStyles(mxConstants.STYLE_NOLABEL,
+null,b.getSelectionCells());b.updateLabelElements(b.getSelectionCells(),function(a){a.removeAttribute("color");a.style.color=null})});g.style.fontWeight="bold";h.appendChild(g);h.appendChild(P);b.cellEditor.isContentEditing()||h.appendChild(R);a.appendChild(h);h=this.createPanel();h.style.paddingTop="2px";h.style.paddingBottom="4px";g=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0);g.style.fontWeight="bold";f.containsLabel||f.autoSize||
+0!=f.edges.length||h.appendChild(g);g=this.createCellOption(mxResources.get("formattedText"),"html","0",null,null,null,d.actions.get("formattedText"));g.style.fontWeight="bold";h.appendChild(g);g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="28px";g.style.fontWeight="normal";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("spacing"));g.appendChild(n);var T,W,ca,
+aa,U,fa=this.addUnitInput(g,"pt",91,44,function(){T.apply(this,arguments)}),da=this.addUnitInput(g,"pt",20,44,function(){W.apply(this,arguments)});mxUtils.br(g);this.addLabel(g,mxResources.get("top"),91);this.addLabel(g,mxResources.get("global"),20);mxUtils.br(g);mxUtils.br(g);var ga=this.addUnitInput(g,"pt",162,44,function(){ca.apply(this,arguments)}),ha=this.addUnitInput(g,"pt",91,44,function(){aa.apply(this,arguments)}),ba=this.addUnitInput(g,"pt",20,44,function(){U.apply(this,arguments)});mxUtils.br(g);
+this.addLabel(g,mxResources.get("left"),162);this.addLabel(g,mxResources.get("bottom"),91);this.addLabel(g,mxResources.get("right"),20);if(b.cellEditor.isContentEditing()){var Z=null,ja=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(a){var c=""==a.value?120:parseInt(a.value),c=Math.max(0,isNaN(c)?120:c);null!=Z&&(b.cellEditor.restoreSelection(Z),Z=null);for(var d=b.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode;
+null!=d&&d==b.cellEditor.textarea&&null!=b.cellEditor.textarea.firstChild&&("P"!=b.cellEditor.textarea.firstChild.nodeName&&(b.cellEditor.textarea.innerHTML="<p>"+b.cellEditor.textarea.innerHTML+"</p>"),d=b.cellEditor.textarea.firstChild);null!=d&&null!=b.cellEditor.textarea&&d!=b.cellEditor.textarea&&b.cellEditor.textarea.contains(d)&&(d.style.lineHeight=c+"%");a.value=c+" %"},function(a){ja=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==b.cellEditor.textarea&&(Z=b.cellEditor.saveSelection())});
+mxEvent.addListener(a,"touchstart",function(){document.activeElement==b.cellEditor.textarea&&(Z=b.cellEditor.saveSelection())});a.value="120 %"}));h=e.cloneNode(!1);h.style.paddingLeft="0px";g=this.editorUi.toolbar.addItems(["link","image"],h,!0);n=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},h),this.editorUi.toolbar.addMenuFunctionInContainer(h,"geSprite-table",mxResources.get("table"),
!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a)}))];this.styleButtons(g);this.styleButtons(n);g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="10px";g.appendChild(this.createTitle(mxResources.get("insert")));g.appendChild(h);a.appendChild(g);mxClient.IS_QUIRKS&&(g.style.height="70");g=e.cloneNode(!1);g.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=
-E&&b.insertColumn(E,null!=H?H.cellIndex:0)}catch(W){this.editorUi.handleError(W)}}),g),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=E&&b.insertColumn(E,null!=H?H.cellIndex+1:-1)}catch(W){this.editorUi.handleError(W)}}),g),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=E&&null!=H&&b.deleteColumn(E,H.cellIndex)}catch(W){this.editorUi.handleError(W)}}),
-g),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=E&&null!=L&&b.insertRow(E,L.sectionRowIndex)}catch(W){this.editorUi.handleError(W)}}),g),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=E&&null!=L&&b.insertRow(E,L.sectionRowIndex+1)}catch(W){this.editorUi.handleError(W)}}),g),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),
-mxUtils.bind(this,function(){try{null!=E&&null!=L&&b.deleteRow(E,L.sectionRowIndex)}catch(W){this.editorUi.handleError(W)}}),g)];this.styleButtons(n);n[2].style.marginRight="9px";h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("table")));h.appendChild(g);mxClient.IS_QUIRKS&&(mxUtils.br(a),h.style.height="70");e=e.cloneNode(!1);e.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),
+E&&b.insertColumn(E,null!=H?H.cellIndex:0)}catch(V){this.editorUi.handleError(V)}}),g),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=E&&b.insertColumn(E,null!=H?H.cellIndex+1:-1)}catch(V){this.editorUi.handleError(V)}}),g),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=E&&null!=H&&b.deleteColumn(E,H.cellIndex)}catch(V){this.editorUi.handleError(V)}}),
+g),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=E&&null!=L&&b.insertRow(E,L.sectionRowIndex)}catch(V){this.editorUi.handleError(V)}}),g),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=E&&null!=L&&b.insertRow(E,L.sectionRowIndex+1)}catch(V){this.editorUi.handleError(V)}}),g),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),
+mxUtils.bind(this,function(){try{null!=E&&null!=L&&b.deleteRow(E,L.sectionRowIndex)}catch(V){this.editorUi.handleError(V)}}),g)];this.styleButtons(n);n[2].style.marginRight="9px";h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("table")));h.appendChild(g);mxClient.IS_QUIRKS&&(mxUtils.br(a),h.style.height="70");e=e.cloneNode(!1);e.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),
mxUtils.bind(this,function(a){if(null!=E){var c=E.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(c,function(c){var d=null==H||null!=a&&mxEvent.isShiftDown(a)?E:H;b.processElements(d,function(a){a.style.border=null});null==c||c==mxConstants.NONE?(d.removeAttribute("border"),d.style.border="",d.style.borderCollapse=
""):(d.setAttribute("border","1"),d.style.border="1px solid "+c,d.style.borderCollapse="collapse")})}}),e),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(a){if(null!=E){var c=E.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(c,
function(c){var d=null==H||null!=a&&mxEvent.isShiftDown(a)?E:H;b.processElements(d,function(a){a.style.backgroundColor=null});d.style.backgroundColor=null==c||c==mxConstants.NONE?"":c})}}),e),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=E){var a=E.getAttribute("cellPadding")||0,a=new FilenameDialog(d,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0<a.length?E.setAttribute("cellPadding",a):E.removeAttribute("cellPadding")}),mxResources.get("spacing"));
d.showDialog(a.container,300,80,!0,!0);a.init()}},e),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=E&&E.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=E&&E.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=E&&E.setAttribute("align","right")},e)];this.styleButtons(n);n[2].style.marginRight="9px";mxClient.IS_QUIRKS&&
(mxUtils.br(h),mxUtils.br(h));h.appendChild(e);a.appendChild(h);C=h}else a.appendChild(h),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(g);var X=mxUtils.bind(this,function(a,b,d){f=this.format.getSelectionState();a=mxUtils.getValue(f.style,mxConstants.STYLE_FONTSTYLE,0);c(l[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(l[1],(a&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);c(l[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);
k.firstChild.nodeValue=mxUtils.getValue(f.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);c(m,"0"==mxUtils.getValue(f.style,mxConstants.STYLE_HORIZONTAL,"1"));if(d||document.activeElement!=G)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),G.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);c(q,a==mxConstants.ALIGN_LEFT);c(v,a==mxConstants.ALIGN_CENTER);c(t,a==mxConstants.ALIGN_RIGHT);
-a=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(w,a==mxConstants.ALIGN_TOP);c(r,a==mxConstants.ALIGN_MIDDLE);c(y,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(f.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);I.value=a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_TOP?"topLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_TOP?"top":a==mxConstants.ALIGN_RIGHT&&
-b==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(f.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);a==mxConstants.TEXT_DIRECTION_RTL?O.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?
-O.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(O.value="automatic");if(d||document.activeElement!=ga)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING,2)),ga.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ca)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_TOP,0)),ca.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=aa)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_RIGHT,0)),aa.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=
-Z)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Z.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ha)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_LEFT,0)),ha.value=isNaN(a)?"":a+" pt"});da=this.installInputHandler(ga,mxConstants.STYLE_SPACING,2,-999,999," pt");T=this.installInputHandler(ca,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");ka=this.installInputHandler(aa,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");U=this.installInputHandler(Z,
-mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");V=this.installInputHandler(ha,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(G,X);this.addKeyHandler(ga,X);this.addKeyHandler(ca,X);this.addKeyHandler(aa,X);this.addKeyHandler(Z,X);this.addKeyHandler(ha,X);b.getModel().addListener(mxEvent.CHANGE,X);this.listeners.push({destroy:function(){b.getModel().removeListener(X)}});X();if(b.cellEditor.isContentEditing()){var la=!1,e=function(){la||(la=!0,window.setTimeout(function(){for(var a=
+a=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(w,a==mxConstants.ALIGN_TOP);c(r,a==mxConstants.ALIGN_MIDDLE);c(x,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(f.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);I.value=a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_TOP?"topLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_TOP?"top":a==mxConstants.ALIGN_RIGHT&&
+b==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(f.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);a==mxConstants.TEXT_DIRECTION_RTL?N.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?
+N.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(N.value="automatic");if(d||document.activeElement!=da)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING,2)),da.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=fa)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_TOP,0)),fa.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ba)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_RIGHT,0)),ba.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=
+ha)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_BOTTOM,0)),ha.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ga)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_LEFT,0)),ga.value=isNaN(a)?"":a+" pt"});W=this.installInputHandler(da,mxConstants.STYLE_SPACING,2,-999,999," pt");T=this.installInputHandler(fa,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");U=this.installInputHandler(ba,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");aa=this.installInputHandler(ha,
+mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");ca=this.installInputHandler(ga,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(G,X);this.addKeyHandler(da,X);this.addKeyHandler(fa,X);this.addKeyHandler(ba,X);this.addKeyHandler(ha,X);this.addKeyHandler(ga,X);b.getModel().addListener(mxEvent.CHANGE,X);this.listeners.push({destroy:function(){b.getModel().removeListener(X)}});X();if(b.cellEditor.isContentEditing()){var ka=!1,e=function(){ka||(ka=!0,window.setTimeout(function(){for(var a=
b.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;if(null!=a){var d=function(a,b){if(null!=a&&null!=b){if(a==b)return!0;if(a.length>b.length+1)return a.substring(a.length-b.length-1,a.length)=="-"+b}return!1},e=function(c){if(null!=b.getParentByName(a,c,b.cellEditor.textarea))return!0;for(var d=a;null!=d&&1==d.childNodes.length;)if(d=d.childNodes[0],d.nodeName==c)return!0;return!1},g=function(a){a=null!=a?a.fontSize:null;return null!=a&&"px"==a.substring(a.length-
2)?parseFloat(a):mxConstants.DEFAULT_FONTSIZE},h=function(a,b,c){return null!=c.style&&null!=b?(b=b.lineHeight,null!=c.style.lineHeight&&"%"==c.style.lineHeight.substring(c.style.lineHeight.length-1)?parseInt(c.style.lineHeight)/100:"px"==b.substring(b.length-2)?parseFloat(b)/a:parseInt(b)):""};a==b.cellEditor.textarea&&1==b.cellEditor.textarea.children.length&&b.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.cellEditor.textarea.firstChild);var m=mxUtils.getCurrentStyle(a),
-n=g(m),p=h(n,m,a),r=a.getElementsByTagName("*");if(0<r.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var u=window.getSelection(),w=0;w<r.length;w++)if(u.containsNode(r[w],!0)){temp=mxUtils.getCurrentStyle(r[w]);var n=Math.max(g(temp),n),y=h(n,temp,r[w]);if(y!=p||isNaN(y))p=""}null!=m&&(c(l[0],"bold"==m.fontWeight||400<m.fontWeight||e("B")||e("STRONG")),c(l[1],"italic"==m.fontStyle||e("I")||e("EM")),c(l[2],e("U")),c(D,e("SUP")),c(x,e("SUB")),b.cellEditor.isTableSelected()?(c(z,
+n=g(m),p=h(n,m,a),r=a.getElementsByTagName("*");if(0<r.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var u=window.getSelection(),w=0;w<r.length;w++)if(u.containsNode(r[w],!0)){temp=mxUtils.getCurrentStyle(r[w]);var n=Math.max(g(temp),n),x=h(n,temp,r[w]);if(x!=p||isNaN(x))p=""}null!=m&&(c(l[0],"bold"==m.fontWeight||400<m.fontWeight||e("B")||e("STRONG")),c(l[1],"italic"==m.fontStyle||e("I")||e("EM")),c(l[2],e("U")),c(D,e("SUP")),c(y,e("SUB")),b.cellEditor.isTableSelected()?(c(z,
d(m.textAlign,"justify")),c(q,d(m.textAlign,"left")),c(v,d(m.textAlign,"center")),c(t,d(m.textAlign,"right"))):(e=b.cellEditor.align||mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),d(m.textAlign,"justify")?(c(z,d(m.textAlign,"justify")),c(q,!1),c(v,!1),c(t,!1)):(c(z,!1),c(q,e==mxConstants.ALIGN_LEFT),c(v,e==mxConstants.ALIGN_CENTER),c(t,e==mxConstants.ALIGN_RIGHT))),E=b.getParentByName(a,"TABLE",b.cellEditor.textarea),L=null==E?null:b.getParentByName(a,"TR",E),H=null==
-E?null:b.getParentByNames(a,["TD","TH"],E),C.style.display=null!=E?"":"none",document.activeElement!=G&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=K?(a.removeAttribute("size"),a.style.fontSize=K+" pt",K=null):G.value=isNaN(n)?"":n+" pt",y=parseFloat(p),isNaN(y)?ia.value="100 %":ia.value=Math.round(100*y)+" %"),d=m.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+
-("0"+Number(d).toString(16)).substr(-2)}),n=m.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),null!=Y&&(A="#"==d.charAt(0)?d:"#000000",Y(A,!0)),null!=M&&(ba="#"==n.charAt(0)?n:null,M(ba,!0)),null!=k.firstChild&&(m=m.fontFamily,"'"==m.charAt(0)&&(m=m.substring(1)),"'"==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1)),'"'==
-m.charAt(0)&&(m=m.substring(1)),'"'==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1)),k.firstChild.nodeValue=m))}la=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(b.cellEditor.textarea,"DOMSubtreeModified",e);mxEvent.addListener(b.cellEditor.textarea,"input",e);mxEvent.addListener(b.cellEditor.textarea,"touchend",e);mxEvent.addListener(b.cellEditor.textarea,"mouseup",e);mxEvent.addListener(b.cellEditor.textarea,"keyup",e);this.listeners.push({destroy:function(){}});
+E?null:b.getParentByNames(a,["TD","TH"],E),C.style.display=null!=E?"":"none",document.activeElement!=G&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=K?(a.removeAttribute("size"),a.style.fontSize=K+" pt",K=null):G.value=isNaN(n)?"":n+" pt",x=parseFloat(p),isNaN(x)?ja.value="100 %":ja.value=Math.round(100*x)+" %"),d=m.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+
+("0"+Number(d).toString(16)).substr(-2)}),n=m.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),null!=ea&&(A="#"==d.charAt(0)?d:"#000000",ea(A,!0)),null!=O&&(Y="#"==n.charAt(0)?n:null,O(Y,!0)),null!=k.firstChild&&(m=m.fontFamily,"'"==m.charAt(0)&&(m=m.substring(1)),"'"==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1)),'"'==
+m.charAt(0)&&(m=m.substring(1)),'"'==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1)),k.firstChild.nodeValue=m))}ka=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(b.cellEditor.textarea,"DOMSubtreeModified",e);mxEvent.addListener(b.cellEditor.textarea,"input",e);mxEvent.addListener(b.cellEditor.textarea,"touchend",e);mxEvent.addListener(b.cellEditor.textarea,"mouseup",e);mxEvent.addListener(b.cellEditor.textarea,"keyup",e);this.listeners.push({destroy:function(){}});
e()}return a};StyleFormatPanel=function(a,c,d){BaseFormatPanel.call(this,a,c,d);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.defaultStrokeColor="black";
StyleFormatPanel.prototype.init=function(){var a=this.format.getSelectionState();a.containsLabel||(a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==a.style.image.substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel())),a.containsImage&&"image"!=a.style.shape||this.container.appendChild(this.addFill(this.createPanel())),this.container.appendChild(this.addStroke(this.createPanel())),this.container.appendChild(this.addLineJumps(this.createPanel())),
a=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPACITY,41),a.style.paddingTop="8px",a.style.paddingBottom="8px",this.container.appendChild(a),this.container.appendChild(this.addEffects(this.createPanel())));a=this.addEditOps(this.createPanel());null!=a.firstChild&&mxUtils.br(a);this.container.appendChild(this.addStyleOps(a))};
@@ -2902,8 +2904,8 @@ t=this.editorUi.toolbar.addMenuFunctionInContainer(v,"geSprite-connection",mxRes
["link",null,null,null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",mxResources.get("link"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,
null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))})),m=this.editorUi.toolbar.addMenuFunctionInContainer(v,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){q(a,33,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));q(a,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));
q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),k=p.cloneNode(!1),u=document.createElement("input");u.style.textAlign="right";
-u.style.marginTop="2px";u.style.width="41px";u.setAttribute("title",mxResources.get("linewidth"));p.appendChild(u);var w=u.cloneNode(!0);v.appendChild(w);var r=this.createStepper(u,c,1,9);r.style.display=u.style.display;r.style.marginTop="2px";p.appendChild(r);var y=this.createStepper(w,d,1,9);y.style.display=w.style.display;y.style.marginTop="2px";v.appendChild(y);mxClient.IS_QUIRKS?(u.style.height="17px",w.style.height="17px"):(u.style.position="absolute",u.style.right="32px",u.style.height="15px",
-r.style.right="20px",w.style.position="absolute",w.style.right="32px",w.style.height="15px",y.style.right="20px");mxEvent.addListener(u,"blur",c);mxEvent.addListener(u,"change",c);mxEvent.addListener(w,"blur",d);mxEvent.addListener(w,"change",d);mxClient.IS_QUIRKS&&(mxUtils.br(k),mxUtils.br(k));var x=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(a){"arrow"!=e.style.shape&&(this.editorUi.menus.edgeStyleChange(a,"",
+u.style.marginTop="2px";u.style.width="41px";u.setAttribute("title",mxResources.get("linewidth"));p.appendChild(u);var w=u.cloneNode(!0);v.appendChild(w);var r=this.createStepper(u,c,1,9);r.style.display=u.style.display;r.style.marginTop="2px";p.appendChild(r);var x=this.createStepper(w,d,1,9);x.style.display=w.style.display;x.style.marginTop="2px";v.appendChild(x);mxClient.IS_QUIRKS?(u.style.height="17px",w.style.height="17px"):(u.style.position="absolute",u.style.right="32px",u.style.height="15px",
+r.style.right="20px",w.style.position="absolute",w.style.right="32px",w.style.height="15px",x.style.right="20px");mxEvent.addListener(u,"blur",c);mxEvent.addListener(u,"change",c);mxEvent.addListener(w,"blur",d);mxEvent.addListener(w,"change",d);mxClient.IS_QUIRKS&&(mxUtils.br(k),mxUtils.br(k));var y=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(a){"arrow"!=e.style.shape&&(this.editorUi.menus.edgeStyleChange(a,"",
[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",mxResources.get("straight")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",null,!0).setAttribute("title",mxResources.get("orthogonal")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,
mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(a,
"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",
@@ -2930,21 +2932,21 @@ mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstant
0],"geIcon geSprite geSprite-enddiamondtrans",null,!1).setAttribute("title",mxResources.get("diamond")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,0],"geIcon geSprite geSprite-endthindiamondtrans",null,!1).setAttribute("title",mxResources.get("diamondThin")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["dash",0],"geIcon geSprite geSprite-enddash",null,!1),this.editorUi.menus.edgeStyleChange(a,
"",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],"geIcon geSprite geSprite-endcross",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circlePlus",0],"geIcon geSprite geSprite-endcircleplus",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",1],"geIcon geSprite geSprite-endcircle",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],"geIcon geSprite geSprite-enderone",
null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],"geIcon geSprite geSprite-enderonetoone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],"geIcon geSprite geSprite-endermany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],"geIcon geSprite geSprite-enderonetomany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,
-"endFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-enderoneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-endermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(t,8);this.addArrow(x);this.addArrow(D);this.addArrow(z);r=this.addArrow(l,
-9);r.className="geIcon";r.style.width="84px";y=this.addArrow(m,9);y.className="geIcon";y.style.width="22px";var C=document.createElement("div");C.style.width="85px";C.style.height="1px";C.style.borderBottom="1px solid "+this.defaultStrokeColor;C.style.marginBottom="9px";r.appendChild(C);var E=document.createElement("div");E.style.width="23px";E.style.height="1px";E.style.borderBottom="1px solid "+this.defaultStrokeColor;E.style.marginBottom="9px";y.appendChild(E);l.style.height="15px";m.style.height=
-"15px";t.style.height="15px";x.style.height="17px";D.style.marginLeft="3px";D.style.height="17px";z.style.marginLeft="3px";z.style.height="17px";a.appendChild(h);a.appendChild(v);a.appendChild(p);l=p.cloneNode(!1);l.style.paddingBottom="6px";l.style.paddingTop="4px";l.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="2px";m.style.fontWeight="normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));
-l.appendChild(m);var H,L,I=this.addUnitInput(l,"pt",74,33,function(){H.apply(this,arguments)}),F=this.addUnitInput(l,"pt",20,33,function(){L.apply(this,arguments)});mxUtils.br(l);r=document.createElement("div");r.style.height="8px";l.appendChild(r);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var J,O,S=this.addUnitInput(l,"pt",74,33,function(){J.apply(this,arguments)}),R=this.addUnitInput(l,"pt",20,33,function(){O.apply(this,arguments)});mxUtils.br(l);this.addLabel(l,
+"endFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-enderoneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-endermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(t,8);this.addArrow(y);this.addArrow(D);this.addArrow(z);r=this.addArrow(l,
+9);r.className="geIcon";r.style.width="84px";x=this.addArrow(m,9);x.className="geIcon";x.style.width="22px";var C=document.createElement("div");C.style.width="85px";C.style.height="1px";C.style.borderBottom="1px solid "+this.defaultStrokeColor;C.style.marginBottom="9px";r.appendChild(C);var E=document.createElement("div");E.style.width="23px";E.style.height="1px";E.style.borderBottom="1px solid "+this.defaultStrokeColor;E.style.marginBottom="9px";x.appendChild(E);l.style.height="15px";m.style.height=
+"15px";t.style.height="15px";y.style.height="17px";D.style.marginLeft="3px";D.style.height="17px";z.style.marginLeft="3px";z.style.height="17px";a.appendChild(h);a.appendChild(v);a.appendChild(p);l=p.cloneNode(!1);l.style.paddingBottom="6px";l.style.paddingTop="4px";l.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="2px";m.style.fontWeight="normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));
+l.appendChild(m);var H,L,I=this.addUnitInput(l,"pt",74,33,function(){H.apply(this,arguments)}),F=this.addUnitInput(l,"pt",20,33,function(){L.apply(this,arguments)});mxUtils.br(l);r=document.createElement("div");r.style.height="8px";l.appendChild(r);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var J,N,S=this.addUnitInput(l,"pt",74,33,function(){J.apply(this,arguments)}),Q=this.addUnitInput(l,"pt",20,33,function(){N.apply(this,arguments)});mxUtils.br(l);this.addLabel(l,
mxResources.get("spacing"),74,50);this.addLabel(l,mxResources.get("size"),20,50);mxUtils.br(l);h=h.cloneNode(!1);h.style.fontWeight="normal";h.style.position="relative";h.style.paddingLeft="16px";h.style.marginBottom="2px";h.style.marginTop="6px";h.style.borderWidth="0px";h.style.paddingBottom="18px";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="1px";m.style.fontWeight="normal";m.style.width="120px";mxUtils.write(m,
-mxResources.get("perimeter"));h.appendChild(m);var G,K=this.addUnitInput(h,"pt",20,41,function(){G.apply(this,arguments)});e.edges.length==f.getSelectionCount()?(a.appendChild(k),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(l)):e.vertices.length==f.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(h));var M=mxUtils.bind(this,function(a,c,d){function h(a,c,d,g){d=d.getElementsByTagName("div")[0];d.className=b.getCssClassForMarker(g,e.style.shape,a,c);"geSprite geSprite-noarrow"==
+mxResources.get("perimeter"));h.appendChild(m);var G,K=this.addUnitInput(h,"pt",20,41,function(){G.apply(this,arguments)});e.edges.length==f.getSelectionCount()?(a.appendChild(k),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(l)):e.vertices.length==f.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(h));var O=mxUtils.bind(this,function(a,c,d){function h(a,c,d,g){d=d.getElementsByTagName("div")[0];d.className=b.getCssClassForMarker(g,e.style.shape,a,c);"geSprite geSprite-noarrow"==
d.className&&(d.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),d.style.backgroundImage="none",d.style.verticalAlign="top",d.style.marginTop="5px",d.style.fontSize="10px",d.style.filter="none",d.style.color=this.defaultStrokeColor,d.nextSibling.style.marginTop="0px");return d}e=this.format.getSelectionState();mxUtils.getValue(e.style,n,null);if(d||document.activeElement!=u)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),u.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=
w)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),w.value=isNaN(a)?"":a+" pt";g.style.visibility="connector"==e.style.shape||"filledEdge"==e.style.shape?"":"hidden";"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?g.value="curved":"1"==mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,null)&&(g.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(e.style,mxConstants.STYLE_DASH_PATTERN,null)?C.style.borderBottom="1px dashed "+
-this.defaultStrokeColor:C.style.borderBottom="1px dotted "+this.defaultStrokeColor:C.style.borderBottom="1px solid "+this.defaultStrokeColor;E.style.borderBottom=C.style.borderBottom;a=x.getElementsByTagName("div")[0];c=mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null);"orthogonalEdgeStyle"==c&&"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?a.className="geSprite geSprite-curved":a.className="straight"==c||
+this.defaultStrokeColor:C.style.borderBottom="1px dotted "+this.defaultStrokeColor:C.style.borderBottom="1px solid "+this.defaultStrokeColor;E.style.borderBottom=C.style.borderBottom;a=y.getElementsByTagName("div")[0];c=mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null);"orthogonalEdgeStyle"==c&&"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?a.className="geSprite geSprite-curved":a.className="straight"==c||
"none"==c||null==c?"geSprite geSprite-straight":"entityRelationEdgeStyle"==c?"geSprite geSprite-entity":"elbowEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal";t.getElementsByTagName("div")[0].className="link"==
e.style.shape?"geSprite geSprite-linkedge":"flexArrow"==e.style.shape?"geSprite geSprite-arrow":"arrow"==e.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection";e.edges.length==f.getSelectionCount()?(v.style.display="",p.style.display="none"):(v.style.display="none",p.style.display="");a=h(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),D,"start");c=h(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,
-"endFill","1"),z,"end");"arrow"==e.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-noarrow");mxUtils.setOpacity(x,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape&&"filledEdge"!=e.style.shape?(mxUtils.setOpacity(D,30),mxUtils.setOpacity(z,30)):(mxUtils.setOpacity(D,100),mxUtils.setOpacity(z,100));if(d||document.activeElement!=
-R)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),R.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=S)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),S.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=F)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),F.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=S)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,
-0)),I.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=K)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),K.value=isNaN(a)?"":a+" pt"});O=this.installInputHandler(R,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");J=this.installInputHandler(S,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");L=this.installInputHandler(F,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");H=this.installInputHandler(I,mxConstants.STYLE_TARGET_PERIMETER_SPACING,
-0,-999,999," pt");G=this.installInputHandler(K,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(u,M);this.addKeyHandler(R,M);this.addKeyHandler(S,M);this.addKeyHandler(F,M);this.addKeyHandler(I,M);this.addKeyHandler(K,M);f.getModel().addListener(mxEvent.CHANGE,M);this.listeners.push({destroy:function(){f.getModel().removeListener(M)}});M();return a};
+"endFill","1"),z,"end");"arrow"==e.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-noarrow");mxUtils.setOpacity(y,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape&&"filledEdge"!=e.style.shape?(mxUtils.setOpacity(D,30),mxUtils.setOpacity(z,30)):(mxUtils.setOpacity(D,100),mxUtils.setOpacity(z,100));if(d||document.activeElement!=
+Q)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),Q.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=S)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),S.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=F)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),F.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=S)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,
+0)),I.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=K)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),K.value=isNaN(a)?"":a+" pt"});N=this.installInputHandler(Q,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");J=this.installInputHandler(S,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");L=this.installInputHandler(F,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");H=this.installInputHandler(I,mxConstants.STYLE_TARGET_PERIMETER_SPACING,
+0,-999,999," pt");G=this.installInputHandler(K,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(u,O);this.addKeyHandler(Q,O);this.addKeyHandler(S,O);this.addKeyHandler(F,O);this.addKeyHandler(I,O);this.addKeyHandler(K,O);f.getModel().addListener(mxEvent.CHANGE,O);this.listeners.push({destroy:function(){f.getModel().removeListener(O)}});O();return a};
StyleFormatPanel.prototype.addLineJumps=function(a){var c=this.format.getSelectionState();if(Graph.lineJumpsEnabled&&0<c.edges.length&&0==c.vertices.length&&c.lineJumps){a.style.padding="8px 0px 24px 18px";var d=this.editorUi,b=d.editor.graph,f=document.createElement("div");f.style.position="absolute";f.style.fontWeight="bold";f.style.width="80px";mxUtils.write(f,mxResources.get("lineJumps"));a.appendChild(f);var e=document.createElement("select");e.style.position="absolute";e.style.marginTop="-2px";
e.style.right="76px";e.style.width="62px";for(var f=["none","arc","gap","sharp"],h=0;h<f.length;h++){var g=document.createElement("option");g.setAttribute("value",f[h]);mxUtils.write(g,mxResources.get(f[h]));e.appendChild(g)}mxEvent.addListener(e,"change",function(a){b.getModel().beginUpdate();try{b.setCellStyles("jumpStyle",e.value,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[e.value],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)});
mxEvent.addListener(e,"click",function(a){mxEvent.consume(a)});a.appendChild(e);var k,l=this.addUnitInput(a,"pt",22,33,function(){k.apply(this,arguments)});k=this.installInputHandler(l,"jumpSize",Graph.defaultJumpSize,0,999," pt");var m=mxUtils.bind(this,function(a,b,d){c=this.format.getSelectionState();e.value=mxUtils.getValue(c.style,"jumpStyle","none");if(d||document.activeElement!=l)a=parseInt(mxUtils.getValue(c.style,"jumpSize",Graph.defaultJumpSize)),l.value=isNaN(a)?"":a+" pt"});this.addKeyHandler(l,
@@ -2971,23 +2973,23 @@ function(){b.set(d.pageFormat)});var f=function(){b.set(d.pageFormat)};c.addList
DiagramFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("editData"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editData").funct()}));c.setAttribute("title",mxResources.get("editData")+" ("+this.editorUi.actions.get("editData").shortcut+")");c.style.width="202px";c.style.marginBottom="2px";a.appendChild(c);mxUtils.br(a);c=mxUtils.button(mxResources.get("clearDefaultStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("clearDefaultStyle").funct()}));
c.setAttribute("title",mxResources.get("clearDefaultStyle")+" ("+this.editorUi.actions.get("clearDefaultStyle").shortcut+")");c.style.width="202px";a.appendChild(c);return a};DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(){mxCylinder.call(this)}function c(){mxActor.call(this)}function d(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function e(){mxActor.call(this)}function h(){mxCylinder.call(this)}function g(){mxActor.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function p(){mxActor.call(this)}function q(){mxActor.call(this)}function v(a,b){this.canvas=
a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,v.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,v.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,v.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,v.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,v.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,v.prototype.arcTo)}function t(){mxRectangleShape.call(this)}function u(){mxRectangleShape.call(this)}function w(){mxActor.call(this)}function r(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function D(){mxRectangleShape.call(this)}function z(){mxCylinder.call(this)}function C(){mxShape.call(this)}function E(){mxShape.call(this)}
-function H(){mxEllipse.call(this)}function L(){mxShape.call(this)}function I(){mxShape.call(this)}function F(){mxRectangleShape.call(this)}function J(){mxShape.call(this)}function O(){mxShape.call(this)}function S(){mxShape.call(this)}function R(){mxShape.call(this)}function G(){mxShape.call(this)}function K(){mxCylinder.call(this)}function M(){mxDoubleEllipse.call(this)}function ba(){mxDoubleEllipse.call(this)}function Y(){mxArrowConnector.call(this);this.spacing=0}function A(){mxArrowConnector.call(this);
-this.spacing=0}function Q(){mxActor.call(this)}function P(){mxRectangleShape.call(this)}function T(){mxActor.call(this)}function da(){mxActor.call(this)}function V(){mxActor.call(this)}function U(){mxActor.call(this)}function ka(){mxActor.call(this)}function ca(){mxActor.call(this)}function ga(){mxActor.call(this)}function ha(){mxActor.call(this)}function Z(){mxActor.call(this)}function aa(){mxActor.call(this)}function ea(){mxEllipse.call(this)}function ia(){mxEllipse.call(this)}function X(){mxEllipse.call(this)}
-function la(){mxRhombus.call(this)}function W(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}function va(){mxActor.call(this)}function oa(){mxActor.call(this)}function pa(){mxActor.call(this)}function na(){mxConnector.call(this)}function Ia(a,b,c,d,e,g,f,h,k,l){f+=k;var B=d.clone();d.x-=e*(2*f+k);d.y-=g*(2*f+k);e*=f+k;g*=f+k;return function(){a.ellipse(B.x-e-f,B.y-g-f,2*f,2*f);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
-mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,b,c,d,e){var g=Math.max(0,Math.min(d,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=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-g,0);a.lineTo(d,
-g);a.lineTo(d,e);a.lineTo(g,e);a.lineTo(0,e-g);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=f&&(a.setFillAlpha(Math.abs(f)),a.setFillColor(0>f?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(d-g,0),a.lineTo(d,g),a.lineTo(g,g),a.close(),a.fill()),0!=B&&(a.setFillAlpha(Math.abs(B)),a.setFillColor(0>B?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(g,g),a.lineTo(g,e),a.lineTo(0,e-g),a.close(),a.fill()),a.begin(),a.moveTo(g,e),a.lineTo(g,g),a.lineTo(0,
-0),a.moveTo(g,g),a.lineTo(d,g),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var Ca=Math.tan(mxUtils.toRadians(30)),ma=(.5-Ca)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/Ca);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*
-b,b*ma);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-ma)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",c);mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.redrawPath=function(a,b,c,d,e,g){b=Math.min(d,e/(.5+Ca));g?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-ma)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-ma)*b),a.lineTo(.5*b,(1-ma)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*ma),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-ma)*b),a.lineTo(0,
-.75*b),a.close());a.end()};mxCellRenderer.registerShape("isoCube",d);mxUtils.extend(b,mxCylinder);b.prototype.redrawPath=function(a,b,c,d,e,g){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(g&&null!=this.fill||!g&&null==this.fill)a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),g||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),g||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),g||(a.stroke(),a.begin()),a.translate(0,-b);g||(a.moveTo(0,
-b),a.curveTo(0,-b/3,d,-b/3,d,b),a.lineTo(d,e-b),a.curveTo(d,e+b/3,0,e+b/3,0,e-b),a.close())};b.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",b);mxUtils.extend(f,mxCylinder);f.prototype.size=30;f.prototype.darkOpacity=0;f.prototype.paintVertexShape=function(a,b,c,d,e){var g=Math.max(0,Math.min(d,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))));a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-g,0);a.lineTo(d,g);a.lineTo(d,e);a.lineTo(0,e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=f&&(a.setFillAlpha(Math.abs(f)),a.setFillColor(0>f?"#FFFFFF":"#000000"),a.begin(),a.moveTo(d-g,0),a.lineTo(d-g,g),a.lineTo(d,g),a.close(),a.fill()),a.begin(),a.moveTo(d-g,0),a.lineTo(d-g,g),a.lineTo(d,g),a.end(),a.stroke())};
-mxCellRenderer.registerShape("note",f);mxUtils.extend(e,mxActor);e.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d/2,.5*e,d,0);a.quadTo(.5*d,e/2,d,e);a.quadTo(d/2,.5*e,0,e);a.quadTo(.5*d,e/2,0,0);a.end()};mxCellRenderer.registerShape("switch",e);mxUtils.extend(h,mxCylinder);h.prototype.tabWidth=60;h.prototype.tabHeight=20;h.prototype.tabPosition="right";h.prototype.redrawPath=function(a,b,c,d,e,g){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));
-c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var f=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);g?"left"==f?(a.moveTo(0,c),a.lineTo(b,c)):(a.moveTo(d-b,c),a.lineTo(d,c)):("left"==f?(a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,c),a.lineTo(d,c)):(a.moveTo(0,c),a.lineTo(d-b,c),a.lineTo(d-b,0),a.lineTo(d,0)),a.lineTo(d,e),a.lineTo(0,e),a.lineTo(0,c),a.close());a.end()};mxCellRenderer.registerShape("folder",h);mxUtils.extend(g,mxActor);g.prototype.size=
-30;g.prototype.isRoundable=function(){return!0};g.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("card",g);mxUtils.extend(k,mxActor);k.prototype.size=.4;k.prototype.redrawPath=
-function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,b/2);a.quadTo(d/4,1.4*b,d/2,b/2);a.quadTo(3*d/4,b*(1-1.4),d,b/2);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};k.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",this.size),c=a.width,d=a.height;if(null==this.direction||this.direction==
-mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return b*=d,new mxRectangle(a.x,a.y+b,c,d-2*b);b*=c;return new mxRectangle(a.x+b,a.y,c-2*b,d)}return a};mxCellRenderer.registerShape("tape",k);mxUtils.extend(l,mxActor);l.prototype.size=.3;l.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};l.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};mxCellRenderer.registerShape("document",l);var Ja=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,b,c,d){var e=mxUtils.getValue(this.style,"size");return null!=e?d*Math.max(0,Math.min(1,e)):Ja.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=
+this.canvas.curveTo=mxUtils.bind(this,v.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,v.prototype.arcTo)}function t(){mxRectangleShape.call(this)}function u(){mxRectangleShape.call(this)}function w(){mxActor.call(this)}function r(){mxActor.call(this)}function x(){mxActor.call(this)}function y(){mxRectangleShape.call(this)}function D(){mxRectangleShape.call(this)}function z(){mxCylinder.call(this)}function C(){mxShape.call(this)}function E(){mxShape.call(this)}
+function H(){mxEllipse.call(this)}function L(){mxShape.call(this)}function I(){mxShape.call(this)}function F(){mxRectangleShape.call(this)}function J(){mxShape.call(this)}function N(){mxShape.call(this)}function S(){mxShape.call(this)}function Q(){mxShape.call(this)}function G(){mxShape.call(this)}function K(){mxCylinder.call(this)}function O(){mxRectangleShape.call(this)}function Y(){mxDoubleEllipse.call(this)}function ea(){mxDoubleEllipse.call(this)}function A(){mxArrowConnector.call(this);this.spacing=
+0}function P(){mxArrowConnector.call(this);this.spacing=0}function R(){mxActor.call(this)}function T(){mxRectangleShape.call(this)}function W(){mxActor.call(this)}function ca(){mxActor.call(this)}function aa(){mxActor.call(this)}function U(){mxActor.call(this)}function fa(){mxActor.call(this)}function da(){mxActor.call(this)}function ga(){mxActor.call(this)}function ha(){mxActor.call(this)}function ba(){mxActor.call(this)}function Z(){mxActor.call(this)}function ja(){mxEllipse.call(this)}function X(){mxEllipse.call(this)}
+function ka(){mxEllipse.call(this)}function V(){mxRhombus.call(this)}function Aa(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function Ca(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function va(){mxActor.call(this)}function pa(){mxActor.call(this)}function qa(){mxActor.call(this)}function na(){mxConnector.call(this)}function Ga(a,b,c,d,e,g,f,h,k,l){f+=k;var B=d.clone();d.x-=e*(2*f+k);d.y-=g*(2*f+k);e*=f+k;g*=f+k;return function(){a.ellipse(B.x-e-f,B.y-g-f,2*f,2*f);l?a.fillAndStroke():
+a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,b,c,d,e){var g=Math.max(0,Math.min(d,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=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(b,c);a.begin();a.moveTo(0,
+0);a.lineTo(d-g,0);a.lineTo(d,g);a.lineTo(d,e);a.lineTo(g,e);a.lineTo(0,e-g);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=f&&(a.setFillAlpha(Math.abs(f)),a.setFillColor(0>f?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(d-g,0),a.lineTo(d,g),a.lineTo(g,g),a.close(),a.fill()),0!=B&&(a.setFillAlpha(Math.abs(B)),a.setFillColor(0>B?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(g,g),a.lineTo(g,e),a.lineTo(0,e-g),a.close(),a.fill()),a.begin(),a.moveTo(g,
+e),a.lineTo(g,g),a.lineTo(0,0),a.moveTo(g,g),a.lineTo(d,g),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var Da=Math.tan(mxUtils.toRadians(30)),ma=(.5-Da)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/Da);a.translate((d-b)/2,(e-b)/
+2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*b,b*ma);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-ma)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",c);mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.redrawPath=function(a,b,c,d,e,g){b=Math.min(d,e/(.5+Da));g?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-ma)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-ma)*b),a.lineTo(.5*b,(1-ma)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*ma),a.lineTo(b,.25*b),a.lineTo(b,
+.75*b),a.lineTo(.5*b,(1-ma)*b),a.lineTo(0,.75*b),a.close());a.end()};mxCellRenderer.registerShape("isoCube",d);mxUtils.extend(b,mxCylinder);b.prototype.redrawPath=function(a,b,c,d,e,g){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(g&&null!=this.fill||!g&&null==this.fill)a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),g||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),g||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),g||(a.stroke(),
+a.begin()),a.translate(0,-b);g||(a.moveTo(0,b),a.curveTo(0,-b/3,d,-b/3,d,b),a.lineTo(d,e-b),a.curveTo(d,e+b/3,0,e+b/3,0,e-b),a.close())};b.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",b);mxUtils.extend(f,mxCylinder);f.prototype.size=30;f.prototype.darkOpacity=0;f.prototype.paintVertexShape=function(a,b,c,d,e){var g=Math.max(0,Math.min(d,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))));a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-g,0);a.lineTo(d,g);a.lineTo(d,e);a.lineTo(0,e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=f&&(a.setFillAlpha(Math.abs(f)),a.setFillColor(0>f?"#FFFFFF":"#000000"),a.begin(),a.moveTo(d-g,0),a.lineTo(d-g,g),a.lineTo(d,g),a.close(),a.fill()),a.begin(),a.moveTo(d-g,0),a.lineTo(d-g,g),a.lineTo(d,
+g),a.end(),a.stroke())};mxCellRenderer.registerShape("note",f);mxUtils.extend(e,mxActor);e.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d/2,.5*e,d,0);a.quadTo(.5*d,e/2,d,e);a.quadTo(d/2,.5*e,0,e);a.quadTo(.5*d,e/2,0,0);a.end()};mxCellRenderer.registerShape("switch",e);mxUtils.extend(h,mxCylinder);h.prototype.tabWidth=60;h.prototype.tabHeight=20;h.prototype.tabPosition="right";h.prototype.redrawPath=function(a,b,c,d,e,g){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,
+"tabWidth",this.tabWidth))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var f=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);g?"left"==f?(a.moveTo(0,c),a.lineTo(b,c)):(a.moveTo(d-b,c),a.lineTo(d,c)):("left"==f?(a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,c),a.lineTo(d,c)):(a.moveTo(0,c),a.lineTo(d-b,c),a.lineTo(d-b,0),a.lineTo(d,0)),a.lineTo(d,e),a.lineTo(0,e),a.lineTo(0,c),a.close());a.end()};mxCellRenderer.registerShape("folder",h);mxUtils.extend(g,
+mxActor);g.prototype.size=30;g.prototype.isRoundable=function(){return!0};g.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("card",g);mxUtils.extend(k,mxActor);k.prototype.size=
+.4;k.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,b/2);a.quadTo(d/4,1.4*b,d/2,b/2);a.quadTo(3*d/4,b*(1-1.4),d,b/2);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};k.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",this.size),c=a.width,d=a.height;if(null==this.direction||
+this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return b*=d,new mxRectangle(a.x,a.y+b,c,d-2*b);b*=c;return new mxRectangle(a.x+b,a.y,c-2*b,d)}return a};mxCellRenderer.registerShape("tape",k);mxUtils.extend(l,mxActor);l.prototype.size=.3;l.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};l.prototype.redrawPath=function(a,b,c,
+d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};mxCellRenderer.registerShape("document",l);var Ka=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,b,c,d){var e=mxUtils.getValue(this.style,"size");return null!=e?d*Math.max(0,Math.min(1,e)):Ka.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=
function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*b),0,0)}return null};mxUtils.extend(m,mxActor);m.prototype.size=.2;m.prototype.isRoundable=function(){return!0};m.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d-b,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("parallelogram",m);mxUtils.extend(n,mxActor);n.prototype.size=.2;n.prototype.isRoundable=function(){return!0};n.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,
e),new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("trapezoid",n);mxUtils.extend(p,mxActor);p.prototype.size=.5;p.prototype.redrawPath=function(a,b,c,d,e){a.setFillColor(null);b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(b,0),new mxPoint(b,e/2),new mxPoint(0,e/2),new mxPoint(b,
@@ -2995,22 +2997,22 @@ e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};mxCellRend
b;this.firstX=a;this.firstY=b};v.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};v.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};v.prototype.curveTo=function(a,b,c,d,e,g){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};v.prototype.arcTo=function(a,b,c,d,
e,g,f){this.originalArcTo.apply(this.canvas,arguments);this.lastX=g;this.lastY=f};v.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),g=Math.sqrt(d*d+e*e);if(2>g){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var f=Math.round(g/10),B=this.defaultVariation;5>f&&(f=5,B/=3);for(var h=c(a-this.lastX)*d/f,c=c(b-this.lastY)*e/f,
d=d/g,e=e/g,g=0;g<f;g++){var k=(Math.random()-.5)*B;this.originalLineTo.call(this.canvas,h*g+this.lastX-k*e,c*g+this.lastY-k*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};v.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};
-var Ka=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new v(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ka.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var La=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==
-this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&La.apply(this,arguments)};var Ma=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Ma.apply(this,arguments);else{var g=!0;null!=this.style&&(g="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(g||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)g||null!=this.fill&&this.fill!=mxConstants.NONE||
+var La=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new v(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));La.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Ma=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==
+this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Ma.apply(this,arguments)};var Na=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Na.apply(this,arguments);else{var g=!0;null!=this.style&&(g="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(g||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)g||null!=this.fill&&this.fill!=mxConstants.NONE||
(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?g=Math.min(d/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.min(d*g,e*g)),a.moveTo(b+g,c),a.lineTo(b+d-g,c),a.quadTo(b+d,c,b+d,c+g),a.lineTo(b+d,c+e-g),a.quadTo(b+d,c+e,b+d-g,c+e),a.lineTo(b+g,c+e),a.quadTo(b,c+e,b,c+e-g),
-a.lineTo(b,c+g),a.quadTo(b,c,b+g,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,c)),a.close(),a.end(),a.fillAndStroke()}};var Na=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Na.apply(this,arguments)};mxUtils.extend(t,mxRectangleShape);t.prototype.size=.1;t.prototype.isHtmlAllowed=function(){return!1};t.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,
+a.lineTo(b,c+g),a.quadTo(b,c,b+g,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,c)),a.close(),a.end(),a.fillAndStroke()}};var Oa=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Oa.apply(this,arguments)};mxUtils.extend(t,mxRectangleShape);t.prototype.size=.1;t.prototype.isHtmlAllowed=function(){return!1};t.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,
!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var b=a.width,c=a.height;a=new mxRectangle(a.x,a.y,b,c);var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(b*e,c*e));a.x+=Math.round(d);a.width-=Math.round(2*d)}return a};t.prototype.paintForeground=
function(a,b,c,d,e){var g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.max(g,Math.min(d*f,e*f));g=Math.round(g);a.begin();a.moveTo(b+g,c);a.lineTo(b+g,c+e);a.moveTo(b+d-g,c);a.lineTo(b+d-g,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",t);mxUtils.extend(u,
mxRectangleShape);u.prototype.paintBackground=function(a,b,c,d,e){a.setFillColor(mxConstants.NONE);a.rect(b,c,d,e);a.fill()};u.prototype.paintForeground=function(a,b,c,d,e){};mxCellRenderer.registerShape("transparent",u);mxUtils.extend(w,mxHexagon);w.prototype.size=30;w.prototype.position=.5;w.prototype.position2=.5;w.prototype.base=20;w.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};w.prototype.isRoundable=
function(){return!0};w.prototype.redrawPath=function(a,b,c,d,e){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),h=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));
this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-c),new mxPoint(Math.min(d,g+h),e-c),new mxPoint(f,e),new mxPoint(Math.max(0,g),e-c),new mxPoint(0,e-c)],this.isRounded,b,!0,[4])};mxCellRenderer.registerShape("callout",w);mxUtils.extend(r,mxActor);r.prototype.size=.2;r.prototype.fixedSize=20;r.prototype.isRoundable=function(){return!0};r.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("step",r);mxUtils.extend(y,mxHexagon);y.prototype.size=.25;y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath=
-function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.5*e),new mxPoint(d-b,e),new mxPoint(b,e),new mxPoint(0,.5*e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("hexagon",y);mxUtils.extend(x,mxRectangleShape);x.prototype.isHtmlAllowed=function(){return!1};x.prototype.paintForeground=function(a,
-b,c,d,e){var g=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+g);a.lineTo(b+d/2,c+e-g);a.moveTo(b+g,c+e/2);a.lineTo(b+d-g,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",x);var Fa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+
-b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Fa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var g=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=g;c+=g;d-=2*g;e-=2*g;0<d&&0<e&&(a.setShadow(!1),Fa.apply(this,[a,b,c,d,e]))}};mxUtils.extend(D,mxRectangleShape);D.prototype.isHtmlAllowed=function(){return!1};D.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,
+"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("step",r);mxUtils.extend(x,mxHexagon);x.prototype.size=.25;x.prototype.isRoundable=function(){return!0};x.prototype.redrawPath=
+function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.5*e),new mxPoint(d-b,e),new mxPoint(b,e),new mxPoint(0,.5*e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("hexagon",x);mxUtils.extend(y,mxRectangleShape);y.prototype.isHtmlAllowed=function(){return!1};y.prototype.paintForeground=function(a,
+b,c,d,e){var g=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+g);a.lineTo(b+d/2,c+e-g);a.moveTo(b+g,c+e/2);a.lineTo(b+d-g,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",y);var Ha=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+
+b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Ha.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var g=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=g;c+=g;d-=2*g;e-=2*g;0<d&&0<e&&(a.setShadow(!1),Ha.apply(this,[a,b,c,d,e]))}};mxUtils.extend(D,mxRectangleShape);D.prototype.isHtmlAllowed=function(){return!1};D.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,
this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};D.prototype.paintForeground=function(a,b,c,d,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);b+=g;c+=g;d-=2*g;e-=2*g;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var g=0,f;do{f=mxCellRenderer.defaultShapes[this.style["symbol"+
-g]];if(null!=f){var h=this.style["symbol"+g+"Align"],B=this.style["symbol"+g+"VerticalAlign"],k=this.style["symbol"+g+"Width"],l=this.style["symbol"+g+"Height"],wa=this.style["symbol"+g+"Spacing"]||0,Ea=this.style["symbol"+g+"VSpacing"]||wa,m=this.style["symbol"+g+"ArcSpacing"];null!=m&&(m*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),wa+=m,Ea+=m);var m=b,sa=c,m=h==mxConstants.ALIGN_CENTER?m+(d-k)/2:h==mxConstants.ALIGN_RIGHT?m+(d-k-wa):m+wa,sa=B==mxConstants.ALIGN_MIDDLE?sa+(e-l)/2:B==
-mxConstants.ALIGN_BOTTOM?sa+(e-l-Ea):sa+Ea;a.save();h=new f;h.style=this.style;f.prototype.paintVertexShape.call(h,a,m,sa,k,l);a.restore()}g++}while(null!=f)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",D);mxUtils.extend(z,mxCylinder);z.prototype.redrawPath=function(a,b,c,d,e,g){g?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.registerShape("message",
+g]];if(null!=f){var h=this.style["symbol"+g+"Align"],B=this.style["symbol"+g+"VerticalAlign"],k=this.style["symbol"+g+"Width"],l=this.style["symbol"+g+"Height"],wa=this.style["symbol"+g+"Spacing"]||0,Fa=this.style["symbol"+g+"VSpacing"]||wa,m=this.style["symbol"+g+"ArcSpacing"];null!=m&&(m*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),wa+=m,Fa+=m);var m=b,sa=c,m=h==mxConstants.ALIGN_CENTER?m+(d-k)/2:h==mxConstants.ALIGN_RIGHT?m+(d-k-wa):m+wa,sa=B==mxConstants.ALIGN_MIDDLE?sa+(e-l)/2:B==
+mxConstants.ALIGN_BOTTOM?sa+(e-l-Fa):sa+Fa;a.save();h=new f;h.style=this.style;f.prototype.paintVertexShape.call(h,a,m,sa,k,l);a.restore()}g++}while(null!=f)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",D);mxUtils.extend(z,mxCylinder);z.prototype.redrawPath=function(a,b,c,d,e,g){g?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.registerShape("message",
z);mxUtils.extend(C,mxShape);C.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",C);mxUtils.extend(E,mxShape);E.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};E.prototype.paintBackground=
function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",E);mxUtils.extend(H,mxEllipse);H.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",
H);mxUtils.extend(L,mxShape);L.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",L);mxUtils.extend(I,mxShape);I.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};I.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,
@@ -3028,125 +3030,126 @@ b==mxConstants.DIRECTION_EAST?(e=h*Math.max(0,Math.min(1,e)),f=[new mxPoint(g+e,
Math.min(1,e)),f=[new mxPoint(g,f),new mxPoint(g+h,f+e),new mxPoint(g+h,f+k-e),new mxPoint(g,f+k),new mxPoint(g,f)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.x<g||c.x>g+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(f,a,c)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),g=e?r.prototype.fixedSize:r.prototype.size;null!=b&&(g=mxUtils.getValue(b.style,
"size",g));var f=a.x,h=a.y,k=a.width,B=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),h=[new mxPoint(f,h),new mxPoint(f+k-e,h),new mxPoint(f+k,a),new mxPoint(f+k-e,h+B),new mxPoint(f,h+B),new mxPoint(f+e,a),new mxPoint(f,h)]):b==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,
Math.min(1,g)),h=[new mxPoint(f+e,h),new mxPoint(f+k,h),new mxPoint(f+k-e,a),new mxPoint(f+k,h+B),new mxPoint(f+e,h+B),new mxPoint(f,a),new mxPoint(f+e,h)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(B,g)):B*Math.max(0,Math.min(1,g)),h=[new mxPoint(f,h+e),new mxPoint(l,h),new mxPoint(f+k,h+e),new mxPoint(f+k,h+B),new mxPoint(l,h+B-e),new mxPoint(f,h+B),new mxPoint(f,h+e)]):(e=e?Math.max(0,Math.min(B,g)):B*Math.max(0,Math.min(1,g)),h=[new mxPoint(f,h),new mxPoint(l,h+e),new mxPoint(f+
-k,h),new mxPoint(f+k,h+B-e),new mxPoint(l,h+B),new mxPoint(f,h+B-e),new mxPoint(f,h)]);l=new mxPoint(l,a);d&&(c.x<f||c.x>f+k?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(h,l,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e=y.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var g=a.x,f=a.y,h=a.width,k=a.height,B=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,
+k,h),new mxPoint(f+k,h+B-e),new mxPoint(l,h+B),new mxPoint(f,h+B-e),new mxPoint(f,h)]);l=new mxPoint(l,a);d&&(c.x<f||c.x>f+k?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(h,l,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e=x.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var g=a.x,f=a.y,h=a.width,k=a.height,B=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,
mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),f=[new mxPoint(B,f),new mxPoint(g+h,f+e),new mxPoint(g+h,f+k-e),new mxPoint(B,f+k),new mxPoint(g,f+k-e),new mxPoint(g,f+e),new mxPoint(B,f)]):(e=h*Math.max(0,Math.min(1,e)),f=[new mxPoint(g+e,f),new mxPoint(g+h-e,f),new mxPoint(g+h,a),new mxPoint(g+h-e,f+k),new mxPoint(g+e,f+k),new mxPoint(g,a),new mxPoint(g+e,f)]);B=new mxPoint(B,a);d&&(c.x<g||c.x>g+
-h?B.y=c.y:B.x=c.x);return mxUtils.getPerimeterPoint(f,B,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(O,mxShape);O.prototype.size=10;O.prototype.paintBackground=function(a,b,c,d,e){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-g)/2,0,g,g);a.fillAndStroke();a.begin();a.moveTo(d/2,g);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",O);mxUtils.extend(S,mxShape);S.prototype.size=
-10;S.prototype.inset=2;S.prototype.paintBackground=function(a,b,c,d,e){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size)),f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,g+f);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-g)/2-f,g/2);a.quadTo((d-g)/2-f,g+f,d/2,g+f);a.quadTo((d+g)/2+f,g+f,(d+g)/2+f,g/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",S);mxUtils.extend(R,mxShape);R.prototype.paintBackground=
-function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",R);mxUtils.extend(G,mxShape);G.prototype.inset=2;G.prototype.paintBackground=function(a,b,c,d,e){var g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.ellipse(0,g,d-2*g,e-2*g);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",
+h?B.y=c.y:B.x=c.x);return mxUtils.getPerimeterPoint(f,B,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(N,mxShape);N.prototype.size=10;N.prototype.paintBackground=function(a,b,c,d,e){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-g)/2,0,g,g);a.fillAndStroke();a.begin();a.moveTo(d/2,g);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",N);mxUtils.extend(S,mxShape);S.prototype.size=
+10;S.prototype.inset=2;S.prototype.paintBackground=function(a,b,c,d,e){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size)),f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,g+f);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-g)/2-f,g/2);a.quadTo((d-g)/2-f,g+f,d/2,g+f);a.quadTo((d+g)/2+f,g+f,(d+g)/2+f,g/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",S);mxUtils.extend(Q,mxShape);Q.prototype.paintBackground=
+function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",Q);mxUtils.extend(G,mxShape);G.prototype.inset=2;G.prototype.paintBackground=function(a,b,c,d,e){var g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.ellipse(0,g,d-2*g,e-2*g);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",
G);mxUtils.extend(K,mxCylinder);K.prototype.jettyWidth=32;K.prototype.jettyHeight=12;K.prototype.redrawPath=function(a,b,c,d,e,g){var f=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=f/2;var f=c+f/2,h=.3*e-b/2,k=.7*e-b/2;g?(a.moveTo(c,h),a.lineTo(f,h),a.lineTo(f,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(f,k),a.lineTo(f,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),
-a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("component",K);mxUtils.extend(M,mxDoubleEllipse);M.prototype.outerStroke=!0;M.prototype.paintVertexShape=function(a,b,c,d,e){var g=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+g,c+g,d-2*g,e-2*g),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.registerShape("endState",M);
-mxUtils.extend(ba,M);ba.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ba);mxUtils.extend(Y,mxArrowConnector);Y.prototype.defaultWidth=4;Y.prototype.isOpenEnded=function(){return!0};Y.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Y.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Y);mxUtils.extend(A,mxArrowConnector);A.prototype.defaultWidth=10;A.prototype.defaultArrowWidth=
-20;A.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};A.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};A.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",A);mxUtils.extend(Q,mxActor);Q.prototype.size=30;Q.prototype.isRoundable=
-function(){return!0};Q.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("manualInput",Q);mxUtils.extend(P,mxRectangleShape);P.prototype.dx=20;P.prototype.dy=20;P.prototype.isHtmlAllowed=function(){return!1};
-P.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var g=0;if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.max(g,Math.min(d*f,e*f));f=Math.max(g,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));g=Math.max(g,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+g);a.lineTo(b+d,c+g);a.end();a.stroke();
-a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",P);mxUtils.extend(T,mxActor);T.prototype.dx=20;T.prototype.dy=20;T.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=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(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("corner",T);mxUtils.extend(da,mxActor);da.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(0,e);a.end();a.moveTo(d,0);a.lineTo(d,e);a.end();a.moveTo(0,e/2);a.lineTo(d,e/2);a.end()};mxCellRenderer.registerShape("crossbar",da);mxUtils.extend(V,mxActor);V.prototype.dx=20;V.prototype.dy=20;V.prototype.redrawPath=
-function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=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(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-b)/2,c),new mxPoint(0,
-c)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("tee",V);mxUtils.extend(U,mxActor);U.prototype.arrowWidth=.3;U.prototype.arrowSize=.2;U.prototype.redrawPath=function(a,b,c,d,e){var g=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));c=(e-g)/2;var g=c+g,f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
-[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,g),new mxPoint(0,g)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("singleArrow",U);mxUtils.extend(ka,mxActor);ka.prototype.redrawPath=function(a,b,c,d,e){var g=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",U.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",U.prototype.arrowSize))));c=(e-g)/2;var g=
-c+g,f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,g),new mxPoint(b,g),new mxPoint(b,e)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",ka);mxUtils.extend(ca,mxActor);ca.prototype.size=.1;ca.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",ca);mxUtils.extend(ga,mxActor);ga.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.registerShape("or",ga);mxUtils.extend(ha,mxActor);ha.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);
-a.close();a.end()};mxCellRenderer.registerShape("xor",ha);mxUtils.extend(Z,mxActor);Z.prototype.size=20;Z.prototype.isRoundable=function(){return!0};Z.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,
-c,!0);a.end()};mxCellRenderer.registerShape("loopLimit",Z);mxUtils.extend(aa,mxActor);aa.prototype.size=.375;aa.prototype.isRoundable=function(){return!0};aa.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};
-mxCellRenderer.registerShape("offPageConnector",aa);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",ea);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/
-2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",ia);mxUtils.extend(X,mxEllipse);X.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",X);
-mxUtils.extend(la,mxRhombus);la.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",la);mxUtils.extend(W,mxEllipse);W.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();
-a.fillAndStroke()};mxCellRenderer.registerShape("collate",W);mxUtils.extend(Aa,mxEllipse);Aa.prototype.paintVertexShape=function(a,b,c,d,e){var g=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,g);a.lineTo(b+10,g-5);a.moveTo(b,g);a.lineTo(b+10,g+5);a.moveTo(b,g);a.lineTo(b+d,g);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,g);a.lineTo(b+d-10,g-5);a.moveTo(b+d,g);a.lineTo(b+d-10,g+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",Aa);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=
-function(a,b,c,d,e){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(b,c,d,e),a.fill(),a.begin(),a.moveTo(b,c),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(b+d,c):a.moveTo(b+d,c),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(b+d,c+e):a.moveTo(b+d,c+e),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(b,c+e):a.moveTo(b,c+e),"1"==mxUtils.getValue(this.style,"left","1")&&
-a.lineTo(b,c-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",Ba);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b,c+e/2),a.lineTo(b+d,c+e/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",ta);mxUtils.extend(va,mxActor);va.prototype.redrawPath=
-function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.registerShape("delay",va);mxUtils.extend(oa,mxActor);oa.prototype.size=.2;oa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var g=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-g)/2;c=b+g;var f=(d-g)/2,g=f+g;a.moveTo(0,b);a.lineTo(f,b);a.lineTo(f,0);a.lineTo(g,0);a.lineTo(g,b);a.lineTo(d,b);a.lineTo(d,
-c);a.lineTo(g,c);a.lineTo(g,e);a.lineTo(f,e);a.lineTo(f,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.registerShape("cross",oa);mxUtils.extend(pa,mxActor);pa.prototype.size=.25;pa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.registerShape("display",pa);mxUtils.extend(na,
-mxConnector);na.prototype.origPaintEdgeShape=na.prototype.paintEdgeShape;na.prototype.paintEdgeShape=function(a,b,c){for(var d=[],e=0;e<b.length;e++)d.push(mxUtils.clone(b[e]));var e=a.state.dashed,g=a.state.fixDash;na.prototype.origPaintEdgeShape.apply(this,[a,d,c]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(e,g),na.prototype.origPaintEdgeShape.apply(this,[a,b,c])))};mxCellRenderer.registerShape("filledEdge",
-na);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var b=this.format.getSelectionState(),c=a.apply(this,arguments);"umlFrame"==b.style.shape&&c.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return c}}();mxMarker.addMarker("dash",function(a,b,c,d,e,g,f,h,k,l){var B=e*(f+k+1),m=g*(f+k+1);return function(){a.begin();a.moveTo(d.x-B/2-m/2,d.y-m/2+B/2);a.lineTo(d.x+
-m/2-3*B/2,d.y-3*m/2-B/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,g,f,h,k,l){var m=e*(f+k+1),B=g*(f+k+1);return function(){a.begin();a.moveTo(d.x-m/2-B/2,d.y-B/2+m/2);a.lineTo(d.x+B/2-3*m/2,d.y-3*B/2-m/2);a.moveTo(d.x-m/2+B/2,d.y-B/2-m/2);a.lineTo(d.x-B/2-3*m/2,d.y-3*B/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Ia);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,g,f,h,k,l){var m=d.clone(),B=Ia.apply(this,arguments),n=e*(f+2*k),p=g*(f+2*k);return function(){B.apply(this,
-arguments);a.begin();a.moveTo(m.x-e*k,m.y-g*k);a.lineTo(m.x-2*n+e*k,m.y-2*p+g*k);a.moveTo(m.x-n-p+g*k,m.y-p+n-e*k);a.lineTo(m.x+p-n-g*k,m.y-p-n+e*k);a.stroke()}});mxMarker.addMarker("halfCircle",function(a,b,c,d,e,g,f,h,k,l){var m=e*(f+k+1),B=g*(f+k+1),n=d.clone();d.x-=m;d.y-=B;return function(){a.begin();a.moveTo(n.x-B,n.y+m);a.quadTo(d.x-B,d.y+m,d.x,d.y);a.quadTo(d.x+B,d.y-m,n.x+B,n.y-m);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,g,f,h,k,l){b=e*k*1.118;c=g*k*1.118;e*=f+k;g*=f+k;
-var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-g-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-g/2,m.y-g+e/2):a.lineTo(m.x+g/2-e,m.y-g-e/2);a.lineTo(m.x-e,m.y-g);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,c,d,e,g,f,h,k,l,m){g*=h+l;f*=h+l;var B=e.clone();return function(){b.begin();b.moveTo(B.x,B.y);k?b.lineTo(B.x-g-f/a,B.y-f+g/a):b.lineTo(B.x+f/a-g,B.y-f-g/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ga=
-function(a,b,c){return qa(a,["width"],b,function(b,d,e,g,f){f=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(g.x+d*b/4+e*f/2,g.y+e*b/4-d*f/2)},function(b,d,e,g,f,h){b=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,h.x,h.y));a.style.width=Math.round(2*b)/a.view.scale-c})},qa=function(a,b,c,d,e){return N(a,b,function(b){var e=a.absolutePoints,g=e.length-1;b=a.view.translate;var f=a.view.scale,h=c?e[0]:e[g],e=c?e[1]:e[g-1],g=e.x-h.x,k=e.y-h.y,l=Math.sqrt(g*g+k*k),h=d.call(this,l,g/l,k/l,h,e);
-return new mxPoint(h.x/f-b.x,h.y/f-b.y)},function(b,d,g){var f=a.absolutePoints,h=f.length-1;b=a.view.translate;var k=a.view.scale,l=c?f[0]:f[h],f=c?f[1]:f[h-1],h=f.x-l.x,m=f.y-l.y,B=Math.sqrt(h*h+m*m);d.x=(d.x+b.x)*k;d.y=(d.y+b.y)*k;e.call(this,B,h/B,m/B,l,f,d,g)})},ja=function(a){return function(b){return[N(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",U.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,
-"arrowSize",U.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},Da=function(a,b,c){return function(d){var e=[N(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},
-function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(fa(d));return e}},ua=function(a,b,c,d,e){c=null!=c?c:1;return function(g){var f=[N(g,["size"],function(b){var c=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,"size",c?e:a));return new mxPoint(b.x+Math.max(0,Math.min(b.width,d*(c?1:b.width))),
-b.getCenterY())},function(a,b,d){var f=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=f?b.x-a.x:Math.max(0,Math.min(c,(b.x-a.x)/a.width));f&&!mxEvent.isAltDown(d.getEvent())&&(a=g.view.graph.snap(a));this.state.style.size=a},null,d)];b&&mxUtils.getValue(g.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(fa(g));return f}},Ha=function(a){return function(b){var c=[N(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));
-return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},null,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(fa(b));return c}},ra=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(a));return b}},fa=function(a,b){return N(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,
-0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(c.x+c.width-Math.min(c.width/2,e),c.y+d)}e=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/2,c.height/2),Math.min(c.width,c.height)*e),c.y+d)},function(b,c,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=
-Math.round(Math.max(0,Math.min(b.width,2*(b.x+b.width-c.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(b.width-c.x+b.x)/Math.min(b.width,b.height))))})},N=function(a,b,c,d,e,g){var f=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);f.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};f.getPosition=c;f.setPosition=d;f.ignoreGrid=null!=e?e:!0;if(g){var h=f.positionChanged;f.positionChanged=function(){h.apply(this,arguments);
-a.view.invalidate(this.state.cell);a.view.validate()}}return f},xa={link:function(a){return[Ga(a,!0,10),Ga(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(qa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,g){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
-5)*a.view.scale;return new mxPoint(e.x+c*(g+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(g+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,g,f,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,h.x,h.y));d=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);
-mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(qa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,g){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+
-c*(g+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(g+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,g,f,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,h.x,h.y));d=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],
-a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<b&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(qa(a,["width",mxConstants.STYLE_STARTSIZE,
-mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,g){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(g+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(g+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,g,f,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,h.x,h.y));d=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*
-(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),c.push(qa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
-!1,function(b,c,d,e,g){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(g+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(g+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,g,f,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,h.x,h.y));d=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/
-3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-
-parseFloat(a.style.startWidth))<b&&(a.style.endWidth=a.style.startWidth))})));return c},swimlane:function(a){var b=[N(a,[mxConstants.STYLE_STARTSIZE],function(b){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(b.getCenterX(),b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=
-1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(fa(a,c/2))}return b},label:ra(),ext:ra(),rectangle:ra(),triangle:ra(),rhombus:ra(),umlLifeline:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,
-parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[N(a,["width","height"],function(a){var b=Math.max(J.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",J.prototype.width))),c=Math.max(1.5*J.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",J.prototype.height)));
-return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(J.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*J.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[N(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,
-(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(a));return b},cross:function(a){return[N(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",oa.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},
-note:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=[N(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",Q.prototype.size)));
-return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(a));return b},dataStorage:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ca.prototype.size))));return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-
-b.x)/a.width))})]},callout:function(a){var b=[N(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));mxUtils.getValue(this.state.style,"base",w.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height-b)},function(a,b){mxUtils.getValue(this.state.style,"base",w.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,
-a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),N(a,["position2"],function(a){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",w.prototype.position2)));return new mxPoint(a.x+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),N(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),
-c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",w.prototype.base)));return new mxPoint(a.x+Math.min(a.width,c*a.width+d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,
-!1)&&b.push(fa(a));return b},internalStorage:function(a){var b=[N(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",P.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",P.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,
-!1)&&b.push(fa(a));return b},corner:function(a){return[N(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",T.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",T.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[N(a,["dx","dy"],function(a){var b=
-Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",V.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",V.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},singleArrow:ja(1),doubleArrow:ja(.5),folder:function(a){return[N(a,["tabWidth","tabHeight"],function(a){var b=
-Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",h.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",h.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&
-(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[N(a,["size"],function(a){var b=Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+
-a.height-b.y)/a.height))})]},step:ua(r.prototype.size,!0,null,!0,r.prototype.fixedSize),hexagon:ua(y.prototype.size,!0,.5,!0),curlyBracket:ua(p.prototype.size,!1),display:ua(pa.prototype.size,!1),cube:Da(1,a.prototype.size,!1),card:Da(.5,g.prototype.size,!0),loopLimit:Da(.5,Z.prototype.size,!0),trapezoid:Ha(.5),parallelogram:Ha(1)};Graph.createHandle=N;Graph.handleFactory=xa;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=
-this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=xa[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=xa[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=
-mxConstants.SHAPE_CONNECTOR);a=xa[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var ya=new mxPoint(1,0),za=new mxPoint(1,0),ja=mxUtils.toRadians(-30),ya=mxUtils.getRotatedPoint(ya,Math.cos(ja),Math.sin(ja)),ja=mxUtils.toRadians(-150),za=mxUtils.getRotatedPoint(za,Math.cos(ja),Math.sin(ja));mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var g=a.view;d=null!=d&&0<d.length?d[0]:null;var f=a.absolutePoints,h=f[0],f=f[f.length-1];null!=
-d&&(d=g.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==f&&null!=c&&(f=new mxPoint(c.getCenterX(),c.getCenterY()));var k=ya.x,l=ya.y,m=za.x,n=za.y,p="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=f&&null!=h){a=function(a,b,c){a-=q.x;var d=b-q.y;b=(n*a-m*d)/(k*n-l*m);a=(l*a-k*d)/(l*m-k*n);p?(c&&(q=new mxPoint(q.x+k*b,q.y+l*b),e.push(q)),q=new mxPoint(q.x+m*a,q.y+n*a)):(c&&(q=new mxPoint(q.x+m*a,q.y+n*a),e.push(q)),q=new mxPoint(q.x+
-k*b,q.y+l*b));e.push(q)};var q=h;null==d&&(d=new mxPoint(h.x+(f.x-h.x)/2,h.y+(f.y-h.y)/2));a(d.x,d.y,!0);a(f.x,f.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Oa=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Oa.apply(this,arguments)};c.prototype.constraints=[];d.prototype.getConstraints=function(a,b,c){a=[];var d=
-Math.tan(mxUtils.toRadians(30)),e=(.5-d)/2,d=Math.min(b,c/(.5+d));b=(b-d)/2;c=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*d,c+d*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.75*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*d,c+(1-e)*d));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,b,c+.75*d));return a};w.prototype.getConstraints=function(a,b,c){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c-d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,
-c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-d)));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.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),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,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))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,
-Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(1,
-1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};g.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(b+d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};a.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-d)));return a};
-h.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,d,e)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,e)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,b,.25*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};P.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;
-X.prototype.constraints=mxEllipse.prototype.constraints;ta.prototype.constraints=mxEllipse.prototype.constraints;Q.prototype.constraints=mxRectangleShape.prototype.constraints;va.prototype.constraints=mxRectangleShape.prototype.constraints;pa.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(b,c/2),e=Math.min(b-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));return a};Z.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=
-mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
-.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];C.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,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)];K.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)];e.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)];k.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)];r.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)];O.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)];m.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.constraints=mxRectangleShape.prototype.constraints;l.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;V.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*b+.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),c));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*b-.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e));return a};T.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,
-"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return a};da.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)];U.prototype.getConstraints=function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"arrowSize",this.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),c-d));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,c-d));return a};ka.prototype.getConstraints=function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",U.prototype.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",U.prototype.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,d));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,b-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));return a};oa.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(c,b),e=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),d=(c-e)/2,g=d+e,f=(b-e)/2,e=f+e;a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,f,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,c));a.push(new mxConnectionConstraint(new mxPoint(.5,
-1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+e),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,g));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(b+e),g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,d));return a};F.prototype.constraints=
-null;ga.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)];ha.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)];R.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];G.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
+a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("component",K);mxUtils.extend(O,mxRectangleShape);O.prototype.paintForeground=function(a,b,c,d,e){var g=d/2,f=e/2,h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(b+g,c),new mxPoint(b+d,c+f),new mxPoint(b+g,c+e),new mxPoint(b,c+f)],this.isRounded,h,!0);a.stroke();
+mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",O);mxUtils.extend(Y,mxDoubleEllipse);Y.prototype.outerStroke=!0;Y.prototype.paintVertexShape=function(a,b,c,d,e){var g=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+g,c+g,d-2*g,e-2*g),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.registerShape("endState",Y);mxUtils.extend(ea,Y);ea.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",
+ea);mxUtils.extend(A,mxArrowConnector);A.prototype.defaultWidth=4;A.prototype.isOpenEnded=function(){return!0};A.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};A.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",A);mxUtils.extend(P,mxArrowConnector);P.prototype.defaultWidth=10;P.prototype.defaultArrowWidth=20;P.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+
+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};P.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};P.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",P);mxUtils.extend(R,mxActor);R.prototype.size=30;R.prototype.isRoundable=function(){return!0};R.prototype.redrawPath=function(a,b,
+c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("manualInput",R);mxUtils.extend(T,mxRectangleShape);T.prototype.dx=20;T.prototype.dy=20;T.prototype.isHtmlAllowed=function(){return!1};T.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,
+arguments);var g=0;if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.max(g,Math.min(d*f,e*f));f=Math.max(g,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));g=Math.max(g,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+g);a.lineTo(b+d,c+g);a.end();a.stroke();a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",
+T);mxUtils.extend(W,mxActor);W.prototype.dx=20;W.prototype.dy=20;W.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=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(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,
+e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("corner",W);mxUtils.extend(ca,mxActor);ca.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(0,e);a.end();a.moveTo(d,0);a.lineTo(d,e);a.end();a.moveTo(0,e/2);a.lineTo(d,e/2);a.end()};mxCellRenderer.registerShape("crossbar",ca);mxUtils.extend(aa,mxActor);aa.prototype.dx=20;aa.prototype.dy=20;aa.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));
+c=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(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-b)/2,c),new mxPoint(0,c)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("tee",aa);mxUtils.extend(U,mxActor);U.prototype.arrowWidth=
+.3;U.prototype.arrowSize=.2;U.prototype.redrawPath=function(a,b,c,d,e){var g=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));c=(e-g)/2;var g=c+g,f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,g),
+new mxPoint(0,g)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("singleArrow",U);mxUtils.extend(fa,mxActor);fa.prototype.redrawPath=function(a,b,c,d,e){var g=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",U.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",U.prototype.arrowSize))));c=(e-g)/2;var g=c+g,f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,
+e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,g),new mxPoint(b,g),new mxPoint(b,e)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",fa);mxUtils.extend(da,mxActor);da.prototype.size=.1;da.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-
+2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",da);mxUtils.extend(ga,mxActor);ga.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.registerShape("or",ga);mxUtils.extend(ha,mxActor);ha.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",ha);mxUtils.extend(ba,mxActor);ba.prototype.size=
+20;ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("loopLimit",ba);mxUtils.extend(Z,mxActor);Z.prototype.size=
+.375;Z.prototype.isRoundable=function(){return!0};Z.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",Z);mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=
+function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",ja);mxUtils.extend(X,mxEllipse);X.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",
+X);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",ka);mxUtils.extend(V,mxRhombus);V.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);
+a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",V);mxUtils.extend(Aa,mxEllipse);Aa.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",Aa);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=function(a,
+b,c,d,e){var g=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,g);a.lineTo(b+10,g-5);a.moveTo(b,g);a.lineTo(b+10,g+5);a.moveTo(b,g);a.lineTo(b+d,g);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,g);a.lineTo(b+d-10,g-5);a.moveTo(b+d,g);a.lineTo(b+d-10,g+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",Ba);mxUtils.extend(Ca,mxEllipse);Ca.prototype.paintVertexShape=function(a,b,c,d,e){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);
+null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(b,c,d,e),a.fill(),a.begin(),a.moveTo(b,c),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(b+d,c):a.moveTo(b+d,c),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(b+d,c+e):a.moveTo(b+d,c+e),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(b,c+e):a.moveTo(b,c+e),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(b,c-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",Ca);mxUtils.extend(ua,
+mxEllipse);ua.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b,c+e/2),a.lineTo(b+d,c+e/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",ua);mxUtils.extend(va,mxActor);va.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,
+e);a.close();a.end()};mxCellRenderer.registerShape("delay",va);mxUtils.extend(pa,mxActor);pa.prototype.size=.2;pa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var g=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-g)/2;c=b+g;var f=(d-g)/2,g=f+g;a.moveTo(0,b);a.lineTo(f,b);a.lineTo(f,0);a.lineTo(g,0);a.lineTo(g,b);a.lineTo(d,b);a.lineTo(d,c);a.lineTo(g,c);a.lineTo(g,e);a.lineTo(f,e);a.lineTo(f,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.registerShape("cross",
+pa);mxUtils.extend(qa,mxActor);qa.prototype.size=.25;qa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.registerShape("display",qa);mxUtils.extend(na,mxConnector);na.prototype.origPaintEdgeShape=na.prototype.paintEdgeShape;na.prototype.paintEdgeShape=function(a,b,c){for(var d=
+[],e=0;e<b.length;e++)d.push(mxUtils.clone(b[e]));var e=a.state.dashed,g=a.state.fixDash;na.prototype.origPaintEdgeShape.apply(this,[a,d,c]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(e,g),na.prototype.origPaintEdgeShape.apply(this,[a,b,c])))};mxCellRenderer.registerShape("filledEdge",na);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;
+StyleFormatPanel.prototype.getCustomColors=function(){var b=this.format.getSelectionState(),c=a.apply(this,arguments);"umlFrame"==b.style.shape&&c.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return c}}();mxMarker.addMarker("dash",function(a,b,c,d,e,g,f,h,k,l){var B=e*(f+k+1),m=g*(f+k+1);return function(){a.begin();a.moveTo(d.x-B/2-m/2,d.y-m/2+B/2);a.lineTo(d.x+m/2-3*B/2,d.y-3*m/2-B/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,g,f,h,k,
+l){var m=e*(f+k+1),B=g*(f+k+1);return function(){a.begin();a.moveTo(d.x-m/2-B/2,d.y-B/2+m/2);a.lineTo(d.x+B/2-3*m/2,d.y-3*B/2-m/2);a.moveTo(d.x-m/2+B/2,d.y-B/2-m/2);a.lineTo(d.x-B/2-3*m/2,d.y-3*B/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Ga);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,g,f,h,k,l){var m=d.clone(),B=Ga.apply(this,arguments),n=e*(f+2*k),p=g*(f+2*k);return function(){B.apply(this,arguments);a.begin();a.moveTo(m.x-e*k,m.y-g*k);a.lineTo(m.x-2*n+e*k,m.y-2*p+g*k);a.moveTo(m.x-
+n-p+g*k,m.y-p+n-e*k);a.lineTo(m.x+p-n-g*k,m.y-p-n+e*k);a.stroke()}});mxMarker.addMarker("halfCircle",function(a,b,c,d,e,g,f,h,k,l){var m=e*(f+k+1),B=g*(f+k+1),n=d.clone();d.x-=m;d.y-=B;return function(){a.begin();a.moveTo(n.x-B,n.y+m);a.quadTo(d.x-B,d.y+m,d.x,d.y);a.quadTo(d.x+B,d.y-m,n.x+B,n.y-m);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,g,f,h,k,l){b=e*k*1.118;c=g*k*1.118;e*=f+k;g*=f+k;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-g-c;return function(){a.begin();a.moveTo(m.x,
+m.y);h?a.lineTo(m.x-e-g/2,m.y-g+e/2):a.lineTo(m.x+g/2-e,m.y-g-e/2);a.lineTo(m.x-e,m.y-g);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,c,d,e,g,f,h,k,l,m){g*=h+l;f*=h+l;var B=e.clone();return function(){b.begin();b.moveTo(B.x,B.y);k?b.lineTo(B.x-g-f/a,B.y-f+g/a):b.lineTo(B.x+f/a-g,B.y-f-g/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ia=function(a,b,c){return ra(a,["width"],b,function(b,d,e,g,f){f=a.shape.getEdgeWidth()*
+a.view.scale+c;return new mxPoint(g.x+d*b/4+e*f/2,g.y+e*b/4-d*f/2)},function(b,d,e,g,f,h){b=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,h.x,h.y));a.style.width=Math.round(2*b)/a.view.scale-c})},ra=function(a,b,c,d,e){return M(a,b,function(b){var e=a.absolutePoints,g=e.length-1;b=a.view.translate;var f=a.view.scale,h=c?e[0]:e[g],e=c?e[1]:e[g-1],g=e.x-h.x,k=e.y-h.y,l=Math.sqrt(g*g+k*k),h=d.call(this,l,g/l,k/l,h,e);return new mxPoint(h.x/f-b.x,h.y/f-b.y)},function(b,d,g){var f=a.absolutePoints,h=f.length-
+1;b=a.view.translate;var k=a.view.scale,l=c?f[0]:f[h],f=c?f[1]:f[h-1],h=f.x-l.x,m=f.y-l.y,B=Math.sqrt(h*h+m*m);d.x=(d.x+b.x)*k;d.y=(d.y+b.y)*k;e.call(this,B,h/B,m/B,l,f,d,g)})},la=function(a){return function(b){return[M(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",U.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",U.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-
+c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},Ea=function(a,b,c){return function(d){var e=[M(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,
+c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ia(d));return e}},ta=function(a,b,c,d,e){c=null!=c?c:1;return function(g){var f=[M(g,["size"],function(b){var c=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,"size",c?e:a));return new mxPoint(b.x+Math.max(0,Math.min(b.width,d*(c?1:b.width))),b.getCenterY())},function(a,b,d){var f=null!=e?"0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0"):null;a=f?b.x-a.x:Math.max(0,Math.min(c,(b.x-a.x)/a.width));f&&!mxEvent.isAltDown(d.getEvent())&&(a=g.view.graph.snap(a));this.state.style.size=a},null,d)];b&&mxUtils.getValue(g.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(ia(g));return f}},Ja=function(a){return function(b){var c=[M(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=
+Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},null,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ia(b));return c}},oa=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b}},ia=function(a,b){return M(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;return new mxPoint(c.x+c.width-Math.min(c.width/2,e),c.y+d)}e=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/2,c.height/2),Math.min(c.width,c.height)*e),c.y+d)},function(b,c,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(b.width,2*(b.x+b.width-c.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=
+Math.round(Math.min(50,Math.max(0,100*(b.width-c.x+b.x)/Math.min(b.width,b.height))))})},M=function(a,b,c,d,e,g){var f=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);f.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};f.getPosition=c;f.setPosition=d;f.ignoreGrid=null!=e?e:!0;if(g){var h=f.positionChanged;f.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return f},xa={link:function(a){return[Ia(a,!0,10),
+Ia(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ra(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,g){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(g+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+
+d*(g+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,g,f,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,h.x,h.y));d=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-
+parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,g){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(g+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(g+a.shape.strokewidth*
+a.view.scale)-c*b/2)},function(c,d,e,g,f,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,h.x,h.y));d=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(k.getEvent())||
+(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<b&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ra(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,g){b=(a.shape.getEdgeWidth()-
+a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(g+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(g+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,g,f,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,h.x,h.y));d=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*
+c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),c.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,g){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*
+a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(g+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(g+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,g,f,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,h.x,h.y));d=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/
+a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<b&&(a.style.endWidth=a.style.startWidth))})));return c},
+swimlane:function(a){var b=[M(a,[mxConstants.STYLE_STARTSIZE],function(b){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(b.getCenterX(),b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,
+Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(ia(a,c/2))}return b},label:oa(),ext:oa(),rectangle:oa(),triangle:oa(),rhombus:oa(),umlLifeline:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size))));return new mxPoint(a.getCenterX(),
+a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[M(a,["width","height"],function(a){var b=Math.max(J.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",J.prototype.width))),c=Math.max(1.5*J.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",J.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(J.prototype.corner,
+Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*J.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[M(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b},cross:function(a){return[M(a,
+["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",pa.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},note:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,
+"size",f.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=[M(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",R.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,
+mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b},dataStorage:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",da.prototype.size))));return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))})]},callout:function(a){var b=[M(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),
+c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));mxUtils.getValue(this.state.style,"base",w.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height-b)},function(a,b){mxUtils.getValue(this.state.style,"base",w.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),M(a,["position2"],function(a){var b=Math.max(0,Math.min(1,
+mxUtils.getValue(this.state.style,"position2",w.prototype.position2)));return new mxPoint(a.x+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),M(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
+"base",w.prototype.base)));return new mxPoint(a.x+Math.min(a.width,c*a.width+d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b},internalStorage:function(a){var b=[M(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
+"dx",T.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",T.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b},corner:function(a){return[M(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
+"dx",W.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",W.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[M(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",aa.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
+"dy",aa.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},singleArrow:la(1),doubleArrow:la(.5),folder:function(a){return[M(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",h.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
+"tabHeight",h.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[M(a,
+["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=
+Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:ta(r.prototype.size,!0,null,!0,r.prototype.fixedSize),hexagon:ta(x.prototype.size,!0,.5,!0),curlyBracket:ta(p.prototype.size,!1),display:ta(qa.prototype.size,
+!1),cube:Ea(1,a.prototype.size,!1),card:Ea(.5,g.prototype.size,!0),loopLimit:Ea(.5,ba.prototype.size,!0),trapezoid:Ja(.5),parallelogram:Ja(1)};Graph.createHandle=M;Graph.handleFactory=xa;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=xa[a];null==a&&null!=this.state.shape&&
+this.state.shape.isRoundable()&&(a=xa[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=xa[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var ya=new mxPoint(1,0),za=new mxPoint(1,
+0),la=mxUtils.toRadians(-30),ya=mxUtils.getRotatedPoint(ya,Math.cos(la),Math.sin(la)),la=mxUtils.toRadians(-150),za=mxUtils.getRotatedPoint(za,Math.cos(la),Math.sin(la));mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var g=a.view;d=null!=d&&0<d.length?d[0]:null;var f=a.absolutePoints,h=f[0],f=f[f.length-1];null!=d&&(d=g.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==f&&null!=c&&(f=new mxPoint(c.getCenterX(),c.getCenterY()));var k=ya.x,l=ya.y,
+m=za.x,n=za.y,p="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=f&&null!=h){a=function(a,b,c){a-=q.x;var d=b-q.y;b=(n*a-m*d)/(k*n-l*m);a=(l*a-k*d)/(l*m-k*n);p?(c&&(q=new mxPoint(q.x+k*b,q.y+l*b),e.push(q)),q=new mxPoint(q.x+m*a,q.y+n*a)):(c&&(q=new mxPoint(q.x+m*a,q.y+n*a),e.push(q)),q=new mxPoint(q.x+k*b,q.y+l*b));e.push(q)};var q=h;null==d&&(d=new mxPoint(h.x+(f.x-h.x)/2,h.y+(f.y-h.y)/2));a(d.x,d.y,!0);a(f.x,f.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);
+var Pa=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Pa.apply(this,arguments)};c.prototype.constraints=[];d.prototype.getConstraints=function(a,b,c){a=[];var d=Math.tan(mxUtils.toRadians(30)),e=(.5-d)/2,d=Math.min(b,c/(.5+d));b=(b-d)/2;c=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,b+.5*d,c+d*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.75*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*d,c+(1-e)*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.75*d));return a};w.prototype.getConstraints=function(a,b,c){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c-d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-d)));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.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),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),
+new mxConnectionConstraint(new mxPoint(.75,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))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;
+mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;y.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,
+0),!1));return a};g.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};a.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),c));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-d)));return a};h.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,
+"tabPosition",this.tabPosition)?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,b-d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,e)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.25*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
+null,b,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,
+1),!1));return a};T.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=mxRectangleShape.prototype.constraints;ja.prototype.constraints=mxEllipse.prototype.constraints;X.prototype.constraints=mxEllipse.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;ua.prototype.constraints=mxEllipse.prototype.constraints;R.prototype.constraints=mxRectangleShape.prototype.constraints;va.prototype.constraints=mxRectangleShape.prototype.constraints;qa.prototype.getConstraints=
+function(a,b,c){a=[];var d=Math.min(b,c/2),e=Math.min(b-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,b-d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));return a};ba.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,
+.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];C.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,
+0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,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)];K.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)];e.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)];k.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)];r.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)];N.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)];m.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.constraints=mxRectangleShape.prototype.constraints;l.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;aa.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*b+.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(b+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),c));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),e));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.25*b-.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e));return a};W.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c));a.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return a};ca.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)];U.prototype.getConstraints=function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,b-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));return a};fa.prototype.getConstraints=function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",U.prototype.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowSize",U.prototype.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,e,c));return a};pa.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(c,b),e=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),d=(c-e)/2,g=d+e,f=(b-e)/2,e=f+e;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,e,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,c));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,g));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(b+e),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+e),g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,d));return a};F.prototype.constraints=null;ga.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)];ha.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)];Q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.5),!1)];G.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){function a(a){b.escape();var c=b.getDeletableCells(b.getSelectionCells());if(null!=c&&0<c.length){var d=b.selectParentAfterDelete?b.model.getParents(c):null;b.removeCells(c,a);if(null!=d){a=[];for(c=0;c<d.length;c++)b.model.contains(d[c])&&(b.model.isVertex(d[c])||b.model.isEdge(d[c]))&&a.push(d[c]);b.setSelectionCells(a)}}}var c=this.editorUi,d=c.editor,b=d.graph,f=function(){return Action.prototype.isEnabled.apply(this,arguments)&&b.isEnabled()};this.addAction("new...",
function(){b.openLink(c.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";c.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){c.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var c=mxUtils.parseXml(a);d.graph.setSelectionCells(d.graph.importGraphModel(c.documentElement))}catch(m){mxUtils.alert(mxResources.get("invalidOrMissingFile")+
": "+m.message)}}));c.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=f;this.addAction("save",function(){c.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=f;this.addAction("saveAs...",function(){c.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=f;this.addAction("export...",function(){c.showDialog((new ExportDialog(c)).container,300,296,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(c);c.showDialog(a.container,
620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){c.showDialog((new PageSetupDialog(c)).container,320,220,!0,!0)}).isEnabled=f;this.addAction("print...",function(){c.showDialog((new PrintDialog(c)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(b,null,10,10)});this.addAction("undo",function(){c.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){c.redo()},null,"sprite-redo",mxClient.IS_WIN?
-Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){mxClipboard.cut(b)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){mxClipboard.copy(b)},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&mxClipboard.paste(b)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){b.getModel().beginUpdate();
+Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){mxClipboard.cut(b)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{mxClipboard.copy(b)}catch(g){c.handleError(g)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&mxClipboard.paste(b)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){b.getModel().beginUpdate();
try{var c=mxClipboard.paste(b);if(null!=c){a=!0;for(var d=0;d<c.length&&a;d++)a=a&&b.model.isEdge(c[d]);var e=b.view.translate,g=b.view.scale,f=e.x,h=e.y,e=null;if(1==c.length&&a){var v=b.getCellGeometry(c[0]);null!=v&&(e=v.getTerminalPoint(!0))}e=null!=e?e:b.getBoundingBoxFromGeometry(c,a);if(null!=e){var t=Math.round(b.snap(b.popupMenuHandler.triggerX/g-f)),u=Math.round(b.snap(b.popupMenuHandler.triggerY/g-h));b.cellsMoved(c,t-e.x,u-e.y)}}}finally{b.getModel().endUpdate()}}});this.addAction("copySize",
function(a){a=b.getSelectionCell();b.isEnabled()&&null!=a&&b.getModel().isVertex(a)&&(a=b.getCellGeometry(a),null!=a&&(c.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",function(a){if(b.isEnabled()&&!b.isSelectionEmpty()&&null!=c.copiedSize){b.getModel().beginUpdate();try{var d=b.getSelectionCells();for(a=0;a<d.length;a++)if(b.getModel().isVertex(d[a])){var e=b.getCellGeometry(d[a]);null!=e&&(e=e.clone(),e.width=c.copiedSize.width,e.height=
c.copiedSize.height,b.getModel().setGeometry(d[a],e))}}finally{b.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{b.setSelectionCells(b.duplicateCells())}catch(g){c.handleError(g)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),
@@ -3208,9 +3211,9 @@ null,mxUtils.bind(this,function(){this.customFontSizes=[]}),b);c.addSeparator(b)
b);c.addItem(mxResources.get("middle"),null,function(){a.alignCells(mxConstants.ALIGN_MIDDLE)},b);c.addItem(mxResources.get("bottomAlign"),null,function(){a.alignCells(mxConstants.ALIGN_BOTTOM)},b)})));this.put("distribute",new Menu(mxUtils.bind(this,function(c,b){c.addItem(mxResources.get("horizontal"),null,function(){a.distributeCells(!0)},b);c.addItem(mxResources.get("vertical"),null,function(){a.distributeCells(!1)},b)})));this.put("layout",new Menu(mxUtils.bind(this,function(c,b){var d=mxUtils.bind(this,
function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});c.addItem(mxResources.get("horizontalFlow"),null,mxUtils.bind(this,function(){var b=new mxHierarchicalLayout(a,mxConstants.DIRECTION_WEST);this.editorUi.executeLayout(function(){var c=a.getSelectionCells();b.execute(a.getDefaultParent(),0==c.length?null:c)},!0)}),b);c.addItem(mxResources.get("verticalFlow"),
null,mxUtils.bind(this,function(){var b=new mxHierarchicalLayout(a,mxConstants.DIRECTION_NORTH);this.editorUi.executeLayout(function(){var c=a.getSelectionCells();b.execute(a.getDefaultParent(),0==c.length?null:c)},!0)}),b);c.addSeparator(b);c.addItem(mxResources.get("horizontalTree"),null,mxUtils.bind(this,function(){var b=a.getSelectionCell(),c=null;null==b||0==a.getModel().getChildCount(b)?0==a.getModel().getEdgeCount(b)&&(c=a.findTreeRoots(a.getDefaultParent())):c=a.findTreeRoots(b);null!=c&&
-0<c.length&&(b=c[0]);if(null!=b){var g=new mxCompactTreeLayout(a,!0);g.edgeRouting=!1;g.levelDistance=30;d(g.levelDistance,mxUtils.bind(this,function(c){g.levelDistance=c;this.editorUi.executeLayout(function(){g.execute(a.getDefaultParent(),b)},!0)}))}}),b);c.addItem(mxResources.get("verticalTree"),null,mxUtils.bind(this,function(){var b=a.getSelectionCell(),c=null;null==b||0==a.getModel().getChildCount(b)?0==a.getModel().getEdgeCount(b)&&(c=a.findTreeRoots(a.getDefaultParent())):c=a.findTreeRoots(b);
-null!=c&&0<c.length&&(b=c[0]);if(null!=b){var g=new mxCompactTreeLayout(a,!1);g.edgeRouting=!1;g.levelDistance=30;d(g.levelDistance,mxUtils.bind(this,function(c){g.levelDistance=c;this.editorUi.executeLayout(function(){g.execute(a.getDefaultParent(),b)},!0)}))}}),b);c.addItem(mxResources.get("radialTree"),null,mxUtils.bind(this,function(){var b=a.getSelectionCell(),c=null;null==b||0==a.getModel().getChildCount(b)?0==a.getModel().getEdgeCount(b)&&(c=a.findTreeRoots(a.getDefaultParent())):c=a.findTreeRoots(b);
-null!=c&&0<c.length&&(b=c[0]);if(null!=b){var g=new mxRadialTreeLayout(a,!1);g.levelDistance=80;g.autoRadius=!0;d(g.levelDistance,mxUtils.bind(this,function(c){g.levelDistance=c;this.editorUi.executeLayout(function(){g.execute(a.getDefaultParent(),b);a.isSelectionEmpty()||(b=a.getModel().getParent(b),a.getModel().isVertex(b)&&a.updateGroupBounds([b],2*a.gridSize,!0))},!0)}))}}),b);c.addSeparator(b);c.addItem(mxResources.get("organic"),null,mxUtils.bind(this,function(){var b=new mxFastOrganicLayout(a);
+0<c.length&&(b=c[0]);if(null!=b){var f=new mxCompactTreeLayout(a,!0);f.edgeRouting=!1;f.levelDistance=30;d(f.levelDistance,mxUtils.bind(this,function(c){f.levelDistance=c;this.editorUi.executeLayout(function(){f.execute(a.getDefaultParent(),b)},!0)}))}}),b);c.addItem(mxResources.get("verticalTree"),null,mxUtils.bind(this,function(){var b=a.getSelectionCell(),c=null;null==b||0==a.getModel().getChildCount(b)?0==a.getModel().getEdgeCount(b)&&(c=a.findTreeRoots(a.getDefaultParent())):c=a.findTreeRoots(b);
+null!=c&&0<c.length&&(b=c[0]);if(null!=b){var f=new mxCompactTreeLayout(a,!1);f.edgeRouting=!1;f.levelDistance=30;d(f.levelDistance,mxUtils.bind(this,function(c){f.levelDistance=c;this.editorUi.executeLayout(function(){f.execute(a.getDefaultParent(),b)},!0)}))}}),b);c.addItem(mxResources.get("radialTree"),null,mxUtils.bind(this,function(){var b=a.getSelectionCell(),c=null;null==b||0==a.getModel().getChildCount(b)?0==a.getModel().getEdgeCount(b)&&(c=a.findTreeRoots(a.getDefaultParent())):c=a.findTreeRoots(b);
+null!=c&&0<c.length&&(b=c[0]);if(null!=b){var f=new mxRadialTreeLayout(a,!1);f.levelDistance=80;f.autoRadius=!0;d(f.levelDistance,mxUtils.bind(this,function(c){f.levelDistance=c;this.editorUi.executeLayout(function(){f.execute(a.getDefaultParent(),b);a.isSelectionEmpty()||(b=a.getModel().getParent(b),a.getModel().isVertex(b)&&a.updateGroupBounds([b],2*a.gridSize,!0))},!0)}))}}),b);c.addSeparator(b);c.addItem(mxResources.get("organic"),null,mxUtils.bind(this,function(){var b=new mxFastOrganicLayout(a);
d(b.forceConstant,mxUtils.bind(this,function(c){b.forceConstant=c;this.editorUi.executeLayout(function(){var c=a.getSelectionCell();if(null==c||0==a.getModel().getChildCount(c))c=a.getDefaultParent();b.execute(c);a.getModel().isVertex(c)&&a.updateGroupBounds([c],2*a.gridSize,!0)},!0)}))}),b);c.addItem(mxResources.get("circle"),null,mxUtils.bind(this,function(){var b=new mxCircleLayout(a);this.editorUi.executeLayout(function(){var c=a.getSelectionCell();if(null==c||0==a.getModel().getChildCount(c))c=
a.getDefaultParent();b.execute(c);a.getModel().isVertex(c)&&a.updateGroupBounds([c],2*a.gridSize,!0)},!0)}),b)})));this.put("navigation",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"home - exitGroup enterGroup - expand collapse - collapsible".split(" "),b)})));this.put("arrange",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["toFront","toBack","-"],b);this.addSubmenu("direction",a,b);this.addMenuItems(a,["turn","-"],b);this.addSubmenu("align",a,b);this.addSubmenu("distribute",
a,b);a.addSeparator(b);this.addSubmenu("navigation",a,b);this.addSubmenu("insert",a,b);this.addSubmenu("layout",a,b);this.addMenuItems(a,"- group ungroup removeFromGroup - clearWaypoints autosize".split(" "),b)}))).isEnabled=c;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["insertLink","insertImage"],b)})));this.put("view",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,(null!=this.editorUi.format?["formatPanel"]:[]).concat("outline layers - pageView pageScale - scrollbars tooltips - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),
@@ -3317,7 +3320,7 @@ d.style.height="360px";d.style.marginBottom="16px";d.value=mxUtils.getPrettyXml(
EditDiagramDialog.showNewWindowOption&&f.appendChild(e);a.editor.graph.isEnabled()&&(e=document.createElement("option"),e.setAttribute("value","import"),mxUtils.write(e,mxResources.get("addToExistingDrawing")),f.appendChild(e));c.appendChild(f);e=mxUtils.button(mxResources.get("ok"),function(){var b=Graph.zapGremlins(mxUtils.trim(d.value)),c=null;if("new"==f.value)a.hideDialog(),a.editor.editAsNew(b);else if("replace"==f.value){a.editor.graph.model.beginUpdate();try{a.editor.setGraphXml(mxUtils.parseXml(b).documentElement),
a.hideDialog()}catch(n){c=n}finally{a.editor.graph.model.endUpdate()}}else if("import"==f.value){a.editor.graph.model.beginUpdate();try{var e=mxUtils.parseXml(b),l=new mxGraphModel;(new mxCodec(e)).decode(e.documentElement,l);var m=l.getChildren(l.getChildAt(l.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(m));a.hideDialog()}catch(n){c=n}finally{a.editor.graph.model.endUpdate()}}null!=c&&mxUtils.alert(c.message)});e.className="geBtn gePrimaryBtn";c.appendChild(e);a.editor.cancelFirst||
c.appendChild(b);this.container=c};EditDiagramDialog.showNewWindowOption=!0;
-var ExportDialog=function(a){function c(){var a=m.value,b=a.lastIndexOf(".");m.value=0<b?a.substring(0,b+1)+n.value:a+"."+n.value;"xml"===n.value?(p.setAttribute("disabled","true"),q.setAttribute("disabled","true"),v.setAttribute("disabled","true"),y.setAttribute("disabled","true")):(p.removeAttribute("disabled"),q.removeAttribute("disabled"),v.removeAttribute("disabled"),y.removeAttribute("disabled"));"png"===n.value||"svg"===n.value?r.removeAttribute("disabled"):r.setAttribute("disabled","disabled");
+var ExportDialog=function(a){function c(){var a=m.value,b=a.lastIndexOf(".");m.value=0<b?a.substring(0,b+1)+n.value:a+"."+n.value;"xml"===n.value?(p.setAttribute("disabled","true"),q.setAttribute("disabled","true"),v.setAttribute("disabled","true"),x.setAttribute("disabled","true")):(p.removeAttribute("disabled"),q.removeAttribute("disabled"),v.removeAttribute("disabled"),x.removeAttribute("disabled"));"png"===n.value||"svg"===n.value?r.removeAttribute("disabled"):r.setAttribute("disabled","disabled");
"png"===n.value?(t.removeAttribute("disabled"),u.removeAttribute("disabled")):(t.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"))}function d(){q.style.backgroundColor=q.value*v.value>MAX_AREA||0>=q.value?"red":"";v.style.backgroundColor=q.value*v.value>MAX_AREA||0>=v.value?"red":""}var b=a.editor.graph,f=b.getGraphBounds(),e=b.view.scale,h=Math.ceil(f.width/e),g=Math.ceil(f.height/e),k,e=document.createElement("table"),l=document.createElement("tbody");e.setAttribute("cellpadding",
mxClient.IS_SF?"0":"2");f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";k.style.width="100px";mxUtils.write(k,mxResources.get("filename")+":");f.appendChild(k);var m=document.createElement("input");m.setAttribute("value",a.editor.getOrCreateFilename());m.style.width="180px";k=document.createElement("td");k.appendChild(m);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("format")+
":");f.appendChild(k);var n=document.createElement("select");n.style.width="180px";k=document.createElement("option");k.setAttribute("value","png");mxUtils.write(k,mxResources.get("formatPng"));n.appendChild(k);k=document.createElement("option");ExportDialog.showGifOption&&(k.setAttribute("value","gif"),mxUtils.write(k,mxResources.get("formatGif")),n.appendChild(k));k=document.createElement("option");k.setAttribute("value","jpg");mxUtils.write(k,mxResources.get("formatJpg"));n.appendChild(k);k=document.createElement("option");
@@ -3327,10 +3330,10 @@ h);q.style.width="180px";k=document.createElement("td");k.appendChild(q);f.appen
"10pt";mxUtils.write(k,mxResources.get("dpi")+":");f.appendChild(k);var t=document.createElement("select");t.style.width="180px";k=document.createElement("option");k.setAttribute("value","100");mxUtils.write(k,"100dpi");t.appendChild(k);k=document.createElement("option");k.setAttribute("value","200");mxUtils.write(k,"200dpi");t.appendChild(k);k=document.createElement("option");k.setAttribute("value","300");mxUtils.write(k,"300dpi");t.appendChild(k);k=document.createElement("option");k.setAttribute("value",
"400");mxUtils.write(k,"400dpi");t.appendChild(k);k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom"));t.appendChild(k);var u=document.createElement("input");u.style.width="180px";u.style.display="none";u.setAttribute("value","100");u.setAttribute("type","number");u.setAttribute("min","50");u.setAttribute("step","50");var w=!1;mxEvent.addListener(t,"change",function(){"custom"==this.value?(this.style.display="none",u.style.display="",u.focus()):
(u.value=this.value,w||(p.value=this.value))});mxEvent.addListener(u,"change",function(){var a=parseInt(u.value);isNaN(a)||0>=a?u.style.backgroundColor="red":(u.style.backgroundColor="",w||(p.value=a))});k=document.createElement("td");k.appendChild(t);k.appendChild(u);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");f.appendChild(k);var r=document.createElement("input");r.setAttribute("type",
-"checkbox");r.checked=null==b.background||b.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(r);mxUtils.write(k,mxResources.get("transparent"));f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");f.appendChild(k);var y=document.createElement("input");y.setAttribute("type","number");y.setAttribute("value",ExportDialog.lastBorderValue);y.style.width="180px";
-k=document.createElement("td");k.appendChild(y);f.appendChild(k);l.appendChild(f);e.appendChild(l);mxEvent.addListener(n,"change",c);c();mxEvent.addListener(p,"change",function(){w=!0;var a=Math.max(0,parseFloat(p.value)||100)/100;p.value=parseFloat((100*a).toFixed(2));0<h?(q.value=Math.floor(h*a),v.value=Math.floor(g*a)):(p.value="100",q.value=h,v.value=g);d()});mxEvent.addListener(q,"change",function(){var a=parseInt(q.value)/h;0<a?(p.value=parseFloat((100*a).toFixed(2)),v.value=Math.floor(g*a)):
-(p.value="100",q.value=h,v.value=g);d()});mxEvent.addListener(v,"change",function(){var a=parseInt(v.value)/g;0<a?(p.value=parseFloat((100*a).toFixed(2)),q.value=Math.floor(h*a)):(p.value="100",q.value=h,v.value=g);d()});f=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var x=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(p.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var c=
-m.value,d=n.value,e=Math.max(0,parseFloat(p.value)||100)/100,f=Math.max(0,parseInt(y.value)),g=b.background,h=Math.max(1,parseInt(u.value));if(("svg"==d||"png"==d)&&r.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,c,d,g,e,f,h)}}));x.className="geBtn gePrimaryBtn";var D=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});D.className="geBtn";a.editor.cancelFirst?(k.appendChild(D),k.appendChild(x)):(k.appendChild(x),
+"checkbox");r.checked=null==b.background||b.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(r);mxUtils.write(k,mxResources.get("transparent"));f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");f.appendChild(k);var x=document.createElement("input");x.setAttribute("type","number");x.setAttribute("value",ExportDialog.lastBorderValue);x.style.width="180px";
+k=document.createElement("td");k.appendChild(x);f.appendChild(k);l.appendChild(f);e.appendChild(l);mxEvent.addListener(n,"change",c);c();mxEvent.addListener(p,"change",function(){w=!0;var a=Math.max(0,parseFloat(p.value)||100)/100;p.value=parseFloat((100*a).toFixed(2));0<h?(q.value=Math.floor(h*a),v.value=Math.floor(g*a)):(p.value="100",q.value=h,v.value=g);d()});mxEvent.addListener(q,"change",function(){var a=parseInt(q.value)/h;0<a?(p.value=parseFloat((100*a).toFixed(2)),v.value=Math.floor(g*a)):
+(p.value="100",q.value=h,v.value=g);d()});mxEvent.addListener(v,"change",function(){var a=parseInt(v.value)/g;0<a?(p.value=parseFloat((100*a).toFixed(2)),q.value=Math.floor(h*a)):(p.value="100",q.value=h,v.value=g);d()});f=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var y=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(p.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var c=
+m.value,d=n.value,e=Math.max(0,parseFloat(p.value)||100)/100,f=Math.max(0,parseInt(x.value)),g=b.background,h=Math.max(1,parseInt(u.value));if(("svg"==d||"png"==d)&&r.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,c,d,g,e,f,h)}}));y.className="geBtn gePrimaryBtn";var D=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});D.className="geBtn";a.editor.cancelFirst?(k.appendChild(D),k.appendChild(y)):(k.appendChild(y),
k.appendChild(D));f.appendChild(k);l.appendChild(f);e.appendChild(l);this.container=e};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
ExportDialog.exportFile=function(a,c,d,b,f,e,h){var g=a.editor.graph;if("xml"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),c,d);else if("svg"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(g.getSvg(b,f,e)),c,d);else{var k=g.getGraphBounds(),l=mxUtils.createXmlDocument(),m=l.createElement("output");l.appendChild(m);l=new mxXmlCanvas2D(m);l.translate(Math.floor((e/f-k.x)/g.view.scale),Math.floor((e/f-k.y)/g.view.scale));l.scale(f/g.view.scale);(new mxImageExport).drawState(g.getView().getState(g.model.root),
l);m="xml="+encodeURIComponent(mxUtils.getXml(m));l=Math.ceil(k.width*f/g.view.scale+2*e);f=Math.ceil(k.height*f/g.view.scale+2*e);m.length<=MAX_REQUEST_SIZE&&l*f<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+d+"&filename="+encodeURIComponent(c)+"&bg="+(null!=b?b:"none")+"&w="+l+"&h="+f+"&"+m+"&dpi="+h)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
@@ -3344,8 +3347,8 @@ var r=mxUtils.button(mxResources.get("addProperty"),function(){var a=w.value;if(
function(){0<m.length?m[0].focus():w.focus()};r.setAttribute("title",mxResources.get("addProperty"));r.setAttribute("disabled","disabled");r.style.textOverflow="ellipsis";r.style.position="absolute";r.style.overflow="hidden";r.style.width="144px";r.style.right="0px";r.className="geBtn";v.appendChild(r);h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});h.className="geBtn";v=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);
e=e.cloneNode(!0);for(var b=!1,d=0;d<l.length;d++)null==m[d]?e.removeAttribute(l[d]):(e.setAttribute(l[d],m[d].value),b=b||"placeholder"==l[d]&&"1"==e.getAttribute("placeholders"));b&&e.removeAttribute("label");f.getModel().setValue(c,e)}catch(z){mxUtils.alert(z)}});v.className="geBtn gePrimaryBtn";mxEvent.addListener(w,"keyup",d);mxEvent.addListener(w,"change",d);k=document.createElement("div");k.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(c)||
a.editor.graph.getModel().isEdge(c)){t=document.createElement("span");t.style.marginRight="10px";u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginRight="6px";"1"==e.getAttribute("placeholders")&&(u.setAttribute("checked","checked"),u.defaultChecked=!0);mxEvent.addListener(u,"click",function(){"1"==e.getAttribute("placeholders")?e.removeAttribute("placeholders"):e.setAttribute("placeholders","1")});t.appendChild(u);mxUtils.write(t,mxResources.get("placeholders"));if(null!=
-EditDataDialog.placeholderHelpLink){u=document.createElement("a");u.setAttribute("href",EditDataDialog.placeholderHelpLink);u.setAttribute("title",mxResources.get("help"));u.setAttribute("target","_blank");u.style.marginLeft="8px";u.style.cursor="help";var y=document.createElement("img");mxUtils.setOpacity(y,50);y.style.height="16px";y.style.width="16px";y.setAttribute("border","0");y.setAttribute("valign","middle");y.style.marginTop=mxClient.IS_IE11?"0px":"-4px";y.setAttribute("src",Editor.helpImage);
-u.appendChild(y);t.appendChild(u)}k.appendChild(t)}a.editor.cancelFirst?(k.appendChild(h),k.appendChild(v)):(k.appendChild(v),k.appendChild(h));b.appendChild(k);this.container=b};EditDataDialog.getDisplayIdForCell=function(a,c){var d=null;null!=a.editor.graph.getModel().getParent(c)&&(d=c.getId());return d};EditDataDialog.placeholderHelpLink=null;
+EditDataDialog.placeholderHelpLink){u=document.createElement("a");u.setAttribute("href",EditDataDialog.placeholderHelpLink);u.setAttribute("title",mxResources.get("help"));u.setAttribute("target","_blank");u.style.marginLeft="8px";u.style.cursor="help";var x=document.createElement("img");mxUtils.setOpacity(x,50);x.style.height="16px";x.style.width="16px";x.setAttribute("border","0");x.setAttribute("valign","middle");x.style.marginTop=mxClient.IS_IE11?"0px":"-4px";x.setAttribute("src",Editor.helpImage);
+u.appendChild(x);t.appendChild(u)}k.appendChild(t)}a.editor.cancelFirst?(k.appendChild(h),k.appendChild(v)):(k.appendChild(v),k.appendChild(h));b.appendChild(k);this.container=b};EditDataDialog.getDisplayIdForCell=function(a,c){var d=null;null!=a.editor.graph.getModel().getParent(c)&&(d=c.getId());return d};EditDataDialog.placeholderHelpLink=null;
var LinkDialog=function(a,c,d,b){var f=document.createElement("div");mxUtils.write(f,mxResources.get("editLink")+":");var e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";mxClient.IS_VML||(e.style.paddingRight="20px");var h=document.createElement("input");h.setAttribute("value",c);h.setAttribute("placeholder","http://www.example.com/");h.setAttribute("type",
"text");h.style.marginTop="6px";h.style.width="400px";h.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";h.style.backgroundRepeat="no-repeat";h.style.backgroundPosition="100% 50%";h.style.paddingRight="14px";c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.position="relative";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";c.style.display=mxClient.IS_VML?"inline":"inline-block";c.style.top=(mxClient.IS_VML?
0:3)+"px";c.style.background="url("+IMAGE_PATH+"/transparent.gif)";mxEvent.addListener(c,"click",function(){h.value="";h.focus()});e.appendChild(h);e.appendChild(c);f.appendChild(e);this.init=function(){h.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?h.select():document.execCommand("selectAll",!1,null)};e=document.createElement("div");e.style.marginTop="18px";e.style.textAlign="right";mxEvent.addListener(h,"keypress",function(c){13==c.keyCode&&(a.hideDialog(),
@@ -3364,18 +3367,18 @@ l.style.marginLeft="4px";l.style.marginRight="6px";l.style.marginTop="4px";k.app
"right",b.style.whiteSpace="nowrap",b.style.position="absolute",b.style.right="6px",b.style.top="6px",0<a&&(k=document.createElement("a"),k.setAttribute("title",mxResources.get("toBack")),k.className="geButton",k.style.cssFloat="none",k.innerHTML="&#9660;",k.style.width="14px",k.style.height="14px",k.style.fontSize="14px",k.style.margin="0px",k.style.marginTop="-1px",b.appendChild(k),mxEvent.addListener(k,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a-1);mxEvent.consume(b)})),0<=a&&
a<q-1&&(k=document.createElement("a"),k.setAttribute("title",mxResources.get("toFront")),k.className="geButton",k.style.cssFloat="none",k.innerHTML="&#9650;",k.style.width="14px",k.style.height="14px",k.style.fontSize="14px",k.style.margin="0px",k.style.marginTop="-1px",b.appendChild(k),mxEvent.addListener(k,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a+1);mxEvent.consume(b)})),f.appendChild(b);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(f.setAttribute("draggable",
"true"),f.style.cursor="move")}mxEvent.addListener(f,"dblclick",function(a){var b=mxEvent.getSource(a).nodeName;"INPUT"!=b&&"IMG"!=b&&(e(c),mxEvent.consume(a))});g.getDefaultParent()==c?(f.style.background="white"==Dialog.backdropColor?"#e6eff8":"#505759",f.style.fontWeight=g.isEnabled()?"bold":"",v=c):mxEvent.addListener(f,"click",function(a){g.isEnabled()&&(g.setDefaultParent(d),g.view.setCurrentRoot(null),h())});m.appendChild(f)}q=g.model.getChildCount(g.model.root);m.innerHTML="";for(var b=q-
-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");u.setAttribute("title",mxResources.get("removeIt",[c]));y.setAttribute("title",mxResources.get("duplicateIt",[c]));r.setAttribute("title",mxResources.get("editData"));g.isSelectionEmpty()&&(w.className="geButton mxDisabled")}var g=a.editor.graph,k=document.createElement("div");k.style.userSelect=
+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");u.setAttribute("title",mxResources.get("removeIt",[c]));x.setAttribute("title",mxResources.get("duplicateIt",[c]));r.setAttribute("title",mxResources.get("editData"));g.isSelectionEmpty()&&(w.className="geButton mxDisabled")}var g=a.editor.graph,k=document.createElement("div");k.style.userSelect=
"none";k.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;k.style.border="1px solid whiteSmoke";k.style.height="100%";k.style.marginBottom="10px";k.style.overflow="auto";var l=EditorUi.compactUi?"26px":"30px",m=document.createElement("div");m.style.backgroundColor="white"==Dialog.backdropColor?"#dcdcdc":Dialog.backdropColor;m.style.position="absolute";m.style.overflow="auto";m.style.left="0px";m.style.right="0px";m.style.top="0px";m.style.bottom=parseInt(l)+7+"px";
k.appendChild(m);var n=null,p=null;mxEvent.addListener(k,"dragover",function(a){a.dataTransfer.dropEffect="move";p=0;a.stopPropagation();a.preventDefault()});mxEvent.addListener(k,"drop",function(a){a.stopPropagation();a.preventDefault()});var q=null,v=null,t=document.createElement("div");t.className="geToolbarContainer";t.style.position="absolute";t.style.bottom="0px";t.style.left="0px";t.style.right="0px";t.style.height=l;t.style.overflow="hidden";t.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":
"1px";t.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;t.style.borderWidth="1px 0px 0px 0px";t.style.borderColor="#c3c3c3";t.style.borderStyle="solid";t.style.display="block";t.style.whiteSpace="nowrap";mxClient.IS_QUIRKS&&(t.style.filter="none");l=document.createElement("a");l.className="geButton";mxClient.IS_QUIRKS&&(l.style.filter="none");var u=l.cloneNode();u.innerHTML='<div class="geSprite geSprite-delete" style="display:inline-block;"></div>';mxEvent.addListener(u,
"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()||(u.className="geButton mxDisabled");t.appendChild(u);var w=l.cloneNode();w.setAttribute("title",
mxUtils.trim(mxResources.get("moveSelectionTo",[""])));w.innerHTML='<div class="geSprite geSprite-insert" style="display:inline-block;"></div>';mxEvent.addListener(w,"click",function(b){if(g.isEnabled()&&!g.isSelectionEmpty()){a.editor.graph.popupMenuHandler.hideMenu();var c=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var c=q-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.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 d=mxUtils.getOffset(w);c.popup(d.x,d.y+w.offsetHeight,null,b);a.setCurrentMenu(c)}});t.appendChild(w);var r=l.cloneNode();r.innerHTML='<div class="geSprite geSprite-dots" style="display:inline-block;"></div>';
-r.setAttribute("title",mxResources.get("rename"));mxEvent.addListener(r,"click",function(b){g.isEnabled()&&a.showDataDialog(v);mxEvent.consume(b)});g.isEnabled()||(r.className="geButton mxDisabled");t.appendChild(r);var y=l.cloneNode();y.innerHTML='<div class="geSprite geSprite-duplicate" style="display:inline-block;"></div>';mxEvent.addListener(y,"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()||(y.className="geButton mxDisabled");t.appendChild(y);l=l.cloneNode();l.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';l.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(l,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.addCell(new mxCell(mxResources.get("untitledLayer")),g.model.root);
+r.setAttribute("title",mxResources.get("rename"));mxEvent.addListener(r,"click",function(b){g.isEnabled()&&a.showDataDialog(v);mxEvent.consume(b)});g.isEnabled()||(r.className="geButton mxDisabled");t.appendChild(r);var x=l.cloneNode();x.innerHTML='<div class="geSprite geSprite-duplicate" style="display:inline-block;"></div>';mxEvent.addListener(x,"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()||(x.className="geButton mxDisabled");t.appendChild(x);l=l.cloneNode();l.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';l.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(l,"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()||(l.className="geButton mxDisabled");t.appendChild(l);k.appendChild(t);h();g.model.addListener(mxEvent.CHANGE,function(){h()});g.selectionModel.addListener(mxEvent.CHANGE,function(){g.isSelectionEmpty()?w.className="geButton mxDisabled":w.className="geButton"});this.window=new mxWindow(mxResources.get("layers"),k,c,d,b,f,!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.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-
-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var x=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",x);this.destroy=function(){mxEvent.removeListener(window,"resize",x);this.window.destroy()}};
+48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var y=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",y);this.destroy=function(){mxEvent.removeListener(window,"resize",y);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.searchFileData="7Z1rU+O4s/A/zVbNeQGVe8LLXLjtEiZ/HGDqeaNSHJHo4Fg+sj3Afvoj+RJiBWbOY3VIO5mtLSCB3fjXklrdrVb3X83hX82L15X3V6P2k8mQC/+v5uivRqN+WlNf1bvMd8Wc+4v07fvpxUlP/6J58Vfz/K9a/6/mMFzSgIXFl+o/DKM3j6X/VfpWc7R6XUgaLE+plOIlPO3rb2QkXtRnDpaReojmqK5+VA8ScZd6N3TGvIkIeZQ+1kxEkVht/EHf4wv9i0gE6t0wkuKZPfJ5tFTvNdbvDIUnZPIgzVryj/pNyvaSPl43Q12mL8+6ycuL0kQ37CnaL1GGkBNlgOWJ7vhieWBI98GhTLoB86NkzpGEDNUw2WIlE+8Aue4DhFC9ZmmoIfU8EUdKmcczj2Fga4Otr5ztPzGdYyCDm4o5GY7Z2DFGrFeea8l+SuFjgDrrFKA65betIZdu7FGJgqo4BTtnpan+jlfBCc+GitRRDdYZFFbjULASK4P6cyQawwTr2IE5SyoDcj5fsDm5YiiVvYX+uBWRu1Rkjnou6q0nJ6oRbJbHO7zdObV982HDgFYcLAsXbHOlYQADW2S4FlcXanE5HvPnTGL1Mm0GLCObvgjySN8OE049BCNTyj0kyw3MJnYiyQMkUGDxKUf9BQ8VFV7VbzFkU8lRbtSd8u5mQXeQKyH5v8KPqHcwQ1bge8geE1ewoLzpf0+mscS4X1sEQDImfbSCEKzTsAXDYodkJADGfgaGJt4NToYkYmA/E0P1IOEp9fmKejqaT6UZtnrinvfRkxSf0Rc+Ky8Bmr1ymR8xuYXZ2wVmAxtmvVYvcpbYBYqcI8YQDmfPWIwlNoYPMNENJ0DoxMAUC/Jd7xY0XGKHrVvDxu4zNsh6rV30ikqcMBYpL3i4JFdUO0byDRuueZ7atqX9h/k+85BjnrVsMcdChAwdpbGHWg/mrVAG+SJEzmm/uTjMdA73D1mvGf6itUXkeCLCt6mcFRWQ9abi+PQZ+8oEmLERnXmHjzll8/kb0aY8NtROcd6WOaFOUZ+EmJ8O8AGCjWUCOKR+mBzDD9QzeQzdltJtgdKKpyeGfXV2SqvahHEkuf/M/QV5pBFKDxR0RA1adI5otwNJe0HDiFyon7BhGlO4V9rfTjHVFzKVCL1Qg7Nd4iRkg/Mfnz/h00ZFl6xup43uWBjRWFI/wqeJmm3ItblBik4LtYtRv3qttJ+9VB5ZtHSpZKd9T32STyP+k5Exm3OX+/gms2ENlva8N7l9NdJLFnKKjtbQwiC0YcjDZIxv1Hfm673WeVM/rbDR96C22g36gaTcxwa6i2EeUjnn6tkX+CKhhr9T2rQo0jKiXPWnJ9KXDN86tj+9/wA5WhL1lOhYi8ObR9csYfUfoIscdqHO3jZIR4w+oeM82wWnXNEIp4IycEufHG/icvWEEb5wjOn/QGw952/YzUYoTPKI8fS4WZy+pQOmG6wXdMW9NzKR1FXPg294oUKom8hchhHpc+yhGRDYS+Yz9SDY1RPIXL5KfiTn89il6TPiZoYYX8UsEQZs6jVDV0GEMVJWdCEbc1hLp7tsooow4BH18I3sTiZxTotubHtQgccN2uvVKvb5v4mKwqeXd+ARXPtPTFkXIg7JiIeMok/7AaIO1BCrj0MHu4Po27X6ID/UsUcdsEFHvJPhTWLqHtqAercOD/0Pn/sMnVu/C9Kb2EeYtWeAQhjNY7paCfU7dIcEu1i0yVpVazZZvIFk6cfiwjay+SACGjn2DZ9JijCDeocjfcdcIef4VvJOkPX9U5J6wdiAwXKJNoHvrrFh7sIXvGWxRBlO38WY3saR5CiDN1DZqhuw330X5cDuQjt9jyMywekQte1LZW3hTpZUrqiLbmjbTfihnSzfwmSznS6Z+gt0zKZJBTG+d2zBFQHOOPMOHHxd44jcUH8R0wU6V9e8EtyDiDY7wuVqTjtM/uQuwvPdHQTqnFguEN6w3LrHBcE6HY2wce7CnpoKhDfWesXxzJevHem9p9RxKGIf37muMX0h9p/HJWOeu6Rckr6r1FPIdQlmdKdFve5XoeM7OtpBauDH6E1s6OZVmtKj7tMo1gk5VOJTYmBOUgb5dxxwhPHIHlTSUYY5poGasjcIkyF7wAM6phKf1QjNyKQb47MYzUJW1pNW4PPyoJXsLQuiGN8xJtg2mmFOvDgS2CA7UFGZDNLR39DNWLN8o+2MdXzx8uQhrFUBPWed2Mdn2oMFxDcg0Rnxu4BEZ65DGwUasnXokNMw9umKo8M0Yt22mPeS+jE6M7bTgl2WDwwjJFTuacCE8rlOB3T2hm8bMczYeq0BgYluI+lCBcIyyuGS+ovkhneE8wwKKpad8wpfPXzsYmQ1Awe2Y3vBVhRfZTKw+jgZ5Rgho3ltJX9tQ4nQdG9C+ScbkOg0bhMqPpJDxqsVukCXWRjHFnLC5kw9Paf4lCxU8CAjdZbiBWPRNTOXwXpxZqDo1qfpkNnafY56cs/Dd4BiZi+Uz+jOQO99HrJXbJhmpMR243yk6rGUfXsnxArfKjXMeYtaKB/holurPahkozWtp0tBYsNsA++mj2KF0fxrgRXyKXCim7UtqOEM6ROL3k4HXCzpv1SiSzCq1wxbt3TlrYx0SGOMjjZYND7HXLJVkrj8yGiAH7e01s1wL6jnpXuM+4wu2glWEGQDVre5d5bMQ5hWAz2VLyRdcHwBlS5U9lCGeUX9ucfII4+WOG+aQ93QzXn5YkkehBfRBcLszhawgirQ4jMnoCIQH9HiOxSGOkjMaP9hLCAjfKliYPmNGectuuQi6K3mVvgn18Ln/ya2BJ1znAdQRund0vGINTU59yN88xd+dImzEhi9c2hz+D3WTYZShCFGZKiklQwZ7WrNj/3t68VlpI7HA3KF0lvvgoVfctZISJZ1Eb4P8JmJXWDDyeBFZyjCrVqXM99lp+rphKSKGt/uA406pgufoasQYPa2Kj+Dc0zuqi3HFQE6DxYstS5HvY1dD2e/bDAPxyBFr5Csx/SR+/OVwsIGatbtLw8aCBmFp/1VsOQRoxgDiGCHGxmqRNldGawTQ4Y5oCGbUXwztw22RDNO7gs39g75CmJOKpSN/0I9fB3ooBIm30EjckNj38V+F7pdOpcnQx3SVYAxOcswGbq2qzTjxG4wtCE4nzjC4xrg3UVzLiTKGiSGsVs+vpKT+gLhiRRYd9MCJrr1aeapt6wXaFJT5IY/oXO9wYoi5aQeX80whnrB4vgZpw5pk6HSRZF8I84z16c12NerRdj3F9Tolq851tbm0pvrYZzShjK2HdwRlxEZcHz3/c3xtAf9iXE4wSKDGaV48ZeKCq9yMobV1pgwgbHrJesFe/7KpMsRtnsBXq8XyrV5EQKd0b91l6j8SWMOGi5RLtWtEqHl0z2KpPjWqHF6XLfVSjnphCMMcgMb/5qVDD1GfYz7a3FkO7ZT+FJ46GrsmYWubG0IzYhwKMEuEq0x/bnwKDZMsMLqGeYVVXro0uNzhENqsHZK947OWZUfg07fgtWhe4fEOJRQTVpySiH1oaL7TKaScnRHi9CRpWuXkcxoOAZU55lGGFGLW4xNFmHGqrYYIYnzwlcrjLzAe83fLNJ+OHZM223mH/pG8Z2MAy/TG/7EyN9KAePLHNxyTG1ZxyIScqZTAdA54cawWh9KvaPi88KLqE3bZTrhrs9dtJdVgU9pMtopRdmzwrT0bY3gAi32mWx9Yn6nfDgm87KECEcXOOXD4MU3vlBVRHNeofwcrIfoYDUKC7C6rBTKwpPgczkpoDXzKMoADPDx45140bYFOkxDH5dujZVjxj7GYLd5J8x66j5gIzTNCNskD4dyjwwwztgG7MJ0qM8jKt/IiKt3Qt2DEWmNY2DTyVEfowzFB85eAsHx9ckFK8G55o1nlCBNdjHG1jZG7DAW0hfklG1bx85h3hO5jJMDnOMIhlfEY7cNDusgOJvpmzYI12oH2Op3njn5O14F2DjPgE/nHI/NMY6nmTdqG1xTnCxIeiUgXaxnwIt1Rb3UVER6XQw8W0t3Aku0E/7Btd5wFOpKzBDW+jNNJutprEjVkhUMoYoyb6VYj2osMeYxmVdYrTGzw2WEYeHintO19tZzUnwBYeOUrnQ5+ndShBMXrsZSSjllvs/x3aUH3lyOwmXT8RVsjGAdQzPGR5whfLAKfjml+pAwuUxz8KhL6rEkNIgRFrh4iS4vFCK1iKDHVYg5uaTRkkmMtFAHjBFzl6d9jDlLUFM3J8Ru752VtvcSwiFdMUnRj2P5q4ublNjHsryXklIyzyOTZfq8qDhbUOZQyilWK4q+JIul6lGQQYwxuAlV7iullAJfWB50HM//m7noTn7N6Ejpk+4UUVs7CKu8mpERu6maXArHWPMK6gpmQjnGHzDo2lk8E90+Ex0iVJPQBFGXhcfetqJd+hQwRXQcdICgrseUeSzQthw+27xV9CItgrEGKTr73Ow5bbcs30HRdQcyCqLnhUbsSVvoSKE6ehmgbWygsHP33hlgA2xBpc8kgA98zgRJAwXYSI2dpWWnbx9pWiBmTF31HZ0924W64BJJ6idR2STZ+LRFHpeMIWwobjpj5VVvEbjP5YyiC0GbpU7PytuBW7iBRzHaS+bl0vL+yyfE6Owms/1Tu3yA4RNkdBbUGViI8xNidJYUnM/6CTE6kwrs7uVnxB10xMVZbeMXfILcxYZsJrO2yh89GcirWayQXXQWF9gFeRPYd5cCY9cHsFPwD3nR7cZgVRc/5sW3FUPldHzMi28jBjuSK/IOuPvmYnSYdrQNZ7wIFRbU1eNPgPFpLLCzgo+Bsaus8g16PgHGp7MMYOg1jM93MFowQVmVgzhEr7DgNLSCxa6sGmDKSsFiV1TN0jf9PoBFp6R6xQiHzUFnkXZ40P1zP4BFt2hNLx9sImta9KsWcmjRrVqw6+YfwN4IF1/1VeP8COp4QRdymbM5ueKL5QtF10kYrJGcgX3BJL62yWYvCSj/QCc1RjJGOKkNjQUVd74Q8tlD2BYRrNGlwXtJEboHYG0JPoBFZ2nsKp9Bw+IzNHZ0Cqph0RkaOxvZpOOwrre18S42eHNHgopJXlE5E/hCzlD1t0xa5nFXBAjv+ZgOUvn2VSYyTnOys6NDlL8ZC/DtwGY0EmpwE1p0WzDcRaAi7Y2aytFSxCHGM6MdzecNZnTjbLZpg2Iei0D5wdiHGCzJLsVFN7q7OkFJ2pIkp0bIicv3qDOIJ1Q9C/W8N+LEsxWTCzXcj5IhjAIYoS0oAegLclSNOkkqziCnLt+exaB2XCEw4hrZDWC4jEZkwDx0sZ7ejhJnFTCZ6KRKbMC7SjB0lrwCtjWUZ5zQ4tuVd3TUP6U+uu3I9InbUGGAKX3F17lwR7vQVLyQPsIAgMELduIwldSNUKZBG2UVoIyrHBi7qgI7KNVVNhF2RmvvyMxIcdGNrtk1AOqINMXFd9Kyo5zgFBdrhx6wEhtb0Ct8C9g0JAF3pBW+9WtmBMNN6Nh9Rji4Z7saXI2LfXTL9xL+EBefdjYqNoAZzwkuupPwXWUFp7j4cvmNjG+owHuKi+4ScHdXLn6Ci+4CsKmqoDTzvc9+Mp/cCYq9dClYgO6BLbm+jYMzp9KAtvF/fzLvtC9l0vqQXHj6jBRdc4mtGl82FlYGLF7IOQ3RRdjNbEqb/eid9PYcHSegZt7gVOsXXY+xHmDO6AbqIzZOyLyNd04H39TdDaeIj2XqOkcydR8Zwv0FqptwRjqgiwVd4Du3NbZRW4NhgPBMzxxKWytwQOWMSd3nMECHWtRDdtdZE1ZG4+iNONRDGCruQMMK8Uz6/lzvMcqP40jH2NDBtktWX3q8U59E0VWFN25f2JUmS1HDJUefHmV15pFg6j7CwyXCbD8zvcKqEmqCGkvJfPeNnL+6S+oj3GCNsbW1I4ZxqB4GXeTB3GNtouEacyRe/DCiXKIntR3QkeT+cxJTErFSwhzdNpvZhHBaeJQF0aYixqeKi7DWqvjcYz91GjI2zo65tdraTuehegKMpHCNkAxQonUUOlpDO1nP3zXtPT5D2NharadwLNG11OmBtXjIGF85vlCL4dDY7qhXymxwY3SYbbAG5zmniBg6n808cgOBJNf+k5ArnAlrRpEaW417vVpx9fZRoL6PKsLsLeBQ9yYsutytNvApoy6ihS/O0gXMLU0pwyiJF2rXDXvGh0UX6ZR2HIcsXqGjBLzDoilvBZlQ+YyxsztwlDDDxKd5u4Bl3zZB0Wld6C1mIrgfke9PylxSn4b/UNV+CmPUu5BlZhJINZLqg7BhdoE9U33Uhi/Ya4yl7R7q4AxpA+fSTbmy/iKs3Qd70H54hjuJpbukITpe6Dk8jX0fX9wBOlB2HyA9fjLWaonRXLjB6YwvyJxG9HTAF/+J2W9St1vNXvdipN5X/4M5V8+1+btOr3ne/1IZ1BtFO6JeL6GxClIYeiKek5H68ckTL39kkcrCo7M/okhFEUj26/OPo5KFcP/IYq42/JkTH/kK0fOBOFE8578+Ojt4QVwyX6y4+2t74VCl4IpVEEfstB8E5Nxf/M7oP3QxpOrhIvZd/XjHPSWG6fc/00KLIsnvYvKPMDaF8T2I+Ir/y+bku/NHJIlI7tiCK5DjdMpycVxO7o+Sf85+Mk8EahpEQnhhtptM9c/kSUgyES9MOkvm/ToGc6zieeBhTL1jtklNCY1Y4Im3lfpQMqY+XfzmYP5QxcJeI0nD04EXM3LFXuniNwk2By4H5bAwyV1yOZxUWwwlTvw3xSDEwmMk8+g9GuksnUoJpG6eZ+xAIMQT7nNcqQhYo1m8atQoGSnPxDKRbM4Tf470J9dVEgSY4uBz9f/n0Ruh/pyEzI2lenE6YG/Cnw+FrNTsqDd6uxTKe7CU3IgwJGr2/NR/92f2fCio6/642jIpqXJ/KZP8d/0XKpmaQeL1OP3BXwlpvT852ft/JLSWUC4S8g97I+c6+9hlq98lEh2qiFZpLgrxGJU+9xfZ/MlSVMhN9vYf2bzL5kFNK5GkEnrqOZjvsqPdu7Yk9LeYhX+kkUvjlkaxpB65of4iposDmCcl9/MtyTgBY+6y+vKAmilJw1OPHrUhvCWUBx4etzx0TDIJT25GdJU4jvPk9BN5nPvzQOf3/xFKFtSexYvKh7JL7zNb0vgT4v9ILudSCn2cqusVV968h5osN2KxqLwwoGbIWPg8EvKPPDJ5OBF1n+eS//yjQlKB6F5Xx5mq47PoRSRXJzMTZDi6/SOIJLB/e5yZSluCOH9VH+cr1/96QvrzuWRhyCpuoJbcZbdEc8Ele6GeR+5i749MsjMN/XGu8H3mHmcYeksiN4LOifp06rvHaoJsyeQ2feOPMJITLiojnRL6Z+mYkrkTcVR1IxVKsSay+LPJZOdWMtIZoH/UyKZQJhU33UvOjlD59vpESt/RmlFlnGbyGPCFesM7TsfuM6HofCX9uz9S2ZSKE1C161Z8o4GWyX9u/shjUx7p+39kkshkwmTIw0jH0EY8PL4dWFL3+ZQG7ml/MiTOSlnw5H7ikHqtVjvRNUPIQ580jMtNnkEhdYPBjcf12JN+GQZUO4o3yatRXfdNndNwyebqVVKIZEnnuoBF8sIQ9VPyzxZxx8iTLlGU6xPgdsbaxsrahRvcbjtBrWNFLWNAJaguD11xOtRfSf2s1iYOk1xH/NTyUX8Wsbl+5yd3WfihS3ZoEmjUq4deek0X0Vv1ZPAV7XFKoHFWq+Dgg8z7xlm9guhlmrJ/gF7FJQ+E3j5W9OZZo3206K1t9KMg73ZqTdyYbYh9TGG2cGN2gUazgxuzXivrgBicZ7g5m/USNVY/4KwjX52NToneslucvWarRvpB4HE3yZQ/+S51YIStT0Z1MfPk99Q3U5PQiAJEH/edPmm3e+2TH6Q/p0HEf7L1TT/0EgBxOfrOnY4b1XHPexAXI0Nt4EaFHNWGmtdHA4vc4gAxrDJU5FZHr0Rt7E9QsW/I9TLdsT9kPVNKGCkk2CpVjB2kjPUW1KQ9q9VrSCEbTbCRPFP/H5yQnXaJ/sFbkIpnrmzBFx65S9KsNdEMqdFtFoJ1SKVyACSZ0KTPRHKHVl9oIo0aGuxdqKRPudtYsUHs4E+xO2iHG8SiGOqOA29hRFpqHxpnaxspMND8XgM3esqYIpd8QWc8IufRkklfjT1qGQBN9rUMWn9koGVwRLyddq15co6MuNWF9ws3iVvYiUFi75vEHezE9W4XGPkMN3CjAeEWbwDX1TrGynoGEZNfsxqOR6OWFJ2+mmChN8paNiAOXj6DbzYS+NFWKXI0+C3QeW7gt2rI8YG8zw/p6zXs9Dsd/PoxL/x68zjGfl2CdZ3881HjlsMyzq8nDmm11eJ2mB8KrHF9EP87O00nfVcNbUh0+xUp0EzoXQzuLXuNQ31sU1vfklxPbezH6YAC0KcJU3JBZ7r/gS5h4c/xnmABYjcaremEXJ4fI3qzMZmomX+s8NPx0cK3epP/HDH8ka74Zq3eQRaE2SXsUQSOc9hO63hg20c0sm0FOzki2rPOFCkmkH+VY94jH1VA3I5O1kUNCziFOzqtEzUsyPFdCtvVt9nrtRPHE/mpNBkuaRjyECk8zLWLTfpelei7wPStCsGX6gL4K/izCsE3ahDnud9vHVJvN2ttMo69iIdpoIwM4zASKybzsOHHPSPRyAJE22eiUMpveEOc77fn06JMjksG4z5xRleoJdBrFwQAkp+XCqDVbqUz4GRbBlL8TFqZ6PtpyASyNSXaEFkBqUiUFVQURKokEUpBJwwXFGUd4oR4snwLdZ2l96t5rfuPK2KhGX4Qs3Cb+0OVcOA1gf6vUji8gldlpNDCKgWQFXE/dEhbZ4bgtg9BtkPN2mm0eveTPLj+eYlmNOQgKz4lT6I61SEHWeWafNhokHEzOTc/7HOUDLZ2TLQt9LCA87iFf2gBaTvHRNuqwLIFpNVj28BNC2JfPfbPT9p1rDd7QfSwRuwcAWK3hRQRZFlqxG6zddAVE1LG7oEzPpyTxhnWuQq0HBVj+wgYO0fA2G0futJJII9A6/QOfSTZ7INadsSpd2tIsWFW6SfYTbTYOx3tzuFhz5nnneqrYWQiXpg8ny/YAR6BfER5eEccH1Ee3hFGQpkAEieSPEDKZzdX3wdwrBvRMHLuu54IY7PbFyLcssc0Jm+rgUbJFq+pNttAhG2shKWvoJuEnXrtFSdi+bvGW4wHP4o9rIRwg3iWPN1BIS6D06sJ6dQb7cv3ulybJQGQApeugZACJ4TOWxixFXGTvm3Yt8zSiQ0fAHerAFxvwQ1x2GlXgLi0kZsCX/tP3OcD6s/JxegO9fJtWI7tRIob5WUrTXWjNlY3Ox5Mhxwnsa3C2iTuHB1xr42SuNnZDfHoRqkGctlDggnmrG5hNhvKWT0Gzs7RcAZHwdnDPJ6lQ4IfcSIeT0jO9lFwtjFvK1CYzk2jWQvxcPZ2o4UUZhsxpuVo5jXMhmnmObnw2OtJvab+HSHhBTN3+Wx1ej0Yk7qO3T/0dctxLIhQrRvXiMoNP9FX1VBjlp66a8xuu0VuhJvO31B4jIypTxdoM1hL66Q18b1aoTQiE+qzd+h/eHSowE3sa7V0k8acsIOdsHS4LCecvyp/BSmctQ5S46b3E6x8pcPZG3xtHca+ekBKaL0AFWG3fbgD+NpU9isZt5DyWe8Qr81288D5Dnz8Onr8mkj5rDeIjA/r+EHwYZ6fEHxnWDcHALgu2k6AIHDtg9YsPbXyfqDJlYH2G16bZwfJJ9RXj53eskjSLAfoR/OkMUB2+xYq7lbAHU6a+hp5fzrs5+lPqKAN46behILuHh309KyGmNk0Y0v3r9uGrh0FapYnojUXUtDSG2yRM6DSJdPWSR33sELT5tsRGYt57GFJBdrNrrSmPtQKGAXaHy29G6EGhZnMPzrvoIc9jdMJfK5riAWSh/rCDvp9qHRk81PmNnrm8heyCtCHvxsd2z5UlR2o9GmLydnCzVk6BSPnjP3M7elU4xKIrV4yePMrTnmDyPPXQOpS7+kiJo1WQOo1cjk7xyIQ6PVclEeWZsX/ZXPSSrg/kczBi+MIIl0bsIkBuq6rd/hjPKIRHTJtkmXXpGb6mlTe9LiDhRzqDHODPF/O9Zpe3BlxtxEcAfJ/Rnebl+IuacRe6Buyi3E74M8jYI0TrIef1tZagRJLBvQubDX80UzIGasob5BiWjuOGjNtnEEaOg1a7b59KenbAfP+vwtnzdyt46kPsWvUJlpU20CtQr3gkpFpHW9qKYBCShh/NOqIGOu7YWxhYtzROLbwZtFCrccfrc5BMQZ8fkoXPKJKpYan/eynvxpDpWS5lKaLnjO5iYun3lDWRKR79twYQpiJKBKrjT/oZ/9lJAKTvABlXuIr45R+DEW+9X13KeR/HRLSUIowPBkwujoorBEP3b0Dlaks9xmQvrTFTtKg0ITO5x7bO16Z0jCf4V0mV9JQYEFOwyvm6UfZO1MTkOl6FTDPY/tXg5BQEyn2RHXWMKgacFTTWM64v/8lVVoRBgGVNIpDwjy2Uo8bno6pvxRmBHz3RHWjaWf+GgLJEe4zi7TJlN2hV89KbsW//349ZtOI/gFCxkEgZEQG2ihm0dePnzF84GA3bPHVUI327uZkRnWnPI59r7UGnPbIsZxnLvcwB4F0iH5EyZ/iBQtPh+uftQIZMZcmZ2ffHFeyl8QNEx6fE2epdrcv3wfqW8sOlFjZV8pVJk7A2Pzr2czRLKtTPmObMPkk1Pxlexu9nRPG6qO/3uLa+axcr739D+HOUVmiY5WxuRePe+dTVG0Uq9VBztF9bgtgoyZWSeqT8nrICeGhOB14ugi4XnsX1N87V+lB2+Iart/RbA/UjeMVmcSr4CAZybf1VN1D8OSLEEdc/Z2ki68PvH4R4Pl/K192D+HyL8Kb8DAS/qHSacfvYNmEjvQpLbqH0NiXIUZUvh0qXWJgHyqcDtqKCsPJxKsLyUJyf660yOkwfWffRB1oIGWlCAQaZAdcV3Q/Ts/uya5XAXWjQyT7m+5fI+4AK92rD41MR9WVH3eZvUnG1FXv7f1UC45yzD0viYDFnnoo/u8hqf9ttgPUmB9BHpzy1JAHqGJSrAc+k1Q/ZGXJ5pIrrtOR/rZvhtLZTpsQOo0r5vPkEucAw5kVDFTmTytr+Cd7Uy7MgHn71xL2bG96Z/7+k/nJyWr6crikq1kaYNax8yf9fvUn5xWjUVILPl4hgCnreWYwaehDDUy8IqnqUIM1jVczTw/gQSgTJ5D07TBQkmjH+zjpU8T3V2PxU49ZvtKqjPvE2FzzXiTf8wAdmdLZHlJe67UWzJLLqXT6pJD6sahHUsS9j9QOmMi3MVOPv4/QeNPAa++CLpuUD1TZ/PvfwG0HMNWS+0mkNGFKDxePIjXdwtOB2r3miXr8apQWlAZco0hGn6OlFPFi+eXLqAc0x3KYoUdXgTLnLzzqL5gyouLA20POZBtq7ay5hMLyw+Qy134nXM8e5UDGRM2xFdN30Vm4h2HZMQ75NmKR2o30Y56o3Uk8VXgH+gzx/DXw1IMeMKG+5Hpyx0IeRtRHEAXYMWCadH2I81btZvONCylfzdQAtp9yolG8Wr0prp97uJncBkaK1eB4X04BbQ5eifDrzXODouxVwjXEtZ8mu+15NKwH41o/qLvUa0VHJtJ4zLd35+PLdRu49/Ex4Xdl7KY/XvtELSx3Lwcn4LBrrOqTSP7EXUYm+h585Wnu2Dx2v34H6gJvqndxEMWS7WWGgbsjDvOeTtSC0Yem/oLcMY/RkKXBsK+36MwAbYkSO0U67jF/D1Oubq4d+3FSX5XeTg26L591sAvIiSTl/tePCnSIJefYU0okNM6DetLK29UPnL1oRXbp0TDct0tqvVIKNOTbja6RVekrCkt95s5eU0tU6iilP2d+uPeCWWUXj8kzErE2ryc8YCTJLzjPf/fVgGcwU9EEPPeUxye5m9BVeGM1uS74q76vrDW6WmNkGs9YuOcRNBddWd1ool5RLgPu73FqFotFlg1DbHHtZUbuSJEUp562MLiXzsq9K3/I8dpEvOC+r9bg8UBmF7b3zgqmRLdgPZG6leoX+8/73NWQJsGZg6VzAi6rfB39t3yFLX/vnFDDmExKovtKXEh9lIfLlCldbtLEvGMztTHu34Qp0fr3I5ykMkkyano2GoNG6l9NaVRKLnuj4f+PsnEUlM1DoUzjkhMdn0Dl8EIp0nT/Q6Y/z0oWBzThpkvun1xwb0XOf9JAyH0kvkFVIjbZ7k8+WHf73ieg2Iij/2qOMk5RFnLFXzXbtX9yw31GsrTssX73y5HOgKxPg8mJlD/k7okJyqLOmP7xlVO3B4wuLIYaC+2hTmj05WnZ5p5cGiWIV0F4OqQ/efS2n/pojWZRBZTcnzKQ9zJoCc3XG77GHOt0QXG+3sJtFHC6sDhfbsqCjo6+BYSipmDZ8H6KcUlDkpWB/OrRaACOhsbYqPq47/NbKzV2yajcy8xqd4vOQt2G4kpI/q/wo2y1f/mQtI1y73UrmopnrKYQEyZ1Hr6nnmDfUYSSvbNSjqSg3V5mlbmDdGAwvn5nNw0vu4nlxLOVsol5ksKwly2xSFOmQ+0mjRoRDBj1ntX8yvrZfHnoonhptGzAMGXYY+3ms7PiCrFSWQ/Zh+/JyzKz5WzmFTkhc+5vmvP7Nrfs/N+MZ11g+iBozt20lL1LHoU8EKQkg0ys6MJne7BgdsKkTf2DALl6m0saewcyLDf8f2I+J3/vo/PWDnDumMsDKdwkp+YwiNIYf1pU/iCI0i44VSfR1bnVqkmdmm/pMtp7agwIVUp0EI02trEOoLnGNpTeWw+J5/BWU/p4P5MbkYFH3aTt4EEBSrHQEWnNmJ6yHRJdwawgVW/wss1X8b4ZYd5sLjy9lOkR77r/XFKRlUWRt1mltaL5OxucacntDczqIxWHjD/t/6YKKJUyqd5cbx+3YHdLZQQrDpMuTLOSJlJvBGkX9aMB1cvxkX29tbJb3gmTK+qrhyfjZOYeGJ6+qR5LTtTOHs9me+hisFs8NR8PC013XeVPSdX8oSfCPfQA2DGVrjh0EExJ8eB87lUWSL2nDeJV2l8oPD1/jWSc1Hrel3djNDYue5j6C7I9eTm7Apswz1MW179J94I9FFqC6uayDaYDCWj6qEJjVbyr0BaWk72RtSoj397T4Q4YMs9yqCziTzUZmReeDui+61+Xvam1QUC+XTvfv3wowDmkZF7aUyj+8kQGIwG+dCzuY5r9DBDU5ZE1U+w/Z7XMkgynQfJge1cB1lyKR5lGESNT6j9/OY0xSl3LZTTUW09SO0+3d9JA6vtQ2RJM7v38vGs/UJ+ykW8DIfZ/plS2us//FfFgVtwvKG/YYv9lNuo1qIWoPC8dCEiK+aRHu8mPlzTcRzURY9cuW/Utp8zK2R2UCk12bJE0btxP6UGgO+E5z4WQLpufjCR90u0MRXIWON3HTTAj0/qsZKb1GiyWPnW/PO/diEIBUXz5zRAzmGar1JMLhuphvC8fkGbxBpitJ6JBroS3h6vrXViX6op6T2ml0ewO+0Pyi71vrd2SxZByrmtfl4nHodGKd2BsLdy/qfusttE5tgErec0qx/rHF+7ziYijvfj27TroqtpLbQ7jYk+vZ82QFvOn+7jrakaOSl5SymGSbh6D2HsmjoKhX1/9Hqqqdw6UhMpjmfRDx6EBGrbGge6rSvqLLKWi2otnT6umBWscrLMC9+KyAYdNEHX+tkZJdRhxgiWT+/ZtrJ2CPLiDQ43Zmmf7WCrAy14jIImVli07UkRZh54GNNxDkeXGjpgO6oSlSHWHoRnoGThSUsl1byNW9HHqtiZojqceZA/JeFt6G0TpZTR6O0Kh/3ogVCOuPw/JooImSs6FkCnDBgjkBfVCti8ms0dOvQGClDdzQDEXIWw9gwmP5rBl20eotF7s3XhWsgxggYE88mhJJtR93kfBA2CgtIrT3qIkzU4RxzJIr69gKEdjPxd9CyRls8SLJIn1UH0U/V1vsU9PyhZSXCNOV8p7kl+fimBGgS2XzztaYj2kO2tylzKWT9Rl5Nqfc32Fef8NrHuwqOd+mlEykMnp0dePZAfWCvwEL28smPVa2EeXS+CU109AM7qT/GAzPRT8etjGV8DuJdnLtH8blvbvJ2x3e5mjXzJszjOXe9A0XzRw06W+HuupLSOMvf1sGbsaRrH6+iDpmdEeHIjlIva89xYumxpT98LceyjY1gHNMSf863X/jkbMYSuOacTq9iPm8tAVp7OYe/OkIbcywnx3Sb4/PXEzM7HwIE/c84bC026e+t82a81OT1nAzUEYSfHMNn7zlPyz/s0jn+s+JKNGWYH8IjOmTJjV5FcqtCrwRfe9XSILxYS/ZD7TpVgH2TvYRWA2MWpCyED7yb4u8FUZMdRrxX4I3RIJIqYYxqN77NidYsCnTFDRpHaU1eSpcQ/1tdEQuwCM5M12iSxHUwBTprxUsVrFassiVyIO0avBeq2oB8tkR/1eCmQyPEZB3Pv8p+6XEL2hp28WWxK0S4R/U3o18IEe+DA5EA/UhqgzmajO2x6MyZhy/0k3HMYukDaUbfgbeXCfk77TqtWwC6RVnCCdEq73/0UgH5xNIZRF0Tsv0y/td7K4oUHqv6AWhGFBdkqkP/1OEGPqcj8S4RK9LIq32zqlzYlfyIK7UgRLYTZ7wScM85Jcac/ic2HgNym69reDfi8E0p8rVaEMrSGVc+wS6Rg21k6mBbkT+lduBeTxFTNEcn+rmCw+SZiXnnegPR2X+j5+SRiqs3xU7heSCBh9xi+JdtHkPNvFnIh93TnpOan8arYYwSeRXjEwX6aX6u8lol7lv0YvD2OGlLiL/zt5TOnMM/sD4ROEoT7L5H//VhBMrrhvdoHDJ4qOIYodaI17/LanMSF2YWk98DkTyuxcqZfYxdExWh6XDu59Lo5HNiMDKV62KsYglEYxfrELV7VKmypcZMtXT6cLnKbyWIl57LHwtF67PCcXQ3GOXRKme2axSj6WRLPebZFvIxY+q4/+LzL04jBxXdd/jl1C3aIeaYLPleYPLaELTwh5APIp0zj71/LRotCHy84Lj9wlGSdvY5dKrwOmbz+WygWX7EWfvTpM/uQuy+SiJtKLM/4v7OIx/LwyF+N+LZ6iVNCLo77jNeS8Ka2yqpBWMU168H3pgcsopl6uVd4lQ749OMNmrVZDv4ha9vd3UhnNlS5xk24Pua499xdJ2e8hdZe6iV/6e/QSMQ+nSmvdd4nk7CdDj4YhueAzyXRfNd9n3low2OVi6pfSQZNNuajn5LNY1y6rihgMDxlietwI9XnzivAbZw/t0me37/za6VtIEQeVmQSm71c6oLqMZ+mWsqCRMsXetNdX0zVJpuQqnmEXg6EqW6UtsG0xDPX7VZCBkQ9Z3sjYlkGeGHyZvlExSZQp//iZJI57Hoz7TlXmQNvYHUobCdtSSLOEKzATdqgVs8xQ5XJUZT5AXZfYlsXD5LYqUjBsxlZp3bBSX0/r7Qb+vM8zKHWYIHe6tZoOUnGG/nqAEQwv7x8k4N12rUZlSL512/UmetfZzEuyG/S+6+rmbxPBffQH6d1ihkX5PKSUfIj+zAcsSpIBO9iBjREuf9MhBR6N0QNDOfopsNMn7Tb+fattpGOX9uxT6jDpCy60IsMf1TCM957lFHfuSL1WmX27Z8CXtlRT+GkfO7BZ/bN88ldGPCbNHv4FbqT0lM+TTakf0G9cwDv1jwl2YNMKtQMeDBz0W7W5lFul80tSZMnos+67MhCv2NGN+4WWy3kg+dzsBIKPuQsVVEmZp47apysQUjDv1toN9VBHE8fUp4vKJTI07fzqIcUPXLTCm3ZWuALWPT6SC166bFCayIJdBrDBlOFodE0u1Bfs2MBm6RC/o31m1FAofWaSAicHp9rxws5t5O+17LaxlHuI3u0CSx3YoL73efRGzl8DWYH6OWauL4QAkmsD2MHBbuGl4LpTtBuRvvs/MZf4bZgzqGTmAv2QVeGWcgcqNXfNrvMrp5L64ZOQq+S6zHu65fQc/UGRUUPLdjI4J+P+HfpAjHmCYGnYOOMT9MjmzSBLl825JyMHfYU85UwXDRtL6vsB+tNAswqa5enYiEWVSAM1TJnyd4ZTahGdzAX6o+5mEdrOLR1Npth5jb3KMnln5Nz00XukxqUQy6Pfkb4iMxZz/HHVNuhyfhyNyQX3KmCfmhWd7SwTHWVKuhhgx64bzYssl/aFFMmtp3l1TvyNioSWCz3JV1drvR8EHqc+/mLehnlqmaSYp+tXZvRh8z2uqD9fMg998TQjAcDybOFqkhRjxQ5tnJ1Zbm1XpNlookeuQ+q26yF6q80wzMuXl82A0UcXujVQYB1J9FlEnEgyXZ0IO369VjwltUx0uf7uEOdmgJ3avEthF1y5Rp/NZNgoXbvUnuvJFH0Nsq0TYLtwuUJ+IHnMvCIJH7C519cTxb9axbojdgWiaqZbZqvXJmTk3GCHNvYyyxOR6yl6vWZOcTvn4+/B9xF24oZxtcBOk//D0F97bBWHuG6X2KKA0R/xG5mZ5QvLJsQ3/VsSCaK+Yec2D7jt9qsbvlhGL0x/JX30igzYXLkR/kL5H7qc1AT9uZ9ZYctuvo/76M92e8WAacNurMdD9MBt0LSd8Xm9jj8xEfa6/pjNeRXMbmPv6tmZJ2PGdK514FH8xwAtUNt7zMLl8W1bY6YekdQrcMMXrFBPyq07sT30f2CnNg4ALMNmYzHjHqtQpNQIotkdcI8d9IYZWJPSFPge/fw24ieW4YTxD/QjbBYqsHO5bvvD6hzbm3Wx7Xau22MrtnKrtmrqVyEKbuRjWU5xFoXCr8DdRyMpyW6nVtQvQj5nBx+6wTp2fkOxWW5dt+w1DitxHQ56kWvuhq6/ckFnOi3p/DVi/hz/qge+AJoKol2BCbAT8G4FwMEqiyfc392Ioe82ZgRbLK2377dOvQrFtcwr7XYhpu9B8mGkv1J26xPHr9mMzENLeybHT64BBkKi39i7oPlpk/6I1LEjG0XFLOMOGrmBHrlotFsGzyfKaCXXLv5ucMZZt+UeNhmgD7iYlb4tx3lIHPEUvVCJPvoA1iIzB08aYmKnNk967eJrkxH6Oh3d4klvbpyXJh7jz7tsFJFtN2gpIuGKzEDxqnAEaihxywpjkx8X2IHN+/l2BvkdjdgqRl8yELZ83h0LGK3AHU9jqC1LROpSaizve1eZC2/mdLcc+Ymj/sXODJtKnrXERJ+IaaQtWQaR80agWYNH7PCGgrN0wRwWkakIqlAMtl4HVXKOg95mM7sR2plsjnNDpkyuuF8Fa828vW3ncjtT9FffjHNvy5vLDv47ImDdxFLgimQrGfVALQ8CnQf8oSRQg3zKPObq627KKK9E6LBTdLstQysaX9cBZRVI5Kk3jQVuFx+fqudDP9qweVvTCanAJQIjlmbpd6UHXlQ/Hm5so4q5pSKfyth9xo68taItlVksJUN/sFnvGJV9Lef3A3Zgo3K35SDfD+7O6uhzF4Czc+7HlxVpjAUNfmwhswcae+hVGKzP8VC5siqWJonuRTwUyuL2I3l8oZMHB/2Shh3ux/6RXRl4vMbfBK1XJD4rP8RizlZps/FgKXwWng7pzGNJCVv8XYOKE71Z/gh7WwrM88hE/4xdCE2wup5bQrig+E9BGsbhV3ntvoV/JUQUVGEKmMfdgNrgelKNVWBsARZ2+5YIsvu/WYf2igqkByqQKuwNxQTsRvnzoy3+ZPxPniqgHGudnSmGSiyCHSrGu4tq2EhGER+LLIEtEegk5mrsj1DVPwImAo+d9v25FAvmizgkEybDChy7FaPz5XMfMwmMqUsexYriBy9uA/Va6X1gTe5Xg9xU/vV2afcoQ58M9c1q/NxFpV9vlXYJMu672Pd1K90KwBsNN89KH1Zk6A6Pki7ClZjxRh7kWWmTN4eP1GZXkYFvFLf58vVWTfZKjDwYvdSp3jI8VftE5W4Ylz+ZzKn703HSNxx/2thO0Kd0kWf5V0MKYDdacikMpKBzl4ZRRQQA1jY+F0BeOj9Pgq+kGOxXwyVf0BmP8tWQL45KSsN+Ulz3R9VEt58I1xOS5FgqL/+tmjIofzl9LQNneF0RdjN9pfylzhy+GPyuhhTOjKJa1grgdnheEXRwBXDLoidPvFQF3yg6U9oDzPHzujP5VcCqyMGouFQ6ISKXQ0WwoWd/ik2ufTKIuTevQJtX445cnqJsL4NHHi2Jwz3uCj+zC7HLwsjEL381NBfFkXsFTkArA19vQlXBXtNHQuoCTdXgNw58yqf15vjT0dHGhh7EES/6R/pTOYD+IqpKUAzcBnzkUkmgMt6PGf4ofeAZMjeWPHo7HepMb04ulBxeqIe+IkTLSO8vHRV9F4B+qXyA9CV2fnMClF4Aa/6qjLzZdNB+6l/SiD0zFuBf9kYpyvJ5sO/sMZVz9NhQvT/W2Lo1dFUmvNnMqXRi05r+RuC/d2vcyCx/q3xNnTcOqIqKbxmLvbRnu5bA5PpHZWa9aeHZj38W46iMAIwjDgsLR/5Mjj0TA+fe15XF52SSVdRIop74dz6joorNrp9JY90/XD1JWE0plM9xzaUwUovBjYR8q4gAjGifjQGUCuCCK6+vEuiAHs87ekWG3WC32QpT9isRor/Bbua42myBKfX1ZPpQkREH3P5T9jF3pXhhs2osdnj871cVGXlwPZdip2db1YjuGSWHyp/srkWgLzRK8VqVbd5wfWyiW5kAslYMZEBDZfxWQwodqPYyaynofG8q56QK2x+8HsjO9qox+Iap3yt9xpPjK8cvqsr6N3o7l0/vy+HT0z3t81Vj/wd39B4fHysy9ka3UAtPP13vWdwj8XbO/QXHf5MVrNLNWgKeiNEH+etGMej8aqMF94iHzyyK0A94G6oeXQ5+MSTZbocd3XB0WuW3uRydz5SZN1xS32ce0TOAOPEsfAsj/Nf44UyetTCU0hvSmVJ66O09s2eqNfwd85LgLlXTgEZ0pix/7DIw9r7yiT25DKbql6QvJcV/2gU99x/ZjAy9OKyAvw+59SVJuyy963ihL/nl17zOo6UyBCuR09uBymwvSKMa+cxwln/OPvRoGJIWaVdEAkZWa/kb/u8SMC58Zjce63X817/PwJfCWhjVmAxQZU7X/EUD8YLOJHcrIoytm3/2s+GS+SwRgHiKqrE5GLGh8rcf1zK4VgvC83j6WjlOFH92lBkkKR8gWwvBGd1WZBmANVFaw9/QNyZJg9yxlVh3gcQuBrgy9oYcmhURALyZOL78QXq1Wo2MYy/iYcFcwC4NsIoI79LQQjjJd8j0FLUasjCKRAHsEYksvGR5VEpJmPYT0KzI9soR0wsEuwxMRQmgKCaDHxWZAOZmWT6ktGaXQr2/WiUl5CsiBHCnusrqEAKfr94VYkWEYCwEe0347jORyeUjGV+ib65rTAQARfjAZRRTj9xUaCbAxxTS9IJjDjKmEqgG/Q4cp0chnxdSxMHRieAluzh92tdhRZ9iJzfuEuZJ1jbkl2rg/XneZxz9xSKjcla9UfqobS2BOzrngkzFC/6ztqZZK7x0avWa3qFJ/BB/nolZL6VV2i/eZtepFujVnjH1y8fP1/yP/OSC67qZ2NHBqoVtoKc/YCc3Vnz5hMItcjKQfF6BHCujma+9xlsL4EakFyhJPwg8TivQof0MqpbAtjDSNt5Cok+1Mm8XAcjgpp/0C1XP6nn4jYAt89d0gNTPCXGYvvO/";
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".split(" ");Sidebar.prototype.allied_telesis=
@@ -5220,31 +5223,37 @@ null,null,this.getTagsForStencil("mxgraph.electrical.transmission","elbow bus","
"2_line_bus;",130,25,"","2-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","2 two line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(v+"3_line_bus;",130,30,"","3-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(v+"4_line_bus;",130,75,"","4-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission",
"3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(v+"8_line_bus;",130,180,"","8-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(v+"twoLineBusElbow;notch=25;",120,120,"","2-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","2 two line bus elbow","electrical transmission paths bus buses").join(" ")),
this.createVertexTemplateEntry(v+"threeLineBusElbow;notch=30;",120,120,"","3-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 two line bus elbow","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(v+"fourLineBusElbow;notch=75;",120,120,"","4-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","4 two line bus elbow","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(v+
-"eightLineBusElbow;notch=180;",200,200,"","8-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","8 two line bus elbow","electrical transmission paths bus buses").join(" "))];this.addPalette("electricalTransmission","Electrical / Transmission Paths",!1,mxUtils.bind(this,function(a){for(var d=0;d<z.length;d++)a.appendChild(z[d](a))}))}})();(function(){Sidebar.prototype.addErPalette=function(){var a=this,b=new mxCell("Row",new mxGeometry(0,0,40,26),"text;strokeColor=none;fillColor=none;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;fontSize=12;");b.vertex=!0;var e=[this.addEntry("er entity relation table",function(){var d=new mxCell("Table",new mxGeometry(0,0,160,110),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;fontSize=14;");
-d.vertex=!0;d.insert(a.cloneCell(b,"Row 1"));d.insert(a.cloneCell(b,"Row 2"));d.insert(a.cloneCell(b,"Row 3"));return a.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Table")}),this.addEntry("er entity relation table section subsection",function(){var d=new mxCell("Section",new mxGeometry(0,0,140,110),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=22;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;fontSize=14;");
-d.vertex=!0;d.insert(a.cloneCell(b,"Row 1"));d.insert(a.cloneCell(b,"Row 2"));d.insert(a.cloneCell(b,"Row 3"));return a.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Section")}),this.addDataEntry("er entity relation table section subsection",160,144,"ER Table 1","7ZjbbqMwEIafhtuVDSHdXBZ60GpTqWr6AgYcsNbYrHE2SZ9+x8a0SUmURCnZdkUOEjMeH2bm44+CF8Tl6l6RqniQGeVecOuhaw9NvCBWUuo327rKVUw593zEMi+48Xwfwdfz7w6FYRuGKqKo0CfN9JuZfwhf0MbzTBJOG2+t19x56yUrORFgRXMp9MyNILDTgvFsStZyYbauNUl/tVZUSMVeIJ5A5jcYHDCs9Iy9mMn+2KzGOI8ll8ruE1Bk3lszZ2ZFt5eiNcx9bPPE71wPZLUVOCW1bk8pOSdVzRJ7bjOxJCpnIpJay9IFtVnebR9qbl8wTjjLBfhS2IuqthZNNngEtqsmVZqu9rbGujb74lpzT2VJtVpD+JJlunDR46aVqKAsL9olRqPGSerGkb/O3dF18LjGH6Ah6NCwEOz3gv7IukAUpDKXkJhmhD/RVBORm9FIy8rVk9N5W3/lDm+uk7bmeKOmTWxkasdSwq+du2RZZlfdBEVIS2JdkZSJfNrsEozeXE9uN+OSsOScyyWYBSxGhTmN1EST5JXhSjKhbSnDCD5Q8Rh9C70QMo3Bxm82fEy40rEUtVaE2a5SAG1JDWxRpmT1DGjRNtvN+yV8x4x/LDP+ScxMdiAToD6IGXWIefx5NivJ5j25o+/HIrPNx4fhcYgAk6aD++hep1IIU5akrRnqMhCcxEBwMQbCDgMKyukj3I9ooMME2MW+uGJcXiHg97gHOsYdOv61PjR0/GfiEJ4tDv20/2qPOJxPwSAOX18cvg/icAlxuPqk4jDZIw7BIA6DOPgYDepwCXWYfFJ1wPjj+z/owiV1AffyfxN3H1oOutCDLuDTHlTuEoZzAbDOjQflLmjrgfpf"),
+"eightLineBusElbow;notch=180;",200,200,"","8-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","8 two line bus elbow","electrical transmission paths bus buses").join(" "))];this.addPalette("electricalTransmission","Electrical / Transmission Paths",!1,mxUtils.bind(this,function(a){for(var d=0;d<z.length;d++)a.appendChild(z[d](a))}))}})();(function(){Sidebar.prototype.addErPalette=function(){function a(a,d,b){a=new mxCell("",new mxGeometry(0,0,0,0),a);a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new mxPoint(160,0),!1);a.geometry.relative=!0;a.edge=!0;null!=d&&(d=new mxCell(d,new mxGeometry(-1,0,0,0),"resizable=0;html=1;align=left;verticalAlign=bottom;"),d.geometry.relative=!0,d.setConnectable(!1),d.vertex=!0,a.insert(d));null!=b&&(b=new mxCell(b,new mxGeometry(1,0,0,0),"resizable=0;html=1;align=right;verticalAlign=bottom;"),
+b.geometry.relative=!0,b.setConnectable(!1),b.vertex=!0,a.insert(b));return a}var b=this,e=new mxCell("Row",new mxGeometry(0,0,40,26),"text;strokeColor=none;fillColor=none;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;fontSize=12;");e.vertex=!0;var d=[this.addEntry("er entity relation table",function(){var a=new mxCell("Table",new mxGeometry(0,0,160,110),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;fontSize=14;");
+a.vertex=!0;a.insert(b.cloneCell(e,"Row 1"));a.insert(b.cloneCell(e,"Row 2"));a.insert(b.cloneCell(e,"Row 3"));return b.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Table")}),this.addEntry("er entity relation table section subsection",function(){var a=new mxCell("Section",new mxGeometry(0,0,140,110),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=22;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;fontSize=14;");
+a.vertex=!0;a.insert(b.cloneCell(e,"Row 1"));a.insert(b.cloneCell(e,"Row 2"));a.insert(b.cloneCell(e,"Row 3"));return b.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Section")}),this.addDataEntry("er entity relation table section subsection",160,144,"ER Table 1","7ZjbbqMwEIafhtuVDSHdXBZ60GpTqWr6AgYcsNbYrHE2SZ9+x8a0SUmURCnZdkUOEjMeH2bm44+CF8Tl6l6RqniQGeVecOuhaw9NvCBWUuo327rKVUw593zEMi+48Xwfwdfz7w6FYRuGKqKo0CfN9JuZfwhf0MbzTBJOG2+t19x56yUrORFgRXMp9MyNILDTgvFsStZyYbauNUl/tVZUSMVeIJ5A5jcYHDCs9Iy9mMn+2KzGOI8ll8ruE1Bk3lszZ2ZFt5eiNcx9bPPE71wPZLUVOCW1bk8pOSdVzRJ7bjOxJCpnIpJay9IFtVnebR9qbl8wTjjLBfhS2IuqthZNNngEtqsmVZqu9rbGujb74lpzT2VJtVpD+JJlunDR46aVqKAsL9olRqPGSerGkb/O3dF18LjGH6Ah6NCwEOz3gv7IukAUpDKXkJhmhD/RVBORm9FIy8rVk9N5W3/lDm+uk7bmeKOmTWxkasdSwq+du2RZZlfdBEVIS2JdkZSJfNrsEozeXE9uN+OSsOScyyWYBSxGhTmN1EST5JXhSjKhbSnDCD5Q8Rh9C70QMo3Bxm82fEy40rEUtVaE2a5SAG1JDWxRpmT1DGjRNtvN+yV8x4x/LDP+ScxMdiAToD6IGXWIefx5NivJ5j25o+/HIrPNx4fhcYgAk6aD++hep1IIU5akrRnqMhCcxEBwMQbCDgMKyukj3I9ooMME2MW+uGJcXiHg97gHOsYdOv61PjR0/GfiEJ4tDv20/2qPOJxPwSAOX18cvg/icAlxuPqk4jDZIw7BIA6DOPgYDepwCXWYfFJ1wPjj+z/owiV1AffyfxN3H1oOutCDLuDTHlTuEoZzAbDOjQflLmjrgfpf"),
this.addDataEntry("er entity relation table section subsection",160,112,"ER Table 2","7ZdRb+IwDIB/TV9Pabuy2+Najj2MSdPYHzBtaKNLkyrNDtivPydNRjtAwLFN22lQpNqxndj+atEgzurVjYKmupMF5UH8KyDXAbkK4kxJqTeyVdWrjHIeRIQVQTwOoojgL4gmh8xCa0YaUFTokzyjzvMP8CfaaR5hzmmnbfWaO227ZDUHgVK6kELP3ApBOa8YL6awlk9m61ZD/ttLaSUVe0Z7wMzHISpwWekZezbO0chEY5xnkktl94kpMd+B58xEdHsp2qLvvc8zfKW6g9XAcAqt9qeUnEPTsrk9t3GsQZVMpFJrWTsjn+VkeKiF/eA6cFYK1OW4F1W+Fl024QXKrppUabra2xqr6vfFteaGyppqtUbzJSt05axHXStJRVlZ+RChaxy0naJ88d3RddS4xh+gId6iQcklKsJtHipozC3mpRnwB5prEKVZTbVsXDk5XfjyK3d2cz/vl9yXtLNNTelYDvzaqWtWFDZqnxMhLYhtAzkT5bTbZUQ2qge3m2mJxJALjmnE4wqDUWFOIzVomL8g3EgmtK1kkuKFBc/IjyRIMNMM5XAj42XMlc6kaLUCZptKkbMlNaylhZLNI5JFfbb9xyV5hUx0LDLRSchc7SAmJu8BzMUWMPe3WKzJ7UnE9EsU7iNoQM0OGo4FaUjNxVtBc4gLk7ZL72gCcimEKdPc15BskxGfREYy+igykj2jJHqfURJ+j5IvPkpG+0bJScR8j5J/HyXJJx0ll5/uX4kN9sXnyMfPDf+Ivy0dP7foOBuLM+dDR8d/Nhwuzx4O57bfKnsvzc5o8HL9Fw=="),
-this.addEntry("er entity relation table row",function(){return a.createVertexTemplateFromCells([b.clone()],b.geometry.width,b.geometry.height,"Row 1")}),this.addEntry("er entity relation table row",function(){var d=new mxCell("uniqueId",new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;fillColor=none;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontSize=12;");
-d.vertex=!0;var c=a.cloneCell(b,"PK");c.connectable=!1;c.style="shape=partialRectangle;top=0;left=0;bottom=0;right=0;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;fontSize=12;";c.geometry.width=30;d.insert(c);return a.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Row 2")}),this.addEntry("er entity relation table row",function(){var d=new mxCell("uniqueId",new mxGeometry(0,0,90,26),
-"shape=partialRectangle;top=0;left=0;right=0;bottom=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontSize=12;");d.vertex=!0;var c=a.cloneCell(b,"PK");c.connectable=!1;c.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;fontSize=12;";c.geometry.width=
-30;d.insert(c);return a.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Row 3")}),this.addEntry("er entity relation table row",function(){var d=new mxCell("row",new mxGeometry(0,0,120,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;fillColor=none;spacingLeft=60;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontSize=12;");d.vertex=!0;var c=a.cloneCell(b,"");c.connectable=!1;c.style=
-"shape=partialRectangle;fontStyle=1;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;fontSize=12;";c.geometry.width=56;d.insert(c);return a.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Row 4")}),this.addEntry("er entity relation table row",function(){var d=new mxCell("uniqueId",new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontSize=12;");
-d.vertex=!0;var c=a.cloneCell(b,"PK");c.connectable=!1;c.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;fontSize=12;";c.geometry.width=30;d.insert(c);return a.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Row 5")}),this.addEntry("er entity relation table row",function(){var d=new mxCell("uniqueId",new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontSize=12;");
-d.vertex=!0;var c=a.cloneCell(b,"");c.connectable=!1;c.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;fontSize=12;";c.geometry.width=30;d.insert(c);return a.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Row 6")}),this.addEntry("er entity relation table row",function(){var d=new mxCell("uniqueId",new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontSize=12;");
-d.vertex=!0;var c=a.cloneCell(b,"");c.connectable=!1;c.style="shape=partialRectangle;top=0;left=0;bottom=0;right=0;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;fontSize=12;";c.geometry.width=30;d.insert(c);return a.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Row 7")}),this.addEntry("er entity relation table row divider hline line separator",function(){var d=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;fontSize=12;");d.vertex=!0;return a.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Divider")}),this.addEntry("er entity relation table row spacer space gap separator",function(){var d=new mxCell("",new mxGeometry(0,0,20,14),"text;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=4;spacingRight=4;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;fontSize=12;");
-d.vertex=!0;return a.createVertexTemplateFromCells([d.clone()],d.geometry.width,d.geometry.height,"Spacer")}),this.createVertexTemplateEntry("text;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;fillColor=#e0e0e0;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;fontSize=14;",80,26,"Title","Title",null,null,"er entity relation table title label"),this.addEntry("er entity relation table",function(){var d=new mxCell("Entity",new mxGeometry(0,0,160,120),"swimlane;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;fillColor=#008cff;fontColor=#FFFFFF;rounded=1;fontSize=14;fontStyle=0;strokeWidth=2;resizeParent=0;resizeLast=1;shadow=0;dashed=0;align=center;");
-d.vertex=!0;var b=new mxCell("+Attribute1\n+Attribute2\n+Attribute3",new mxGeometry(0,30,160,90),"align=left;strokeColor=none;fillColor=none;spacingLeft=4;fontSize=12;verticalAlign=top;resizable=0;rotatable=0;part=1;");b.vertex=!0;d.insert(b);return a.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Entity 2")}),this.createVertexTemplateEntry("ellipse;shape=doubleEllipse;margin=10;strokeWidth=2;fontSize=14;whiteSpace=wrap;html=1;align=center;",100,100,"Attribute","Attribute",
-null,null,"er entity relation attribute"),this.createVertexTemplateEntry("ellipse;shape=cloud;strokeWidth=2;fontSize=14;whiteSpace=wrap;html=1;align=center;",100,100,"Cloud","Cloud",null,null,"er entity relation cloud"),this.createVertexTemplateEntry("strokeWidth=2;rounded=1;arcSize=10;whiteSpace=wrap;html=1;align=center;fontSize=14;",100,100,"Entity","Entity 3",null,null,"er entity relation "),this.createVertexTemplateEntry("strokeWidth=2;whiteSpace=wrap;html=1;align=center;fontSize=14;",100,100,
-"Entity","Entity 4",null,null,"er entity relation "),this.createVertexTemplateEntry("shape=ext;strokeWidth=2;margin=10;double=1;whiteSpace=wrap;html=1;align=center;fontSize=14;",100,100,"Entity","Entity 5",null,null,"er entity relation "),this.createVertexTemplateEntry("shape=rhombus;strokeWidth=2;fontSize=17;perimeter=rhombusPerimeter;whiteSpace=wrap;html=1;align=center;fontSize=14;",100,100,"Has","Has",null,null,"er entity relation has"),this.createVertexTemplateEntry("shape=rhombus;double=1;strokeWidth=2;fontSize=17;perimeter=rhombusPerimeter;whiteSpace=wrap;html=1;align=center;fontSize=14;",
-100,100,"Has","Has",null,null,"er entity relation has"),this.addEntry("er entity relation hierarchy",function(){var d=new mxCell("",new mxGeometry(0,0,100,100),"rounded=1;absoluteArcSize=1;html=1;strokeWidth=2;arcSize=10;fontSize=14;");d.vertex=!0;var b=new mxCell("main",new mxGeometry(0,0,50,100),"html=1;strokeWidth=2;shape=mxgraph.er.anchor;fontSize=14;whiteSpace=wrap;");b.vertex=!0;d.insert(b);b=new mxCell("sub",new mxGeometry(50,5,45,90),"rounded=1;absoluteArcSize=1;html=1;strokeWidth=2;arcSize=10;fontSize=14;whiteSpace=wrap;points=[];strokeColor=inherit;fillColor=inherit;");
-b.vertex=!0;d.insert(b);return a.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Hierarchy")}),this.createVertexTemplateEntry("shape=note;strokeWidth=2;fontSize=14;size=20;whiteSpace=wrap;html=1;",100,100,"Note","Note",null,null,"er entity relation note"),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToMany;endFill=1;",100,100,"","0 to Many Optional",null,"er entity relation zero many optional"),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERoneToMany;",
+this.addEntry("er entity relation table row",function(){return b.createVertexTemplateFromCells([e.clone()],e.geometry.width,e.geometry.height,"Row 1")}),this.addEntry("er entity relation table row",function(){var a=new mxCell("uniqueId",new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;fillColor=none;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontSize=12;");
+a.vertex=!0;var d=b.cloneCell(e,"PK");d.connectable=!1;d.style="shape=partialRectangle;top=0;left=0;bottom=0;right=0;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;fontSize=12;";d.geometry.width=30;a.insert(d);return b.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Row 2")}),this.addEntry("er entity relation table row",function(){var a=new mxCell("uniqueId",new mxGeometry(0,0,90,26),
+"shape=partialRectangle;top=0;left=0;right=0;bottom=1;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontSize=12;");a.vertex=!0;var d=b.cloneCell(e,"PK");d.connectable=!1;d.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;fontSize=12;";d.geometry.width=
+30;a.insert(d);return b.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Row 3")}),this.addEntry("er entity relation table row",function(){var a=new mxCell("row",new mxGeometry(0,0,120,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;fillColor=none;spacingLeft=60;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontSize=12;");a.vertex=!0;var d=b.cloneCell(e,"");d.connectable=!1;d.style=
+"shape=partialRectangle;fontStyle=1;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;fontSize=12;";d.geometry.width=56;a.insert(d);return b.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Row 4")}),this.addEntry("er entity relation table row",function(){var a=new mxCell("uniqueId",new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontSize=12;");
+a.vertex=!0;var d=b.cloneCell(e,"PK");d.connectable=!1;d.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;fontSize=12;";d.geometry.width=30;a.insert(d);return b.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Row 5")}),this.addEntry("er entity relation table row",function(){var a=new mxCell("uniqueId",new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontSize=12;");
+a.vertex=!0;var d=b.cloneCell(e,"");d.connectable=!1;d.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;fontSize=12;";d.geometry.width=30;a.insert(d);return b.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Row 6")}),this.addEntry("er entity relation table row",function(){var a=new mxCell("uniqueId",new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;fontSize=12;");
+a.vertex=!0;var d=b.cloneCell(e,"");d.connectable=!1;d.style="shape=partialRectangle;top=0;left=0;bottom=0;right=0;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;fontSize=12;";d.geometry.width=30;a.insert(d);return b.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Row 7")}),this.addEntry("er entity relation table row divider hline line separator",function(){var a=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;fontSize=12;");a.vertex=!0;return b.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Divider")}),this.addEntry("er entity relation table row spacer space gap separator",function(){var a=new mxCell("",new mxGeometry(0,0,20,14),"text;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=4;spacingRight=4;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;fontSize=12;");
+a.vertex=!0;return b.createVertexTemplateFromCells([a.clone()],a.geometry.width,a.geometry.height,"Spacer")}),this.createVertexTemplateEntry("text;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;fillColor=#e0e0e0;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;fontSize=14;",80,26,"Title","Title",null,null,"er entity relation table title label"),this.addEntry("er entity relation table",function(){var a=new mxCell("Entity",new mxGeometry(0,0,160,120),"swimlane;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;fillColor=#008cff;fontColor=#FFFFFF;rounded=1;fontSize=14;fontStyle=0;strokeWidth=2;resizeParent=0;resizeLast=1;shadow=0;dashed=0;align=center;");
+a.vertex=!0;var d=new mxCell("+Attribute1\n+Attribute2\n+Attribute3",new mxGeometry(0,30,160,90),"align=left;strokeColor=none;fillColor=none;spacingLeft=4;fontSize=12;verticalAlign=top;resizable=0;rotatable=0;part=1;");d.vertex=!0;a.insert(d);return b.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Entity")}),this.createVertexTemplateEntry("whiteSpace=wrap;html=1;align=center;",100,40,"Entity","Entity",null,null,"er entity relation "),this.createVertexTemplateEntry("rounded=1;arcSize=10;whiteSpace=wrap;html=1;align=center;",
+100,40,"Entity","Entity (Rounded)",null,null,"er entity relation chen"),this.createVertexTemplateEntry("shape=ext;margin=3;double=1;whiteSpace=wrap;html=1;align=center;",100,40,"Entity","Weak Entity",null,null,"er entity relation chen"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;align=center;",100,40,"Attribute","Attribute",null,null,"er entity relation attribute chen"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;",100,40,"Attribute",
+"Key Attribute",null,null,"er entity relation attribute key chen"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;align=center;",100,40,'<span style="border-bottom: 1px dotted">Attribute</span>',"Weak Key Attribute",null,null,"er entity relation attribute key weak chen"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;align=center;dashed=1;",100,40,"Attribute","Derived Attribute",null,null,"er entity relation attribute derived chen"),this.createVertexTemplateEntry("ellipse;shape=doubleEllipse;margin=3;whiteSpace=wrap;html=1;align=center;",
+100,40,"Attribute","Multivalue Attribute",null,null,"er entity relation attribute multivalue chen"),this.createVertexTemplateEntry("shape=associativeEntity;whiteSpace=wrap;html=1;align=center;",140,60,"Associative\nEntity","Associative Entity",null,null,"er entity relation associative entity chen"),this.createVertexTemplateEntry("shape=rhombus;perimeter=rhombusPerimeter;whiteSpace=wrap;html=1;align=center;",120,60,"Relationship","Relationship",null,null,"er entity relation chen"),this.createVertexTemplateEntry("shape=rhombus;double=1;perimeter=rhombusPerimeter;whiteSpace=wrap;html=1;align=center;",
+120,60,"Relationship","Identifying Relationship",null,null,"er entity relation chen"),this.createVertexTemplateEntry("ellipse;shape=cloud;whiteSpace=wrap;html=1;align=center;",100,60,"Cloud","Cloud",null,null,"er entity relation cloud"),this.addEntry("er entity relation hierarchy",function(){var a=new mxCell("",new mxGeometry(0,0,100,100),"rounded=1;absoluteArcSize=1;html=1;arcSize=10;");a.vertex=!0;var d=new mxCell("main",new mxGeometry(0,0,50,100),"html=1;shape=mxgraph.er.anchor;whiteSpace=wrap;");
+d.vertex=!0;a.insert(d);d=new mxCell("sub",new mxGeometry(50,5,45,90),"rounded=1;absoluteArcSize=1;html=1;arcSize=10;whiteSpace=wrap;points=[];strokeColor=inherit;fillColor=inherit;");d.vertex=!0;a.insert(d);return b.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Hierarchy")}),this.createVertexTemplateEntry("shape=note;size=20;whiteSpace=wrap;html=1;",100,100,"Note","Note",null,null,"er entity relation note"),this.addEntry("er entity relation relation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;")],
+160,0,"Untitled Relation")}),this.addEntry("er entity relation mandatory participation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;",null,"1")],160,0,"Mandatory Participation (0:1)")}),this.addEntry("er entity relation mandatory participation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;",null,"N")],160,0,"Mandatory Participation (0:N)")}),this.addEntry("er entity relation mandatory participation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;",
+"M","N")],160,0,"Mandatory Participation (M:N)")}),this.addEntry("er entity relation optional participation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;dashed=1;dashPattern=1 2;",null,"1")],160,0,"Optional Participation (0:1)")}),this.addEntry("er entity relation optional participation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;dashed=1;dashPattern=1 2;",null,"N")],160,0,"Optional Participation (0:N)")}),this.addEntry("er entity relation optional participation chen",
+function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;dashed=1;dashPattern=1 2;","M","N")],160,0,"Optional Participation (M:N)")}),this.addEntry("er entity relation recursive relationship chen",function(){return b.createEdgeTemplateFromCells([a("shape=link;html=1;rounded=0;",null,"1")],160,0,"Recursive Relationship (0:1)")}),this.addEntry("er entity relation recursive relationship chen",function(){return b.createEdgeTemplateFromCells([a("shape=link;html=1;rounded=0;",
+null,"N")],160,0,"Recursive Relationship (0:N)")}),this.addEntry("er entity relation recursive relationship chen",function(){return b.createEdgeTemplateFromCells([a("shape=link;html=1;rounded=0;","M","N")],160,0,"Recursive Relationship (M:N)")}),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToMany;endFill=1;",100,100,"","0 to Many Optional",null,"er entity relation zero many optional"),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERoneToMany;",
100,100,"","1 to Many",null,"er entity relation one many"),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERmandOne;",100,100,"","1 Mandatory",null,"er entity relation one mandatory"),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERmandOne;startArrow=ERmandOne;",100,100,"","1 to 1",null,"er entity relation one"),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERone;endFill=1;",
100,100,"","1",null,"er entity relation one"),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToOne;endFill=1;",100,100,"","0 to 1",null,"er entity relation zero one"),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERmany;",100,100,"","Many",null,"er entity relation many"),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERmany;startArrow=ERmany;",100,100,"","Many to Many",
null,"er entity relation many"),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToMany;startArrow=ERzeroToOne;",100,100,"","1 Optional to Many Optional",null,"er entity relation one optional many"),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToMany;startArrow=ERmandOne;",100,100,"","1 Mandatory to Many Optional",null,"er entity relation one mandatory many optional"),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToOne;startArrow=ERmandOne;",
100,100,"","1 Mandatory to 1 Optional",null,"er entity relation one mandatory optional"),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERoneToMany;startArrow=ERmandOne;",100,100,"","1 Mandatory to Many Mandatory",null,"er entity relation one mandatory many"),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERoneToMany;startArrow=ERzeroToOne;",100,100,"","1 Optional to Many Mandatory",null,"er entity relation one optional mandatory many"),
this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERoneToMany;startArrow=ERoneToMany;",100,100,"","Many Mandatory to Many Mandatory",null,"er entity relation mandatory many"),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERoneToMany;startArrow=ERzeroToMany;",100,100,"","Many Optional to Many Mandatory",null,"er entity relation mandatory many optional"),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToMany;endFill=1;startArrow=ERzeroToMany;",
-100,100,"","Many Optional to Many Optional",null,"er entity relation many optional")];this.addPaletteFunctions("er",mxResources.get("entityRelation"),!1,e)}})();(function(){Sidebar.prototype.addFloorplanPalette=function(){var a=mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=bottom;html=1;"+mxConstants.STYLE_VERTICAL_ALIGN+"=top;align=center;shape=mxgraph.floorplan.",b=[this.createVertexTemplateEntry(a+"wall;fillColor=#000000;",100,10,"","Wall (Horizontal)",null,null,this.getTagsForStencil("mxgraph.floorplan","wall","floorplan ").join(" ")),this.createVertexTemplateEntry(a+"wall;fillColor=#000000;direction=south;",10,100,"","Wall (Vertical)",null,null,this.getTagsForStencil("mxgraph.floorplan",
+100,100,"","Many Optional to Many Optional",null,"er entity relation many optional")];this.addPaletteFunctions("er",mxResources.get("entityRelation"),!1,d)}})();(function(){Sidebar.prototype.addFloorplanPalette=function(){var a=mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=bottom;html=1;"+mxConstants.STYLE_VERTICAL_ALIGN+"=top;align=center;shape=mxgraph.floorplan.",b=[this.createVertexTemplateEntry(a+"wall;fillColor=#000000;",100,10,"","Wall (Horizontal)",null,null,this.getTagsForStencil("mxgraph.floorplan","wall","floorplan ").join(" ")),this.createVertexTemplateEntry(a+"wall;fillColor=#000000;direction=south;",10,100,"","Wall (Vertical)",null,null,this.getTagsForStencil("mxgraph.floorplan",
"wall","floorplan ").join(" ")),this.createVertexTemplateEntry(a+"wallCorner;fillColor=#000000;",100,100,"","Wall (Corner NW)",null,null,this.getTagsForStencil("mxgraph.floorplan","wallCorner","floorplan ").join(" ")),this.createVertexTemplateEntry(a+"wallCorner;fillColor=#000000;direction=south;",100,100,"","Wall (Corner NE)",null,null,this.getTagsForStencil("mxgraph.floorplan","wallCorner","floorplan ").join(" ")),this.createVertexTemplateEntry(a+"wallCorner;fillColor=#000000;direction=west",100,
100,"","Wall (Corner SE)",null,null,this.getTagsForStencil("mxgraph.floorplan","wallCorner","floorplan ").join(" ")),this.createVertexTemplateEntry(a+"wallCorner;fillColor=#000000;direction=north",100,100,"","Wall (Corner SW)",null,null,this.getTagsForStencil("mxgraph.floorplan","wallCorner","floorplan ").join(" ")),this.createVertexTemplateEntry(a+"wallU;fillColor=#000000;",100,100,"","Wall (U)",null,null,this.getTagsForStencil("mxgraph.floorplan","wallU","floorplan ").join(" ")),this.createVertexTemplateEntry(a+
"room;fillColor=#000000;",100,100,"","Room",null,null,this.getTagsForStencil("mxgraph.floorplan","room","floorplan ").join(" ")),this.createVertexTemplateEntry("shape=dimension;whiteSpace=wrap;html=1;align=center;points=[];verticalAlign=bottom;spacingBottom=-5;labelBackgroundColor=#ffffff",100,40,"Label","Horizontal Dimension",null,null,"horizontal dimension measure distance unit"),this.createVertexTemplateEntry("shape=dimension;direction=west;whiteSpace=wrap;html=1;align=center;points=[];verticalAlign=top;spacingTop=-8;labelBackgroundColor=#ffffff",
@@ -7289,19 +7298,19 @@ this.createVertexTemplateEntry("shape=rect;html=1;whiteSpace=wrap;align=center;"
120,"{ rate = constant }\n{ rate = distribution }\n&lt;&lt;continuous&gt;&gt;\n&lt;&lt;discrete&gt;&gt;\nObject Node","Rate",null,null,this.getTagsForStencil("","","sysml activity rate").join(" ")),this.createVertexTemplateEntry("shape=rect;html=1;overflow=fill;whiteSpace=wrap;",140,80,'<p style="margin:0px;margin-top:4px;text-align:center;">Object Node</p><hr/><p style="margin:0px;margin-top:4px;text-align:center;">&lt;&lt;rate&gt;&gt;<br/>rate = constant<br/>rate = distribution</p>',"Rate",null,
null,this.getTagsForStencil("","","sysml activity rate").join(" ")),this.addEntry("sysml activity rate",function(){var a=new mxCell("act",new mxGeometry(0,0,200,100),"html=1;shape=mxgraph.sysml.isActStream;align=left;spacingLeft=5;verticalAlign=top;spacingTop=-3;fontStyle=1;");a.vertex=!0;var c=new mxCell("{ rate = constant }\n{ rate = distributuion}\n&lt;&lt;continuous&gt;&gt;\n&lt;&lt;discrete&gt;&gt;",new mxGeometry(200,50,0,0),"resizable=0;html=1;align=left;verticalAlign=top;labelPosition=left;verticalLabelPosition=middle;labelBackgroundColor=none;fontSize=10;spacingTop=5;");
c.geometry.relative=!1;c.setConnectable(!1);c.vertex=!0;a.insert(c);return b.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Rate")}),this.addDataEntry("sysml activity rate",300,60,"Rate","7ZVNj5swEIZ/ja8RgTarHgO73dNKK+XSHh0YgbXGg+xhA/vrOwZDlnxUqOqhhx5QPK/H43dGD0EkWd09W9lUL1iAFsmTSDKLSOOq7jLQWsSRKkTyKOI44kfE3+/sbofdqJEWDK05EI8H3qVuYVT2OSk0o+yo10GuqGZzj1uRpK6SjVfrrvS+N653td4ol6Ehi5yVnipFcGhk7tNOnMSa1Ko0HObsDCwL4WawBN1d94MUrD8D1kC255Rw4NvYXHRSBVXhQGg4qkCVVaiyC5p0Y1zOlc6j4UWYzu1JJVeTEg/cQ2QlAf8MUpSjcSTZPAsPLOxEnGwj3+x1bqEcWXVsqfXzXmbHO1n7oWm6ivgKUqbF1s16uciaojXF2ENuwZv6XakLFKAo4RBC0Ec8PZ2F9BMnwx6vK7Tqg11LjwaPx9Le2mEHG2AkUoutKcDP2fsFU0z7Bo2v6RlRudT7gBChNwedoh/TGV7/9OvNV9+aPIJOZf5WDpUz1GjP1QYHB/Xh7W/juUHf1QJDh63NYfGarCDTgpak3pelbnEXjr6iGnDpA2UXpLLXEigkXcA637qK3y//+f1Dfif8lmzeZPcOqfy/2M+o+mAtq3zfP0dqN5EaUP3b5HJ4/v6N6Z8/j78A"),
-this.addEntry("sysml activity control flow",function(){var a=new mxCell("",new mxGeometry(0,0,60,40),"shape=rect;html=1;rounded=1;whiteSpace=wrap;");a.vertex=!0;var c=new mxCell("",new mxGeometry(100,0,60,40),"shape=rect;html=1;rounded=1;whiteSpace=wrap;");c.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;html=1;elbow=horizontal;endArrow=open;labelBackgroundColor=none;endSize=12;");f.geometry.relative=!0;f.edge=!0;a.insertEdge(f,!0);c.insertEdge(f,!1);return b.createVertexTemplateFromCells([a,
-c,f],160,60,"Control Flow")}),this.addDataEntry("sysml activity control flow",160,60,"Control Flow","zVNNb4MwDP01ufNR7d7Srqed+AUpsUi0ECMTCu2vnyEZDGnVusu0QyT72c/4PRKRF814JtnqN1RgRX4SeUGIPkTNWIC1IkuMEvlRZFnCR2SvD6rpXE1aSeD8M4QsEK7S9hCQAHT+ZiPQadlOIUHFIw/aN7zlMeWQsHcKVMwGbTyUraym5oEVMRanA3kYH244Q3G9M2ADnm7cMhjldeh4CSISDabWkbWLmOxCXi/MVS4HUfH36vP/q/6TkESZf+DG7mc3QNVQxhTsBYfTCnz1Zq5xrJHMHZ2XdgKd2hPNOLbgGLHyAvYgq/d6NrNAi8RVh26ap2SnF3+ZXJr79N00W6yd1tkY22FPFWyutpdUg9/87yfsJ7DSm+t2+i/M5XR9xHNt88Y/AA=="),this.addDataEntry("sysml activity object flow",
+this.addEntry("sysml activity control flow",function(){var a=new mxCell("",new mxGeometry(0,0,60,40),"shape=rect;html=1;rounded=1;whiteSpace=wrap;");a.vertex=!0;var c=new mxCell("",new mxGeometry(100,0,60,40),"shape=rect;html=1;rounded=1;whiteSpace=wrap;");c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;html=1;elbow=horizontal;endArrow=open;labelBackgroundColor=none;endSize=12;");e.geometry.relative=!0;e.edge=!0;a.insertEdge(e,!0);c.insertEdge(e,!1);return b.createVertexTemplateFromCells([a,
+c,e],160,60,"Control Flow")}),this.addDataEntry("sysml activity control flow",160,60,"Control Flow","zVNNb4MwDP01ufNR7d7Srqed+AUpsUi0ECMTCu2vnyEZDGnVusu0QyT72c/4PRKRF814JtnqN1RgRX4SeUGIPkTNWIC1IkuMEvlRZFnCR2SvD6rpXE1aSeD8M4QsEK7S9hCQAHT+ZiPQadlOIUHFIw/aN7zlMeWQsHcKVMwGbTyUraym5oEVMRanA3kYH244Q3G9M2ADnm7cMhjldeh4CSISDabWkbWLmOxCXi/MVS4HUfH36vP/q/6TkESZf+DG7mc3QNVQxhTsBYfTCnz1Zq5xrJHMHZ2XdgKd2hPNOLbgGLHyAvYgq/d6NrNAi8RVh26ap2SnF3+ZXJr79N00W6yd1tkY22FPFWyutpdUg9/87yfsJ7DSm+t2+i/M5XR9xHNt88Y/AA=="),this.addDataEntry("sysml activity object flow",
260,60,"Object Flow","3ZVNb8IwDIZ/Te4lZdxHYZw49bBzaKwmIo0rN1Dg189tM1g10JDQkLZDJft1X8d5+hGRZtVhRao2a9TgRLoUaUaIYYiqQwbOCZlYLdKFkDLhS8i3G9VJX01qReDDPQY5GPbK7WBQBqEJRxeFxqi6CwkKbjk3oeIpFxMOCXdeg45ZEwi38G51MKxIVlpjA+S1Kjp7y3tkLa4HFOBwc+ZeigOvACsIdORb2tibq7NhW4kBW5romkZNNUNenp0XABxEBtd5pI/w+H0Cn4YkbvUJRKZ/6Q2JBvlEPi8/8wFdQh5TcBtslxfhK62+xrFBsif0QblO9PqVqNexBs+KUxtwc1Vsyx5vhg6Jqx49XIXMHXJ76hafyDPfbqYR3QZ3VMDorxAUlRBGH8Ydz4DAqWD34+6PEJ79Q8Lpd8LTpxHm9HLC9LXRAfQB"),this.addEntry("sysml activity object flow",
-function(){var a=new mxCell("",new mxGeometry(0,0,60,40),"html=1;shape=mxgraph.sysml.objFlowR;strokeWidth=2;whiteSpace=wrap;");a.vertex=!0;var c=new mxCell("",new mxGeometry(140,0,60,40),"html=1;shape=mxgraph.sysml.objFlowL;strokeWidth=2;whiteSpace=wrap;");c.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;html=1;elbow=horizontal;endArrow=open;labelBackgroundColor=none;strokeWidth=2;endSize=12;");f.geometry.relative=!0;f.edge=!0;a.insertEdge(f,!0);c.insertEdge(f,!1);
-return b.createVertexTemplateFromCells([a,c,f],200,60,"Object Flow")}),this.createVertexTemplateEntry("html=1;shape=mxgraph.sysml.objFlowR;whiteSpace=wrap;",120,60,"","Object Flow",null,null,this.getTagsForStencil("","objFlowR","sysml activity object flow").join(" ")),this.createVertexTemplateEntry("html=1;shape=mxgraph.sysml.objFlowL;whiteSpace=wrap;",120,60,"","Object Flow",null,null,this.getTagsForStencil("","objFlowL","sysml activity object flow").join(" ")),this.addDataEntry("sysml activity probability",
+function(){var a=new mxCell("",new mxGeometry(0,0,60,40),"html=1;shape=mxgraph.sysml.objFlowR;strokeWidth=2;whiteSpace=wrap;");a.vertex=!0;var c=new mxCell("",new mxGeometry(140,0,60,40),"html=1;shape=mxgraph.sysml.objFlowL;strokeWidth=2;whiteSpace=wrap;");c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;html=1;elbow=horizontal;endArrow=open;labelBackgroundColor=none;strokeWidth=2;endSize=12;");e.geometry.relative=!0;e.edge=!0;a.insertEdge(e,!0);c.insertEdge(e,!1);
+return b.createVertexTemplateFromCells([a,c,e],200,60,"Object Flow")}),this.createVertexTemplateEntry("html=1;shape=mxgraph.sysml.objFlowR;whiteSpace=wrap;",120,60,"","Object Flow",null,null,this.getTagsForStencil("","objFlowR","sysml activity object flow").join(" ")),this.createVertexTemplateEntry("html=1;shape=mxgraph.sysml.objFlowL;whiteSpace=wrap;",120,60,"","Object Flow",null,null,this.getTagsForStencil("","objFlowL","sysml activity object flow").join(" ")),this.addDataEntry("sysml activity probability",
350,80,"Probability","7ZXbboMwDIafhnsKZb3uabvZpEp9ggAeiRZiFExPTz+H0FK2Vuu0TdvFLpCc3wdsf0EE8bzcPVhRySfMQQfxMojnFpG8Ve7moHUQhSoP4kUQRSE/QXR/xTtqvWElLBi6JSHyCRuhG/CKF2ra606opaicaSWWaVMH8UxSyY0uRmxupSJYVyJzEVseg7UNWFKZ0I8iBb3CWpFCw+4UibA8C5hqVZjSd0roUrtu2A+7qxO1UjfOA2AJZPccckxIEp+y9+exX0C4VTnJoSRBFZKGmqj9uTgV7rfHRrfAy8uMP14m5AWsuyPoFLfLXjjfa+tjW6JVBzQk2DETbl+OhG97uMfzBYPJp9a2BQwaV9piY3JwfYZ80o7MTGQvRavPUaPtY2sSlo75WIE5amt1cH2PohMpN86AU42NzWBwt25AZ0ELUpthqUskutQVKq7YI58kwxRutgDqot7wO732JqTj90gnMzeUxVSkSity/bceH7SuIFPPTKW99OyaLL58CY6cb0TeIfsMcs7+q3DjJBx8z3fhT7FO/ln/FuvvZsvH/h/qw89/sa8="),
this.addDataEntry("sysml activity probability",250,60,"Probability","7VRNb4MwDP01uVYU1vVc6NrTpGlctmMAF7IFjEJaYL9+Dkk/aJlU7bTDkBD284t5PIewICq7reJ18YwZSBY8sSBSiNpGZReBlMz3RMaCNfN9j27mb36ozoeqV3MFlb5ngW8XHLjcg0VWqRZYWbjRvXRwoUsSt56zIGwKXhu07HKje9b0TSlnmHxsJLavRGgLoSGueWpYLXEI41LkFaUpCQNFgHsxKA3dj+IHyCnfApagVU+UVmS6cIxH+4FeASIv3LIjxhub56elZysocG5MOxPcOMOWoZGnMOGJkEIbJUPFkuIaUrETKbf+eWy5vnERshxil1ZY0SO8MPbGI+MONZQrV0hQayypAFW2UgpbwrCGyiKx+DJ9575JO6HfXFsTv1PszRaU7YSUEUpUg6JgN1yES56ADHn6mSvcV9mR4lTaLzHyR7NqcK9SGG2lO8Y3nrcCSZYdxo2nJucavaCg/qcu/uJq2JqrHLRjXc37JOKuLfDwB7eAxvp//pPz76f//V9vB0rP57ClXx7T3w=="),
this.addDataEntry("sysml activity probability",250,60,"Probability","3VRNb4MwDP01XCcK23ou7dbTPiQu2zGAC9lCjIJb6H79HJK2o2ulqqdpSAj72THPfoYgntf90oimesICVBA/BPHcIJKz6n4OSgVRKIsgXgRRFPIdRI9nopMhGjbCgKZLDkTuwEaoNTjkJfuAnBh7Zj4u2tJW+WhbicaaxubESVdJgrQRucU67oIxoWSp2c2ZAhgG/CvAEPRnaQ6Q57gErIHMllM6WVDlM+5dK2EFsqz8sR0mWueX+6OHptnwfZ+eQfxrBsE0sfQMZiKTSpJlMkRcUtpALlcyFyRR29B08WtQUJSQelej5kdSUc0UFpNTM7LT4YJq5gMZEmHNAdDFzBjsGMMGtENS+WXrTiLr9pLefFlrv7Md3sTsraRSc1RoBkbxargYVyIDlYj8szS41sUuxbN0nVj6I61aXJscRktzgXxjvQ0oHtlmXPiUcr7QK0pNhyrR3ZHYJEwJ5LOO9N6TuGgFbv/gChA21+s//c/6b09/+1evA7uHP65L//lD/gY="),
this.createEdgeTemplateEntry("edgeStyle=none;html=1;endArrow=open;endSize=12;verticalAlign=top;labelBackgroundColor=none;",160,0,"{ rate = constant }\n{rate = distribution}\n&lt;&lt;continuous&gt;&gt;\n&lt;&lt;discrete&gt;&gt;","Rate",null,null,this.getTagsForStencil("","","sysml activity rate").join(" ")),this.addEntry("sysml activity in block definition diagram activity association",function(){var a=new mxCell("bdd",new mxGeometry(0,0,330,250),"html=1;shape=mxgraph.sysml.package;labelX=45;align=left;spacingLeft=5;verticalAlign=top;spacingTop=-3;fontStyle=1;strokeWidth=1;recursiveResize=0;");
-a.vertex=!0;var c=new mxCell("&lt;&lt;activity&gt;&gt;\nactivity name",new mxGeometry(30,40,120,60),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;shape=rect;html=1;whiteSpace=wrap;align=center;");c.vertex=!0;a.insert(c);var f=new mxCell("&lt;&lt;activity&gt;&gt;\nactivity name",new mxGeometry(30,160,120,60),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;shape=rect;html=1;whiteSpace=wrap;align=center;");f.vertex=!0;a.insert(f);var e=new mxCell("action\nname",new mxGeometry(0,
-0,0,0),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;endArrow=none;html=1;edgeStyle=none;endFill=0;startArrow=diamondThin;startFill=1;startSize=12;align=left;verticalAlign=bottom;labelBackgroundColor=none;");e.geometry.relative=!0;e.geometry.x=1;e.edge=!0;c.insertEdge(e,!0);f.insertEdge(e,!1);a.insert(e);c=new mxCell("&lt;&lt;activity&gt;&gt;\nactivity name",new mxGeometry(180,40,120,60),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;shape=rect;html=1;whiteSpace=wrap;align=center;");
-c.vertex=!0;a.insert(c);f=new mxCell("&lt;&lt;block&gt;&gt;\nblock name",new mxGeometry(180,160,120,60),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;shape=rect;html=1;whiteSpace=wrap;align=center;");f.vertex=!0;a.insert(f);e=new mxCell("object\nnode\nname",new mxGeometry(0,0,0,0),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;endArrow=none;html=1;edgeStyle=none;endFill=0;startFill=1;startSize=12;align=left;verticalAlign=bottom;labelBackgroundColor=none;");e.geometry.relative=
-!0;e.geometry.x=1;e.edge=!0;c.insertEdge(e,!0);f.insertEdge(e,!1);a.insert(e);return b.createVertexTemplateFromCells([a],400,250,"In Block Definition Diagrams, Activity, Association")}),this.createVertexTemplateEntry("html=1;shape=mxgraph.sysml.actPart;strokeWidth=3;verticalAlign=top;rotation=-90;whiteSpace=wrap;",100,100,"Partition Name","Activity Partition",null,null,this.getTagsForStencil("","actPart","sysml activity activity partition").join(" ")),this.createVertexTemplateEntry("shape=rect;html=1;rounded=1;strokeWidth=2;verticalAlign=top;whiteSpace=wrap;align=center;",
+a.vertex=!0;var c=new mxCell("&lt;&lt;activity&gt;&gt;\nactivity name",new mxGeometry(30,40,120,60),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;shape=rect;html=1;whiteSpace=wrap;align=center;");c.vertex=!0;a.insert(c);var e=new mxCell("&lt;&lt;activity&gt;&gt;\nactivity name",new mxGeometry(30,160,120,60),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;shape=rect;html=1;whiteSpace=wrap;align=center;");e.vertex=!0;a.insert(e);var g=new mxCell("action\nname",new mxGeometry(0,
+0,0,0),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;endArrow=none;html=1;edgeStyle=none;endFill=0;startArrow=diamondThin;startFill=1;startSize=12;align=left;verticalAlign=bottom;labelBackgroundColor=none;");g.geometry.relative=!0;g.geometry.x=1;g.edge=!0;c.insertEdge(g,!0);e.insertEdge(g,!1);a.insert(g);c=new mxCell("&lt;&lt;activity&gt;&gt;\nactivity name",new mxGeometry(180,40,120,60),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;shape=rect;html=1;whiteSpace=wrap;align=center;");
+c.vertex=!0;a.insert(c);e=new mxCell("&lt;&lt;block&gt;&gt;\nblock name",new mxGeometry(180,160,120,60),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;shape=rect;html=1;whiteSpace=wrap;align=center;");e.vertex=!0;a.insert(e);g=new mxCell("object\nnode\nname",new mxGeometry(0,0,0,0),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;endArrow=none;html=1;edgeStyle=none;endFill=0;startFill=1;startSize=12;align=left;verticalAlign=bottom;labelBackgroundColor=none;");g.geometry.relative=
+!0;g.geometry.x=1;g.edge=!0;c.insertEdge(g,!0);e.insertEdge(g,!1);a.insert(g);return b.createVertexTemplateFromCells([a],400,250,"In Block Definition Diagrams, Activity, Association")}),this.createVertexTemplateEntry("html=1;shape=mxgraph.sysml.actPart;strokeWidth=3;verticalAlign=top;rotation=-90;whiteSpace=wrap;",100,100,"Partition Name","Activity Partition",null,null,this.getTagsForStencil("","actPart","sysml activity activity partition").join(" ")),this.createVertexTemplateEntry("shape=rect;html=1;rounded=1;strokeWidth=2;verticalAlign=top;whiteSpace=wrap;align=center;",
140,50,"(Partition Name)\nAction","Activity Partition",null,null,this.getTagsForStencil("","","sysml activity activity partition").join(" ")),this.addEntry("sysml activity interruptible activity region",function(){var a=new mxCell("region name",new mxGeometry(0,0,160,60),"shape=rect;html=1;rounded=1;verticalAlign=top;dashed=1;strokeWidth=2;whiteSpace=wrap;align=center;");a.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"shape=mxgraph.lean_mapping.electronic_info_flow_edge;html=1;edgeStyle=none;align=center;verticalAlign=bottom;exitX=1;exitY=0.5;fillColor=#ffffff;");
c.geometry.setTerminalPoint(new mxPoint(250,30),!1);c.geometry.relative=!0;c.geometry.x=1;c.edge=!0;a.insertEdge(c,!0);return b.createVertexTemplateFromCells([a,c],250,60,"Interruptible Activity Region")}),this.createVertexTemplateEntry("shape=rect;html=1;rounded=1;dashed=1;strokeWidth=2;verticalAlign=top;whiteSpace=wrap;align=center;",160,60,"&lt;&lt;structured&gt;&gt; node name","Structured Activity Node",null,null,this.getTagsForStencil("","","sysml activity structured activity node").join(" "))];
this.addPalette("sysmlActivities","SysML / Activities",a||!1,mxUtils.bind(this,function(a){for(var b=0;b<e.length;b++)a.appendChild(e[b](a))}))};Sidebar.prototype.addSysMLInteractionsPalette=function(a){var b=this,e=[this.createVertexTemplateEntry("html=1;shape=mxgraph.sysml.package;overflow=fill;labelX=95;align=left;spacingLeft=5;verticalAlign=top;spacingTop=-3;",160,80,'<p style="margin:0px;margin-top:4px;margin-left:5px;text-align:left;"><b>sd</b> Interaction1</p>',"Sequence Diagram",null,null,
@@ -7779,22 +7788,22 @@ DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflic
DrawioFile.prototype.synchronizeFile=function(a,c){this.savingFile?null!=c&&c({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,c):this.updateFile(a,c)};
DrawioFile.prototype.updateFile=function(a,c,d,b){null!=d&&d()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():this.getLatestVersion(mxUtils.bind(this,function(g){try{null!=d&&d()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():null!=g?this.mergeFile(g,a,c,b):this.reloadFile(a,c))}catch(e){null!=c&&c(e)}}),c))};
DrawioFile.prototype.mergeFile=function(a,c,d,b){var g=!0;try{this.stats.fileMerged++;var e=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),k=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=k&&0<k.length){this.shadowPages=k;this.backupPatch=this.isModified()?this.ui.diffPages(e,this.ui.pages):null;var n=[this.ui.diffPages(null!=b?b:e,this.shadowPages)];if(!this.ignorePatches(n)){var m=this.ui.patchPages(e,
-n[0]);b={};var t=this.ui.getHashValueForPages(m,b),e={},f=this.ui.getHashValueForPages(this.shadowPages,e);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",n,"checksum",f==t,t);if(null!=t&&t!=f){var l=this.compressReportData(this.getAnonymizedXmlForPages(k)),p=this.compressReportData(this.getAnonymizedXmlForPages(m)),u=this.ui.hashValue(a.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());this.checksumError(d,n,"Shadow Details: "+JSON.stringify(b)+
-"\nChecksum: "+t+"\nCurrent: "+f+"\nCurrent Details: "+JSON.stringify(e)+"\nFrom: "+u+"\nTo: "+v+"\n\nFile Data:\n"+l+"\nPatched Shadow:\n"+p,null,"mergeFile");return}this.patch(n,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(y){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=d&&d(y);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,y);else{var q=this.getCurrentUser(),x=null!=q?q.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,y)}}catch(D){}}};
+n[0]);b={};var q=this.ui.getHashValueForPages(m,b),e={},f=this.ui.getHashValueForPages(this.shadowPages,e);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",n,"checksum",f==q,q);if(null!=q&&q!=f){var l=this.compressReportData(this.getAnonymizedXmlForPages(k)),p=this.compressReportData(this.getAnonymizedXmlForPages(m)),u=this.ui.hashValue(a.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());this.checksumError(d,n,"Shadow Details: "+JSON.stringify(b)+
+"\nChecksum: "+q+"\nCurrent: "+f+"\nCurrent Details: "+JSON.stringify(e)+"\nFrom: "+u+"\nTo: "+v+"\n\nFile Data:\n"+l+"\nPatched Shadow:\n"+p,null,"mergeFile");return}this.patch(n,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(y){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=d&&d(y);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,y);else{var t=this.getCurrentUser(),x=null!=t?t.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,y)}}catch(D){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var c=new mxCodec(mxUtils.createXmlDocument()),d=c.document.createElement("mxfile");if(null!=a)for(var b=0;b<a.length;b++){var g=c.encode(new mxGraphModel(a[b].root));"1"!=urlParams.dev&&(g=this.ui.anonymizeNode(g,!0));g.setAttribute("id",a[b].getId());a[b].viewState&&this.ui.editor.graph.saveViewState(a[b].viewState,g,!0);d.appendChild(g)}return mxUtils.getPrettyXml(d)};
DrawioFile.prototype.compressReportData=function(a,c,d){c=null!=c?c:1E4;null!=d&&null!=a&&a.length>d?a=a.substring(0,d)+"[...]":null!=a&&a.length>c&&(a=Graph.compress(a)+"\n");return a};
DrawioFile.prototype.checksumError=function(a,c,d,b,g){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=c)for(a=0;a<c.length;a++)this.ui.anonymizePatch(c[a]);var e=mxUtils.bind(this,function(a){var b=this.compressReportData(JSON.stringify(c,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
25E3):"n/a";this.sendErrorReport("Checksum Error in "+g+" "+this.getHash(),(null!=d?d:"")+"\n\nPatches:\n"+b+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==b?e(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==b?e(a):e(null)}),function(){})}else{var k=this.getCurrentUser(),n=null!=k?k.id:"unknown";EditorUi.logError("Checksum Error in "+g+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+n+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:g,label:"user_"+n+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(m){}}}catch(m){}};
-DrawioFile.prototype.sendErrorReport=function(a,c,d,b){try{var g=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),e=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),k=this.getCurrentUser(),n=null!=k?this.ui.hashValue(k.id):"unknown",m=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",t=this.getTitle(),f=t.lastIndexOf("."),k="xml";0<f&&(k=t.substring(f));var l=null!=d?d.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
+DrawioFile.prototype.sendErrorReport=function(a,c,d,b){try{var g=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),e=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),k=this.getCurrentUser(),n=null!=k?this.ui.hashValue(k.id):"unknown",m=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",q=this.getTitle(),f=q.lastIndexOf("."),k="xml";0<f&&(k=q.substring(f));var l=null!=d?d.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+k+")\nUser="+n+m+"\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!=d?"\n\nError: "+d.message:"")+"\n\nStack:\n"+l+"\n\nShadow:\n"+g+"\n\nData:\n"+e,b)}catch(p){}};
DrawioFile.prototype.reloadFile=function(a,c){try{this.ui.spinner.stop();var d=mxUtils.bind(this,function(){this.stats.fileReloaded++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),c=this.ui.editor.graph.getSelectionCells(),d=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(d,b,c);null!=this.backupPatch&&this.patch([this.backupPatch]);var e=this.ui.getCurrentFile();null!=e&&(e.stats=
this.stats);null!=a&&a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}catch(b){null!=c&&c(b)}};DrawioFile.prototype.copyFile=function(a,c){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(a){for(var c=!0,d=0;d<a.length&&c;d++)c=c&&0==Object.keys(a[d]).length;return c};
-DrawioFile.prototype.patch=function(a,c){var d=this.ui.editor.undoManager,b=d.history.slice(),g=d.indexOfNextAdd,e=this.ui.editor.graph;e.container.style.visibility="hidden";var k=this.changeListenerEnabled;this.changeListenerEnabled=!1;var n=e.foldingEnabled,m=e.mathEnabled,t=e.cellRenderer.redraw;e.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());t.apply(this,arguments)};e.model.beginUpdate();try{for(var f=
-0;f<a.length;f++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[f],!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{e.container.style.visibility="";e.model.endUpdate();e.cellRenderer.redraw=t;this.changeListenerEnabled=k;d.history=b;d.indexOfNextAdd=g;d.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)m!=
+DrawioFile.prototype.patch=function(a,c){var d=this.ui.editor.undoManager,b=d.history.slice(),g=d.indexOfNextAdd,e=this.ui.editor.graph;e.container.style.visibility="hidden";var k=this.changeListenerEnabled;this.changeListenerEnabled=!1;var n=e.foldingEnabled,m=e.mathEnabled,q=e.cellRenderer.redraw;e.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());q.apply(this,arguments)};e.model.beginUpdate();try{for(var f=
+0;f<a.length;f++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[f],!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{e.container.style.visibility="";e.model.endUpdate();e.cellRenderer.redraw=q;this.changeListenerEnabled=k;d.history=b;d.indexOfNextAdd=g;d.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)m!=
e.mathEnabled?(this.ui.editor.updateGraphComponents(),e.refresh()):(n!=e.foldingEnabled?e.view.revalidate():e.view.validate(),e.sizeDidChange());this.ui.updateTabContainer()}};
DrawioFile.prototype.save=function(a,c,d,b,g,e){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!=c&&c();else if(null!=d)d({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(k){if(null!=d)d(k);else throw k;}};
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 a=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=a?"false"!=a:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(a,c,d){};DrawioFile.prototype.saveFile=function(a,c,d,b){};
@@ -7846,23 +7855,23 @@ StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,argum
StorageLibrary.prototype.isRenamable=function(a,c,d){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(a,c,d){DrawioFile.call(this,a,c);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(a,c,d){RemoteFile.call(this,a,c,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(a,c,d){};
RemoteLibrary.prototype.saveAs=function(a,c,d){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(a,c,d){StorageFile.call(this,a,c,d);a=d;c=a.lastIndexOf("/");0<=c&&(a=a.substring(c+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,c,d){return!1};UrlLibrary.prototype.saveAs=function(a,c,d){};UrlLibrary.prototype.open=function(){};/*
mxClient.IS_IOS || */
-var StorageDialog=function(a,c,d){function b(b,p,q,e,g,k){function z(){mxEvent.addListener(A,"click",null!=k?k:function(){q!=App.MODE_GOOGLE||a.isDriveDomain()?q==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(q,m.checked);c()})):q==App.MODE_ONEDRIVE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.oneDrive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(q,m.checked);
-c()})):(a.setMode(q,m.checked),c()):window.location.hostname=DriveClient.prototype.newAppHostname})}++t>d&&(mxUtils.br(f),t=0);var A=document.createElement("a");A.style.overflow="hidden";A.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";A.className="geBaseButton";A.style.boxSizing="border-box";A.style.fontSize="11px";A.style.position="relative";A.style.margin="4px";A.style.marginTop="2px";A.style.padding="8px 10px 12px 10px";A.style.width="88px";A.style.height=StorageDialog.extended?"50px":
+var StorageDialog=function(a,c,d){function b(b,p,t,g,e,k){function z(){mxEvent.addListener(A,"click",null!=k?k:function(){t!=App.MODE_GOOGLE||a.isDriveDomain()?t==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(t,m.checked);c()})):t==App.MODE_ONEDRIVE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.oneDrive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(t,m.checked);
+c()})):(a.setMode(t,m.checked),c()):window.location.hostname=DriveClient.prototype.newAppHostname})}++q>d&&(mxUtils.br(f),q=0);var A=document.createElement("a");A.style.overflow="hidden";A.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";A.className="geBaseButton";A.style.boxSizing="border-box";A.style.fontSize="11px";A.style.position="relative";A.style.margin="4px";A.style.marginTop="2px";A.style.padding="8px 10px 12px 10px";A.style.width="88px";A.style.height=StorageDialog.extended?"50px":
"100px";A.style.whiteSpace="nowrap";A.setAttribute("title",p);mxClient.IS_QUIRKS&&(A.style.cssFloat="left",A.style.zoom="1");var u=document.createElement("div");u.style.textOverflow="ellipsis";u.style.overflow="hidden";if(null!=b){var v=document.createElement("img");v.setAttribute("src",b);v.setAttribute("border","0");v.setAttribute("align","absmiddle");v.style.width=StorageDialog.extended?"24px":"60px";v.style.height=StorageDialog.extended?"24px":"60px";v.style.paddingBottom=StorageDialog.extended?
-"4px":"6px";A.appendChild(v)}else u.style.paddingTop="5px",u.style.whiteSpace="normal",mxClient.IS_IOS?(A.style.padding="0px 10px 20px 10px",A.style.top="6px"):mxClient.IS_FF&&(u.style.paddingTop="0px",u.style.marginTop="-2px");StorageDialog.extended&&(A.style.paddingTop="4px",A.style.marginBottom="0px",u.display="inline-block",2==d&&(v.style.width="38px",v.style.height="38px",A.style.width="80px",A.style.height="68px"));A.appendChild(u);mxUtils.write(u,p);if(null!=g)for(b=0;b<g.length;b++)mxUtils.br(u),
-mxUtils.write(u,g[b]);if(null!=e&&null==a[e]){v.style.visibility="hidden";mxUtils.setOpacity(u,10);var B=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});B.spin(A);var n=window.setTimeout(function(){null==a[e]&&(B.stop(),A.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(b,f){null!=a[e]&&f.getProperty("client")==a[e]&&(window.clearTimeout(n),mxUtils.setOpacity(u,
-100),v.style.visibility="",B.stop(),z(),"drive"==e&&null!=l.parentNode&&l.parentNode.removeChild(l))}))}else z();f.appendChild(A)}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 e=a.addLanguageMenu(g,!0);null!=e&&(e.style.bottom=parseInt("28px")-3+"px");if(!a.isOffline()&&1<a.getServiceCount()){e=document.createElement("a");e.setAttribute("href","https://about.draw.io/support/");e.setAttribute("title",
+"4px":"6px";A.appendChild(v)}else u.style.paddingTop="5px",u.style.whiteSpace="normal",mxClient.IS_IOS?(A.style.padding="0px 10px 20px 10px",A.style.top="6px"):mxClient.IS_FF&&(u.style.paddingTop="0px",u.style.marginTop="-2px");StorageDialog.extended&&(A.style.paddingTop="4px",A.style.marginBottom="0px",u.display="inline-block",2==d&&(v.style.width="38px",v.style.height="38px",A.style.width="80px",A.style.height="68px"));A.appendChild(u);mxUtils.write(u,p);if(null!=e)for(b=0;b<e.length;b++)mxUtils.br(u),
+mxUtils.write(u,e[b]);if(null!=g&&null==a[g]){v.style.visibility="hidden";mxUtils.setOpacity(u,10);var B=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});B.spin(A);var n=window.setTimeout(function(){null==a[g]&&(B.stop(),A.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(b,c){null!=a[g]&&c.getProperty("client")==a[g]&&(window.clearTimeout(n),mxUtils.setOpacity(u,
+100),v.style.visibility="",B.stop(),z(),"drive"==g&&null!=l.parentNode&&l.parentNode.removeChild(l))}))}else z();f.appendChild(A)}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 e=a.addLanguageMenu(g,!0);null!=e&&(e.style.bottom=parseInt("28px")-3+"px");if(!a.isOffline()&&1<a.getServiceCount()){e=document.createElement("a");e.setAttribute("href","https://about.draw.io/support/");e.setAttribute("title",
mxResources.get("help"));e.setAttribute("target","_blank");e.style.position="absolute";e.style.userSelect="none";e.style.textDecoration="none";e.style.cursor="pointer";e.style.fontSize="12px";e.style.bottom="28px";e.style.left="26px";e.style.color="gray";var k=document.createElement("img");mxUtils.setOpacity(k,50);k.style.height="16px";k.style.width="16px";k.setAttribute("border","0");k.setAttribute("valign","bottom");k.setAttribute("src",Editor.helpImage);k.style.marginRight="2px";e.appendChild(k);
mxUtils.write(e,mxResources.get("help"));g.appendChild(e)}var n=document.createElement("div");n.style.position="absolute";n.style.cursor="pointer";n.style.fontSize="12px";n.style.bottom="28px";n.style.color="gray";n.style.userSelect="none";mxUtils.write(n,mxResources.get("decideLater"));mxUtils.setPrefixedStyle(n.style,"transform","translate(-50%,0)");n.style.left="50%";a.isOfflineApp()&&(n.style.bottom="28px");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)n.style.marginLeft=
-Math.round(n.clientWidth/2)+"px"};g.appendChild(n);mxEvent.addListener(n,"click",function(){a.hideDialog();var b=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=b});e=document.createElement("div");mxClient.IS_QUIRKS&&(e.style.whiteSpace="nowrap",e.style.cssFloat="left");e.style.border="1px solid #d3d3d3";e.style.borderWidth="1px 0px 1px 0px";e.style.padding="12px 0px 12px 0px";var m=document.createElement("input");m.setAttribute("type",
-"checkbox");m.setAttribute("checked","checked");m.defaultChecked=!0;var t=0,f=document.createElement("div");f.style.paddingTop="2px";e.appendChild(f);var l=document.createElement("p"),k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.paddingTop="4px";k.style.paddingBottom="16px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,mxResources.get("saveDiagramsTo")+":");g.appendChild(k);var p=function(){t=0;"function"===typeof window.DriveClient&&b(IMAGE_PATH+
+"checkbox");m.setAttribute("checked","checked");m.defaultChecked=!0;var q=0,f=document.createElement("div");f.style.paddingTop="2px";e.appendChild(f);var l=document.createElement("p"),k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.paddingTop="4px";k.style.paddingBottom="16px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,mxResources.get("saveDiagramsTo")+":");g.appendChild(k);var p=function(){q=0;"function"===typeof window.DriveClient&&b(IMAGE_PATH+
"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&b(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");b(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||b(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);StorageDialog.extended&&("function"===typeof window.DropboxClient&&
b(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox"),null!=a.gitHub&&b(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub"),null!=a.gitLab&&b(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab"))};g.appendChild(e);p();k=document.createElement("p");k.style.marginTop="8px";k.style.marginBottom="6px";var u=document.createElement("div");u.style.marginBottom="10px";if(!a.isOfflineApp()){var v=document.createElement("a");
-v.style.color="gray";v.style.fontSize="12px";v.style.cursor="pointer";v.style.userSelect="none";mxUtils.write(v,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");u.appendChild(v);k.appendChild(u);mxEvent.addListener(v,"click",function(a){f.innerHTML="";v.innerHTML="";StorageDialog.extended=!StorageDialog.extended;p();mxUtils.write(v,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");mxEvent.consume(a)})}k.appendChild(m);var q=
-document.createElement("span");q.style.color="gray";q.style.fontSize="12px";q.style.userSelect="none";mxUtils.write(q," "+mxResources.get("rememberThisSetting"));k.appendChild(q);mxUtils.br(k);u=a.getRecent();if(!a.isOfflineApp()&&null!=u&&0<u.length){var x=document.createElement("select");x.style.marginTop="8px";x.style.maxWidth="170px";var y=document.createElement("option");y.setAttribute("value","");y.setAttribute("selected","selected");y.style.textAlign="center";mxUtils.write(y,mxResources.get("openRecent")+
-"...");x.appendChild(y);for(y=0;y<u.length;y++)(function(a){var b=a.mode;b==App.MODE_GOOGLE?b="googleDrive":b==App.MODE_ONEDRIVE&&(b="oneDrive");var f=document.createElement("option");f.setAttribute("value",a.id);mxUtils.write(f,a.title+" ("+mxResources.get(b)+")");x.appendChild(f)})(u[y]);k.appendChild(x);mxEvent.addListener(x,"change",function(b){""!=x.value&&a.loadFile(x.value)})}else k.style.marginTop="20px",e.style.padding="30px 0px 26px 0px";Graph.fileSupport&&(u=document.createElement("div"),
+v.style.color="gray";v.style.fontSize="12px";v.style.cursor="pointer";v.style.userSelect="none";mxUtils.write(v,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");u.appendChild(v);k.appendChild(u);mxEvent.addListener(v,"click",function(a){f.innerHTML="";v.innerHTML="";StorageDialog.extended=!StorageDialog.extended;p();mxUtils.write(v,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");mxEvent.consume(a)})}k.appendChild(m);var t=
+document.createElement("span");t.style.color="gray";t.style.fontSize="12px";t.style.userSelect="none";mxUtils.write(t," "+mxResources.get("rememberThisSetting"));k.appendChild(t);mxUtils.br(k);u=a.getRecent();if(!a.isOfflineApp()&&null!=u&&0<u.length){var x=document.createElement("select");x.style.marginTop="8px";x.style.maxWidth="170px";var y=document.createElement("option");y.setAttribute("value","");y.setAttribute("selected","selected");y.style.textAlign="center";mxUtils.write(y,mxResources.get("openRecent")+
+"...");x.appendChild(y);for(y=0;y<u.length;y++)(function(a){var b=a.mode;b==App.MODE_GOOGLE?b="googleDrive":b==App.MODE_ONEDRIVE&&(b="oneDrive");var c=document.createElement("option");c.setAttribute("value",a.id);mxUtils.write(c,a.title+" ("+mxResources.get(b)+")");x.appendChild(c)})(u[y]);k.appendChild(x);mxEvent.addListener(x,"change",function(b){""!=x.value&&a.loadFile(x.value)})}else k.style.marginTop="20px",e.style.padding="30px 0px 26px 0px";Graph.fileSupport&&(u=document.createElement("div"),
u.style.marginBottom="10px",u.style.padding="18px 0px 6px 0px",y=document.createElement("a"),y.style.cursor="pointer",y.style.fontSize="12px",y.style.color="gray",y.style.userSelect="none",mxUtils.write(y,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(y,"click",function(){if(null==a.storageFileInputElt){var b=document.createElement("input");b.setAttribute("type",
-"file");mxEvent.addListener(b,"change",function(){null!=b.files&&(a.hideDialog(),a.openFiles(b.files,!0),b.type="",b.type="file",b.value="")});b.style.display="none";document.body.appendChild(b);a.storageFileInputElt=b}a.storageFileInputElt.click()}),u.appendChild(y),k.appendChild(u),e.style.paddingBottom="4px");e.appendChild(k);mxEvent.addListener(q,"click",function(a){m.checked=!m.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=
+"file");mxEvent.addListener(b,"change",function(){null!=b.files&&(a.hideDialog(),a.openFiles(b.files,!0),b.type="",b.type="file",b.value="")});b.style.display="none";document.body.appendChild(b);a.storageFileInputElt=b}a.storageFileInputElt.click()}),u.appendChild(y),k.appendChild(u),e.style.paddingBottom="4px");e.appendChild(k);mxEvent.addListener(t,"click",function(a){m.checked=!m.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=
document.documentMode)&&window.setTimeout(function(){null==a.drive&&(l.style.padding="8px",l.style.fontSize="9pt",l.style.marginTop="-14px",l.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",g.appendChild(l))},5E3);this.container=g};
StorageDialog.extended=!1;
var SplashDialog=function(a){var c=document.createElement("div");c.style.textAlign="center";var d=a.addLanguageMenu(c,!0);null!=d&&(d.style.bottom="19px");d=null;d=a.getServiceCount();if(!a.isOffline()&&1<d){d=document.createElement("a");d.setAttribute("href","https://about.draw.io/support/");d.setAttribute("title",mxResources.get("help"));d.setAttribute("target","_blank");d.style.position="absolute";d.style.fontSize="12px";d.style.textDecoration="none";d.style.cursor="pointer";d.style.bottom="22px";
@@ -7871,37 +7880,37 @@ b.setAttribute("border","0");b.setAttribute("align","absmiddle");b.style.width="
"/github-logo.svg",g=mxResources.get("github")):a.mode==App.MODE_GITLAB?(b.src=IMAGE_PATH+"/gitlab-logo.svg",g=mxResources.get("gitlab")):a.mode==App.MODE_BROWSER?(b.src=IMAGE_PATH+"/osa_database.png",g=mxResources.get("browser")):(b.src=IMAGE_PATH+"/osa_drive-harddisk.png",g=mxResources.get("device"));var e=document.createElement("div");e.style.margin="4px 0px 0px 0px";var k=document.createElement("button");k.className="geBigButton";k.style.fontSize="18px";k.style.padding="10px";k.style.width="340px";
mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(e.style.padding="42px 0px 56px 0px",k.style.marginBottom="12px"):(d.appendChild(b),mxUtils.write(d,g),c.appendChild(d),e.style.border="1px solid #d3d3d3",e.style.borderWidth="1px 0px 1px 0px",e.style.padding="18px 0px 24px 0px",k.style.marginBottom="8px");mxClient.IS_QUIRKS&&(e.style.whiteSpace="nowrap",e.style.cssFloat="left");mxClient.IS_QUIRKS&&(k.style.width="340px");mxUtils.write(k,mxResources.get("createNewDiagram"));mxEvent.addListener(k,"click",
function(){a.hideDialog();a.actions.get("new").funct()});e.appendChild(k);mxUtils.br(e);k=document.createElement("button");k.className="geBigButton";k.style.marginBottom="22px";k.style.fontSize="18px";k.style.padding="10px";k.style.width="340px";mxClient.IS_QUIRKS&&(k.style.width="340px");mxUtils.write(k,mxResources.get("openExistingDiagram"));mxEvent.addListener(k,"click",function(){a.actions.get("open").funct()});e.appendChild(k);a.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?
-mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?mxResources.get("github"):a.mode==App.MODE_GITLAB?mxResources.get("gitlab"):a.mode==App.MODE_TRELLO?mxResources.get("trello"):a.mode==App.MODE_DEVICE?mxResources.get("device"):a.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var d=function(b){k.style.marginBottom="24px";var f=document.createElement("a");f.setAttribute("href","javascript:void(0)");
-f.style.display="inline-block";f.style.marginTop="6px";mxUtils.write(f,mxResources.get("signOut"));k.style.marginBottom="16px";e.style.paddingBottom="18px";mxEvent.addListener(f,"click",function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});e.appendChild(f)},n=null!=a.drive?a.drive.getUsersList():[];if(a.mode==App.MODE_GOOGLE&&0<n.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");k.style.marginBottom="16px";e.style.paddingBottom=
+mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?mxResources.get("github"):a.mode==App.MODE_GITLAB?mxResources.get("gitlab"):a.mode==App.MODE_TRELLO?mxResources.get("trello"):a.mode==App.MODE_DEVICE?mxResources.get("device"):a.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var d=function(b){k.style.marginBottom="24px";var c=document.createElement("a");c.setAttribute("href","javascript:void(0)");
+c.style.display="inline-block";c.style.marginTop="6px";mxUtils.write(c,mxResources.get("signOut"));k.style.marginBottom="16px";e.style.paddingBottom="18px";mxEvent.addListener(c,"click",function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});e.appendChild(c)},n=null!=a.drive?a.drive.getUsersList():[];if(a.mode==App.MODE_GOOGLE&&0<n.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");k.style.marginBottom="16px";e.style.paddingBottom=
"18px";e.appendChild(d);var m=document.createElement("select");m.style.marginLeft="4px";m.style.width="200px";for(d=0;d<n.length;d++)b=document.createElement("option"),mxUtils.write(b,n[d].displayName),b.value=d,m.appendChild(b),b=document.createElement("option"),b.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(b,"<"+n[d].email+">"),b.setAttribute("disabled","disabled"),m.appendChild(b);b=document.createElement("option");mxUtils.write(b,mxResources.get("addAccount"));b.value=n.length;m.appendChild(b);
-mxEvent.addListener(m,"change",function(){var b=m.value,f=n.length!=b;f&&a.drive.setUser(n[b]);a.drive.authorize(f,function(){a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash()},function(b){a.handleError(b,null,function(){a.hideDialog();a.showSplash()})},!0)});e.appendChild(m)}else a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?d(function(){a.oneDrive.logout()}):a.mode==App.MODE_GITHUB&&null!=a.gitHub?d(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):a.mode==App.MODE_GITLAB&&
+mxEvent.addListener(m,"change",function(){var b=m.value,c=n.length!=b;c&&a.drive.setUser(n[b]);a.drive.authorize(c,function(){a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash()},function(b){a.handleError(b,null,function(){a.hideDialog();a.showSplash()})},!0)});e.appendChild(m)}else a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?d(function(){a.oneDrive.logout()}):a.mode==App.MODE_GITHUB&&null!=a.gitHub?d(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):a.mode==App.MODE_GITLAB&&
null!=a.gitLab?d(function(){a.gitLab.logout();a.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&d(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&d(function(){a.dropbox.logout();a.openLink("https://www.dropbox.com/logout")});mxUtils.br(e);d=document.createElement("a");d.setAttribute("href","javascript:void(0)");d.style.display="inline-block";d.style.marginTop="8px";mxUtils.write(d,mxResources.get("changeStorage"));
mxEvent.addListener(d,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)});e.appendChild(d)}c.appendChild(e);this.container=c},EmbedDialog=function(a,c,d,b,g,e){b=document.createElement("div");var k=/^https?:\/\//.test(c)||/^mailto:\/\//.test(c);null!=e?mxUtils.write(b,e):mxUtils.write(b,mxResources.get(5E5>c.length?k?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(b);e=document.createElement("div");e.style.position="absolute";e.style.top="30px";e.style.right="30px";
e.style.color="gray";mxUtils.write(e,a.formatFileSize(c.length));b.appendChild(e);var n=document.createElement("textarea");n.setAttribute("autocomplete","off");n.setAttribute("autocorrect","off");n.setAttribute("autocapitalize","off");n.setAttribute("spellcheck","false");n.style.fontFamily="monospace";n.style.wordBreak="break-all";n.style.marginTop="10px";n.style.resize="none";n.style.height="150px";n.style.width="440px";n.style.border="1px solid gray";n.value=mxResources.get("updatingDocument");
b.appendChild(n);mxUtils.br(b);this.init=function(){window.setTimeout(function(){5E5>c.length?(n.value=c,n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)):(n.setAttribute("readonly","true"),n.value=c.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};e=document.createElement("div");e.style.position="absolute";e.style.bottom="36px";e.style.right="32px";var m=null;!EmbedDialog.showPreviewOption||
mxClient.IS_CHROMEAPP&&!k||navigator.standalone||!(k||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(m=mxUtils.button(mxResources.get(5E5>c.length?"preview":"openInNewWindow"),function(){var b=5E5>c.length?n.value:c;if(null!=g)g(b);else if(k)try{var f=a.openLink(b);null!=f&&(null==d||0<d)&&window.setTimeout(mxUtils.bind(this,function(){null!=f&&null!=f.location.href&&f.location.href.substring(0,8)!=b.substring(0,8)&&(f.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),
-d||500)}catch(v){a.handleError({message:v.message||mxResources.get("drawingTooLarge")})}else{var e=window.open(),e=null!=e?e.document:null;null!=e?(e.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+c+"</body></html>"),e.close()):a.handleError({message:mxResources.get("errorUpdatingPreview")})}}),m.className="geBtn",e.appendChild(m));if(!k||7500<c.length){var t=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();
-a.saveData("embed.txt","txt",c,"text/plain")});t.className="geBtn";e.appendChild(t)}if(k&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>c.length){var f=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(n.value);a.openLink(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),t=document.createElement("img");t.setAttribute("src",Editor.facebookImage);t.setAttribute("width","18");t.setAttribute("height","18");t.setAttribute("border",
-"0");f.appendChild(t);f.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");f.style.verticalAlign="bottom";f.style.paddingTop="4px";f.style.minWidth="46px";f.className="geBtn";e.appendChild(f)}7168>c.length&&(f=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(n.value);a.openLink(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),
-t=document.createElement("img"),t.setAttribute("src",Editor.tweetImage),t.setAttribute("width","18"),t.setAttribute("height","18"),t.setAttribute("border","0"),t.style.marginBottom="5px",f.appendChild(t),f.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),f.style.verticalAlign="bottom",f.style.paddingTop="4px",f.style.minWidth="46px",f.className="geBtn",e.appendChild(f))}t=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.appendChild(t);f=mxUtils.button(mxResources.get("copy"),
-function(){n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>c.length?mxClient.IS_SF||null!=document.documentMode?t.className="geBtn gePrimaryBtn":(e.appendChild(f),f.className="geBtn gePrimaryBtn",t.className="geBtn"):(e.appendChild(m),t.className="geBtn",m.className="geBtn gePrimaryBtn");b.appendChild(e);this.container=b};
+d||500)}catch(v){a.handleError({message:v.message||mxResources.get("drawingTooLarge")})}else{var e=window.open(),e=null!=e?e.document:null;null!=e?(e.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+c+"</body></html>"),e.close()):a.handleError({message:mxResources.get("errorUpdatingPreview")})}}),m.className="geBtn",e.appendChild(m));if(!k||7500<c.length){var q=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();
+a.saveData("embed.txt","txt",c,"text/plain")});q.className="geBtn";e.appendChild(q)}if(k&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>c.length){var f=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(n.value);a.openLink(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),q=document.createElement("img");q.setAttribute("src",Editor.facebookImage);q.setAttribute("width","18");q.setAttribute("height","18");q.setAttribute("border",
+"0");f.appendChild(q);f.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");f.style.verticalAlign="bottom";f.style.paddingTop="4px";f.style.minWidth="46px";f.className="geBtn";e.appendChild(f)}7168>c.length&&(f=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(n.value);a.openLink(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),
+q=document.createElement("img"),q.setAttribute("src",Editor.tweetImage),q.setAttribute("width","18"),q.setAttribute("height","18"),q.setAttribute("border","0"),q.style.marginBottom="5px",f.appendChild(q),f.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),f.style.verticalAlign="bottom",f.style.paddingTop="4px",f.style.minWidth="46px",f.className="geBtn",e.appendChild(f))}q=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.appendChild(q);f=mxUtils.button(mxResources.get("copy"),
+function(){n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>c.length?mxClient.IS_SF||null!=document.documentMode?q.className="geBtn gePrimaryBtn":(e.appendChild(f),f.className="geBtn gePrimaryBtn",q.className="geBtn"):(e.appendChild(m),q.className="geBtn",m.className="geBtn gePrimaryBtn");b.appendChild(e);this.container=b};
EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(a,c){function d(){var a=null!=C&&null!=C.getTitle()?C.getTitle():this.defaultFilename;if(z.checked&&""!=p.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(p.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<B.length&&(b+="&s="+B);""!=u.value&&"0"!=u.value&&(b+="&border="+u.value);""!=l.value&&(b+="&height="+l.value);b+="&pan="+(v.checked?"1":"0");b+="&zoom="+(q.checked?"1":"0");b+="&fit="+(I.checked?"1":"0");
-b+="&resize="+(D.checked?"1":"0");b+="&x0="+Number(f.value);b+="&y0="+m;g.mathEnabled&&(b+="&math=1");y.checked?b+="&edit=_blank":x.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));t.value=b}else C.constructor==DriveFile||C.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=p.value?b+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"&type=3":(b+=C.getHash().substring(1),b=C.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=
-a&&(b+="&title="+encodeURIComponent(a)),""!=l.value&&(a=parseInt(l.value)+parseInt(f.value),b+="&height="+a),t.value=b):t.value=""}var b=document.createElement("div"),g=a.editor.graph,e=g.getGraphBounds(),k=g.view.scale,n=Math.floor(e.x/k-g.view.translate.x),m=Math.floor(e.y/k-g.view.translate.y);mxUtils.write(b,mxResources.get("googleGadget")+":");mxUtils.br(b);var t=document.createElement("input");t.setAttribute("type","text");t.style.marginBottom="8px";t.style.marginTop="2px";t.style.width="410px";
-b.appendChild(t);mxUtils.br(b);this.init=function(){t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};mxUtils.write(b,mxResources.get("top")+":");var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","4");f.style.marginRight="16px";f.style.marginLeft="4px";f.value=n;b.appendChild(f);mxUtils.write(b,mxResources.get("height")+":");var l=document.createElement("input");l.setAttribute("type",
+var GoogleSitesDialog=function(a,c){function d(){var a=null!=C&&null!=C.getTitle()?C.getTitle():this.defaultFilename;if(z.checked&&""!=p.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(p.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<B.length&&(b+="&s="+B);""!=u.value&&"0"!=u.value&&(b+="&border="+u.value);""!=l.value&&(b+="&height="+l.value);b+="&pan="+(v.checked?"1":"0");b+="&zoom="+(t.checked?"1":"0");b+="&fit="+(I.checked?"1":"0");
+b+="&resize="+(D.checked?"1":"0");b+="&x0="+Number(f.value);b+="&y0="+m;g.mathEnabled&&(b+="&math=1");y.checked?b+="&edit=_blank":x.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));q.value=b}else C.constructor==DriveFile||C.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=p.value?b+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"&type=3":(b+=C.getHash().substring(1),b=C.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=
+a&&(b+="&title="+encodeURIComponent(a)),""!=l.value&&(a=parseInt(l.value)+parseInt(f.value),b+="&height="+a),q.value=b):q.value=""}var b=document.createElement("div"),g=a.editor.graph,e=g.getGraphBounds(),k=g.view.scale,n=Math.floor(e.x/k-g.view.translate.x),m=Math.floor(e.y/k-g.view.translate.y);mxUtils.write(b,mxResources.get("googleGadget")+":");mxUtils.br(b);var q=document.createElement("input");q.setAttribute("type","text");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";
+b.appendChild(q);mxUtils.br(b);this.init=function(){q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};mxUtils.write(b,mxResources.get("top")+":");var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","4");f.style.marginRight="16px";f.style.marginLeft="4px";f.value=n;b.appendChild(f);mxUtils.write(b,mxResources.get("height")+":");var l=document.createElement("input");l.setAttribute("type",
"text");l.setAttribute("size","4");l.style.marginLeft="4px";l.value=Math.ceil(e.height/k);b.appendChild(l);mxUtils.br(b);e=document.createElement("hr");e.setAttribute("size","1");e.style.marginBottom="16px";e.style.marginTop="16px";b.appendChild(e);mxUtils.write(b,mxResources.get("publicDiagramUrl")+":");mxUtils.br(b);var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","28");p.style.marginBottom="8px";p.style.marginTop="2px";p.style.width="410px";p.value=c||"";
-b.appendChild(p);mxUtils.br(b);mxUtils.write(b,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";b.appendChild(u);mxUtils.br(b);var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="16px";b.appendChild(v);mxUtils.write(b,mxResources.get("pan")+" ");var q=document.createElement("input");
-q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="8px";b.appendChild(q);mxUtils.write(b,mxResources.get("zoom")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";x.setAttribute("title",window.location.href);b.appendChild(x);mxUtils.write(b,mxResources.get("edit")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";b.appendChild(y);mxUtils.write(b,
+b.appendChild(p);mxUtils.br(b);mxUtils.write(b,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";b.appendChild(u);mxUtils.br(b);var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="16px";b.appendChild(v);mxUtils.write(b,mxResources.get("pan")+" ");var t=document.createElement("input");
+t.setAttribute("type","checkbox");t.setAttribute("checked","checked");t.defaultChecked=!0;t.style.marginLeft="8px";b.appendChild(t);mxUtils.write(b,mxResources.get("zoom")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";x.setAttribute("title",window.location.href);b.appendChild(x);mxUtils.write(b,mxResources.get("edit")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";b.appendChild(y);mxUtils.write(b,
mxResources.get("asNew")+" ");mxUtils.br(b);var D=document.createElement("input");D.setAttribute("type","checkbox");D.setAttribute("checked","checked");D.defaultChecked=!0;D.style.marginLeft="16px";b.appendChild(D);mxUtils.write(b,mxResources.get("resize")+" ");var I=document.createElement("input");I.setAttribute("type","checkbox");I.style.marginLeft="8px";b.appendChild(I);mxUtils.write(b,mxResources.get("fit")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft=
-"8px";b.appendChild(z);mxUtils.write(b,mxResources.get("embed")+" ");var B=a.getBasenames().join(";"),C=a.getCurrentFile();mxEvent.addListener(v,"change",d);mxEvent.addListener(q,"change",d);mxEvent.addListener(D,"change",d);mxEvent.addListener(I,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(y,"change",d);mxEvent.addListener(z,"change",d);mxEvent.addListener(l,"change",d);mxEvent.addListener(f,"change",d);mxEvent.addListener(u,"change",d);mxEvent.addListener(p,"change",d);d();
-mxEvent.addListener(t,"click",function(){t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)});e=document.createElement("div");e.style.paddingTop="12px";e.style.textAlign="right";k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.className="geBtn gePrimaryBtn";e.appendChild(k);b.appendChild(e);this.container=b},CreateGraphDialog=function(a,c,d){var b=document.createElement("div");b.style.textAlign=
+"8px";b.appendChild(z);mxUtils.write(b,mxResources.get("embed")+" ");var B=a.getBasenames().join(";"),C=a.getCurrentFile();mxEvent.addListener(v,"change",d);mxEvent.addListener(t,"change",d);mxEvent.addListener(D,"change",d);mxEvent.addListener(I,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(y,"change",d);mxEvent.addListener(z,"change",d);mxEvent.addListener(l,"change",d);mxEvent.addListener(f,"change",d);mxEvent.addListener(u,"change",d);mxEvent.addListener(p,"change",d);d();
+mxEvent.addListener(q,"click",function(){q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)});e=document.createElement("div");e.style.paddingTop="12px";e.style.textAlign="right";k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.className="geBtn gePrimaryBtn";e.appendChild(k);b.appendChild(e);this.container=b},CreateGraphDialog=function(a,c,d){var b=document.createElement("div");b.style.textAlign=
"right";this.init=function(){var c=document.createElement("div");c.style.position="relative";c.style.border="1px solid gray";c.style.width="100%";c.style.height="360px";c.style.overflow="hidden";c.style.marginBottom="16px";mxEvent.disableContextMenu(c);b.appendChild(c);var e=new Graph(c);e.setCellsCloneable(!0);e.setPanning(!0);e.setAllowDanglingEdges(!1);e.connectionHandler.select=!1;e.view.setTranslate(20,20);e.border=20;e.panningHandler.useLeftButtonForPanning=!0;var k="curved=1;";e.cellRenderer.installCellOverlayListeners=
function(a,b,c){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(c.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(c){b.fireEvent(new mxEventObject("pointerdown","event",c,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(c.node,"touchstart",function(c){b.fireEvent(new mxEventObject("pointerdown","event",c,"state",a))})};e.getAllConnectionConstraints=function(){return null};e.connectionHandler.marker.highlight.keepOnTop=
!1;e.connectionHandler.createEdgeState=function(a){a=e.createEdge(null,null,null,null,null,k);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var n=e.getDefaultParent(),m=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,c){e.connectionHandler.reset();e.clearSelection();var f=e.getCellGeometry(a),d;l(function(){d=e.insertVertex(n,null,"Entry",f.x,f.y,80,30,"rounded=1;");m(d);e.view.refresh(d);
-e.insertEdge(n,null,"",a,d,k)},function(){e.scrollCellToVisible(d)})});b.addListener("pointerdown",function(a,b){var c=b.getProperty("event"),f=b.getProperty("state");e.popupMenuHandler.hideMenu();e.stopEditing(!1);var d=mxUtils.convertPoint(e.container,mxEvent.getClientX(c),mxEvent.getClientY(c));e.connectionHandler.start(f,d.x,d.y);e.isMouseDown=!0;e.isMouseTrigger=mxEvent.isMouseEvent(c);mxEvent.consume(c)});e.addCellOverlay(a,b)});e.getModel().beginUpdate();var t;try{t=e.insertVertex(n,null,"Start",
-0,0,80,30,"ellipse"),m(t)}finally{e.getModel().endUpdate()}var f;"horizontalTree"==d?(f=new mxCompactTreeLayout(e),f.edgeRouting=!1,f.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==d?(f=new mxCompactTreeLayout(e,!1),f.edgeRouting=!1,f.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==d?(f=new mxRadialTreeLayout(e,!1),f.edgeRouting=!1,f.levelDistance=80):"verticalFlow"==d?f=new mxHierarchicalLayout(e,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-d?f=new mxHierarchicalLayout(e,mxConstants.DIRECTION_WEST):"organic"==d?(f=new mxFastOrganicLayout(e,!1),f.forceConstant=80):"circle"==d&&(f=new mxCircleLayout(e));if(null!=f){var l=function(a,b){e.getModel().beginUpdate();try{null!=a&&a(),f.execute(e.getDefaultParent(),t)}catch(D){throw D;}finally{var c=new mxMorphing(e);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){e.getModel().endUpdate();null!=b&&b()}));c.startAnimation()}},p=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
+e.insertEdge(n,null,"",a,d,k)},function(){e.scrollCellToVisible(d)})});b.addListener("pointerdown",function(a,b){var c=b.getProperty("event"),f=b.getProperty("state");e.popupMenuHandler.hideMenu();e.stopEditing(!1);var d=mxUtils.convertPoint(e.container,mxEvent.getClientX(c),mxEvent.getClientY(c));e.connectionHandler.start(f,d.x,d.y);e.isMouseDown=!0;e.isMouseTrigger=mxEvent.isMouseEvent(c);mxEvent.consume(c)});e.addCellOverlay(a,b)});e.getModel().beginUpdate();var q;try{q=e.insertVertex(n,null,"Start",
+0,0,80,30,"ellipse"),m(q)}finally{e.getModel().endUpdate()}var f;"horizontalTree"==d?(f=new mxCompactTreeLayout(e),f.edgeRouting=!1,f.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==d?(f=new mxCompactTreeLayout(e,!1),f.edgeRouting=!1,f.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==d?(f=new mxRadialTreeLayout(e,!1),f.edgeRouting=!1,f.levelDistance=80):"verticalFlow"==d?f=new mxHierarchicalLayout(e,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
+d?f=new mxHierarchicalLayout(e,mxConstants.DIRECTION_WEST):"organic"==d?(f=new mxFastOrganicLayout(e,!1),f.forceConstant=80):"circle"==d&&(f=new mxCircleLayout(e));if(null!=f){var l=function(a,b){e.getModel().beginUpdate();try{null!=a&&a(),f.execute(e.getDefaultParent(),q)}catch(D){throw D;}finally{var c=new mxMorphing(e);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){e.getModel().endUpdate();null!=b&&b()}));c.startAnimation()}},p=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
function(a,b,c,f,d){p.apply(this,arguments);l()};e.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);l()};e.connectionHandler.addListener(mxEvent.CONNECT,function(){l()})}var u=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=c.parentNode&&(e.destroy(),c.parentNode.removeChild(c));a.hideDialog()})});u.className="geBtn";a.editor.cancelFirst&&b.appendChild(u);var v=mxUtils.button(mxResources.get("insert"),function(){e.clearCellOverlays();
var b=a.editor.graph.getFreeInsertPoint(),b=a.editor.graph.importCells(e.getModel().getChildren(e.getDefaultParent()),b.x,b.y),f=a.editor.graph.view,d=f.getBounds(b);d.x-=f.translate.x;d.y-=f.translate.y;a.editor.graph.scrollRectToVisible(d);a.editor.graph.setSelectionCells(b);null!=c.parentNode&&(e.destroy(),c.parentNode.removeChild(c));a.hideDialog()});b.appendChild(v);v.className="geBtn gePrimaryBtn";a.editor.cancelFirst||b.appendChild(u)};this.container=b};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":
@@ -7911,92 +7920,92 @@ null!=b?b.src:"";var e=!1,k=function(){e||""==g.value||a.isOffline()?(n.value=""
c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(f){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxBackgroundSize,function(a,b,c,f,d,l){g.value=a;k()},function(){},
function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0,a.maxBackgroundBytes,a.maxBackgroundBytes);else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var f=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(f)&&(g.value=decodeURIComponent(f),k())}b.stopPropagation();b.preventDefault()}),!1)}};d.appendChild(g);mxUtils.br(d);mxUtils.br(d);mxUtils.write(d,mxResources.get("width")+":");var n=document.createElement("input");
n.setAttribute("type","text");n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="16px";n.value=null!=b?b.width:"";d.appendChild(n);mxUtils.write(d,mxResources.get("height")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="16px";m.value=null!=b?b.height:"";d.appendChild(m);b=mxUtils.button(mxResources.get("reset"),function(){g.value="";n.value="";m.value="";e=!1});mxEvent.addListener(b,"mousedown",
-function(){e=!0});mxEvent.addListener(b,"touchstart",function(){e=!0});b.className="geBtn";b.width="100";d.appendChild(b);mxUtils.br(d);mxEvent.addListener(g,"change",k);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(g.value=a.url,k()));g.focus()};b=document.createElement("div");b.style.marginTop="40px";b.style.textAlign="right";var t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
-t.className="geBtn";a.editor.cancelFirst&&b.appendChild(t);if(!a.isOffline()&&"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top){var f=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)});
+function(){e=!0});mxEvent.addListener(b,"touchstart",function(){e=!0});b.className="geBtn";b.width="100";d.appendChild(b);mxUtils.br(d);mxEvent.addListener(g,"change",k);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(g.value=a.url,k()));g.focus()};b=document.createElement("div");b.style.marginTop="40px";b.style.textAlign="right";var q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
+q.className="geBtn";a.editor.cancelFirst&&b.appendChild(q);if(!a.isOffline()&&"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top){var f=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)});
f.className="geBtn";b.appendChild(f);null!=a.drive&&"1"==urlParams.photos&&(f=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(a.drive.token).addView(google.picker.ViewId.PHOTO_UPLOAD);a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),
-f.className="geBtn",b.appendChild(f))}f=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c(""!=g.value?new mxImage(mxUtils.trim(g.value),n.value,m.value):null)});f.className="geBtn gePrimaryBtn";b.appendChild(f);a.editor.cancelFirst||b.appendChild(t);d.appendChild(b);this.container=d},ParseDialog=function(a,c,d){function b(b,c){var f=b.split("\n");if("plantUmlPng"==c||"plantUmlSvg"==c||"plantUmlTxt"==c){if(a.spinner.spin(document.body,mxResources.get("inserting"))){var d=a.editor.graph,
-l="plantUmlTxt"==c?"txt":"plantUmlPng"==c?"png":"svg";a.generatePlantUmlImage(b,l,function(f,c,p){a.spinner.stop();var g=null;d.getModel().beginUpdate();try{g="txt"==l?a.insertAsPreText(f,e.x,e.y):d.insertVertex(null,null,null,e.x,e.y,c,p,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(f)+";"),d.setAttributeForCell(g,"plantUmlData",JSON.stringify({data:b,format:l}))}finally{d.getModel().endUpdate()}null!=g&&(d.setSelectionCell(g),d.scrollCellToVisible(g))},
+f.className="geBtn",b.appendChild(f))}f=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c(""!=g.value?new mxImage(mxUtils.trim(g.value),n.value,m.value):null)});f.className="geBtn gePrimaryBtn";b.appendChild(f);a.editor.cancelFirst||b.appendChild(q);d.appendChild(b);this.container=d},ParseDialog=function(a,c,d){function b(b,c){var f=b.split("\n");if("plantUmlPng"==c||"plantUmlSvg"==c||"plantUmlTxt"==c){if(a.spinner.spin(document.body,mxResources.get("inserting"))){var d=a.editor.graph,
+l="plantUmlTxt"==c?"txt":"plantUmlPng"==c?"png":"svg";a.generatePlantUmlImage(b,l,function(c,f,p){a.spinner.stop();var g=null;d.getModel().beginUpdate();try{g="txt"==l?a.insertAsPreText(c,e.x,e.y):d.insertVertex(null,null,null,e.x,e.y,f,p,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(c)+";"),d.setAttributeForCell(g,"plantUmlData",JSON.stringify({data:b,format:l}))}finally{d.getModel().endUpdate()}null!=g&&(d.setSelectionCell(g),d.scrollCellToVisible(g))},
function(b){a.handleError(b)})}}else if("table"==c){for(var p=null,g=[],k=0,z=0;z<f.length;z++){var u=mxUtils.trim(f[z]);if("create table"==u.substring(0,12).toLowerCase())u=mxUtils.trim(u.substring(12)),"("==u.charAt(u.length-1)&&(u=u.substring(0,u.lastIndexOf(" "))),p=new mxCell(u,new mxGeometry(k,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"),
p.vertex=!0,g.push(p),u=a.editor.graph.getPreferredSizeForCell(A),null!=u&&(p.geometry.width=u.width+10);else if(null!=p&&")"==u.charAt(0))k+=p.geometry.width+40,p=null;else if("("!=u&&null!=p&&(u=u.substring(0,","==u.charAt(u.length-1)?u.length-1:u.length),"primary key"!=u.substring(0,11).toLowerCase())){var n=u.toLowerCase().indexOf("primary key"),u=u.replace(/primary key/i,""),A=new mxCell(u,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;");
A.vertex=!0;u=sb.cloneCell(A,0<n?"PK":"");u.connectable=!1;u.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;";u.geometry.width=30;u.geometry.height=26;A.insert(u);u=a.editor.graph.getPreferredSizeForCell(A);null!=u&&p.geometry.width<u.width+10&&(p.geometry.width=Math.min(220,u.width+10));p.insert(A);p.geometry.height+=26}}0<g.length&&(d=a.editor.graph,
z=d.view,f=d.getGraphBounds(),d.setSelectionCells(d.importCells(g,Math.ceil(Math.max(0,f.x/z.scale-z.translate.x)+4*d.gridSize),Math.ceil(Math.max(0,(f.y+f.height)/z.scale-z.translate.y)+4*d.gridSize))),d.scrollCellToVisible(d.getSelectionCell()))}else if("list"==c){if(0<f.length){d=a.editor.graph;A=null;g=[];for(z=p=0;z<f.length;z++)";"!=f[z].charAt(0)&&(0==f[z].length?A=null:null==A?(A=new mxCell(f[z],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;"),
A.vertex=!0,g.push(A),u=d.getPreferredSizeForCell(A),null!=u&&A.geometry.width<u.width+10&&(A.geometry.width=u.width+10),p+=A.geometry.width+40):"--"==f[z]?(u=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;"),u.vertex=!0,A.geometry.height+=u.geometry.height,A.insert(u)):0<f[z].length&&(k=new mxCell(f[z],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
k.vertex=!0,u=d.getPreferredSizeForCell(k),null!=u&&k.geometry.width<u.width&&(k.geometry.width=u.width),A.geometry.width=Math.max(A.geometry.width,k.geometry.width),A.geometry.height+=k.geometry.height,A.insert(k)));if(0<g.length){d.getModel().beginUpdate();try{g=d.importCells(g,e.x,e.y);u=[];for(z=0;z<g.length;z++)u.push(g[z]),u=u.concat(g[z].children);d.fireEvent(new mxEventObject("cellsInserted","cells",u))}finally{d.getModel().endUpdate()}d.setSelectionCells(g);d.scrollCellToVisible(d.getSelectionCell())}}}else{for(var A=
-function(a){var b=m[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,m[a]=b,g.push(b));return b},m={},g=[],z=0;z<f.length;z++)if(";"!=f[z].charAt(0)){var F=f[z].split("->");if(2<=F.length){var n=A(F[0]),t=A(F[F.length-1]),F=new mxCell(2<F.length?F[1]:"",new mxGeometry);F.edge=!0;n.insertEdge(F,!0);t.insertEdge(F,!1);g.push(F)}}if(0<g.length){f=document.createElement("div");f.style.visibility="hidden";document.body.appendChild(f);d=new Graph(f);d.getModel().beginUpdate();
+function(a){var b=m[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,m[a]=b,g.push(b));return b},m={},g=[],z=0;z<f.length;z++)if(";"!=f[z].charAt(0)){var F=f[z].split("->");if(2<=F.length){var n=A(F[0]),q=A(F[F.length-1]),F=new mxCell(2<F.length?F[1]:"",new mxGeometry);F.edge=!0;n.insertEdge(F,!0);q.insertEdge(F,!1);g.push(F)}}if(0<g.length){f=document.createElement("div");f.style.visibility="hidden";document.body.appendChild(f);d=new Graph(f);d.getModel().beginUpdate();
try{g=d.importCells(g);for(z=0;z<g.length;z++)d.getModel().isVertex(g[z])&&(u=d.getPreferredSizeForCell(g[z]),g[z].geometry.width=Math.max(g[z].geometry.width,u.width),g[z].geometry.height=Math.max(g[z].geometry.height,u.height));p=new mxFastOrganicLayout(d);p.disableEdgeStyle=!1;p.forceConstant=120;p.execute(d.getDefaultParent());k=new mxParallelEdgeLayout(d);k.spacing=20;k.execute(d.getDefaultParent())}finally{d.getModel().endUpdate()}d.clearCellOverlays();u=[];a.editor.graph.getModel().beginUpdate();
try{u=a.editor.graph.importCells(d.getModel().getChildren(d.getDefaultParent()),e.x,e.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",u))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(u);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());d.destroy();f.parentNode.removeChild(f)}}}function g(){return"list"==n.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":
"table"==n.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"==n.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"==n.value||"plantUmlTxt"==n.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 e=a.editor.graph.getFreeInsertPoint();c=document.createElement("div");c.style.textAlign="right";var k=document.createElement("textarea");k.style.resize="none";k.style.width="100%";k.style.height=
"354px";k.style.marginBottom="16px";var n=document.createElement("select");"formatSql"==d&&(n.style.display="none");var m=document.createElement("option");m.setAttribute("value","list");mxUtils.write(m,mxResources.get("list"));"plantUml"!=d&&n.appendChild(m);null!=d&&"fromText"!=d||m.setAttribute("selected","selected");m=document.createElement("option");m.setAttribute("value","table");mxUtils.write(m,mxResources.get("formatSql"));"formatSql"==d&&(n.appendChild(m),m.setAttribute("selected","selected"));
-m=document.createElement("option");m.setAttribute("value","diagram");mxUtils.write(m,mxResources.get("diagram"));"plantUml"!=d&&n.appendChild(m);m=document.createElement("option");m.setAttribute("value","plantUmlSvg");mxUtils.write(m,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==d&&m.setAttribute("selected","selected");var t=document.createElement("option");t.setAttribute("value","plantUmlPng");mxUtils.write(t,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+
-")");var f=document.createElement("option");f.setAttribute("value","plantUmlTxt");mxUtils.write(f,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==d&&(n.appendChild(m),n.appendChild(t),n.appendChild(f));var l=g();k.value=l;c.appendChild(k);this.init=function(){k.focus()};Graph.fileSupport&&(k.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),k.addEventListener("drop",function(a){a.stopPropagation();
+m=document.createElement("option");m.setAttribute("value","diagram");mxUtils.write(m,mxResources.get("diagram"));"plantUml"!=d&&n.appendChild(m);m=document.createElement("option");m.setAttribute("value","plantUmlSvg");mxUtils.write(m,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==d&&m.setAttribute("selected","selected");var q=document.createElement("option");q.setAttribute("value","plantUmlPng");mxUtils.write(q,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+
+")");var f=document.createElement("option");f.setAttribute("value","plantUmlTxt");mxUtils.write(f,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==d&&(n.appendChild(m),n.appendChild(q),n.appendChild(f));var l=g();k.value=l;c.appendChild(k);this.init=function(){k.focus()};Graph.fileSupport&&(k.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),k.addEventListener("drop",function(a){a.stopPropagation();
a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];var b=new FileReader;b.onload=function(a){k.value=a.target.result};b.readAsText(a)}},!1));c.appendChild(n);mxEvent.addListener(n,"change",function(){var a=g();if(0==k.value.length||k.value==l)l=a,k.value=l});d=mxUtils.button(mxResources.get("close"),function(){k.value==l?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});d.className="geBtn";a.editor.cancelFirst&&c.appendChild(d);m=mxUtils.button(mxResources.get("insert"),
-function(){a.hideDialog();b(k.value,n.value)});c.appendChild(m);m.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(d);this.container=c},NewDialog=function(a,c,d,b,g,e,k,n,m,t,f,l,p,u,v,q,x){function y(){var a=!0;if(null!=S)for(;J<S.length&&(a||0!=mxUtils.mod(J,30));)a=S[J++],z(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick,a.preview,a.noImg,a.clibs),a=!1}function D(){if(U)d||a.hideDialog(),u(U,Z,F.value);else if(b)d||a.hideDialog(),b(ca,F.value);
-else{var f=F.value;null!=f&&0<f.length&&a.pickFolder(a.mode,function(b){a.createFile(f,ca,null!=X&&0<X.length?X:null,null,function(){a.hideDialog()},null,b,null,null!=ga&&0<ga.length?ga:null)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function I(a,b,f,c,d,l){null!=ea&&(ea.style.backgroundColor="transparent",ea.style.border="1px solid transparent");E.removeAttribute("disabled");ca=b;X=f;ga=l;ea=a;U=c;Z=d;ea.style.backgroundColor=n;ea.style.border=m}function z(b,f,c,d,l,
-p,g,e,q,k,z){var A=document.createElement("div");A.className="geTemplate";A.style.height=aa+"px";A.style.width=fa+"px";null!=d&&0<d.length&&A.setAttribute("title",d);if(null!=p)A.style.backgroundImage="url("+p+")",A.style.backgroundSize="contain",A.style.backgroundPosition="center center",A.style.backgroundRepeat="no-repeat",mxEvent.addListener(A,"click",function(a){I(A,null,null,b,g,z)}),mxEvent.addListener(A,"dblclick",function(a){D()});else if(!k&&null!=b&&0<b.length){c=q||TEMPLATE_PATH+"/"+b.substring(0,
-b.length-4)+".png";A.style.backgroundImage="url("+c+")";A.style.backgroundPosition="center center";A.style.backgroundRepeat="no-repeat";var u=!1;mxEvent.addListener(A,"click",function(c){E.setAttribute("disabled","disabled");A.style.backgroundColor="transparent";A.style.border="1px solid transparent";c=b;c=/^https?:\/\//.test(c)&&!a.editor.isCorsEnabledForUrl(c)?PROXY_URL+"?url="+encodeURIComponent(c):TEMPLATE_PATH+"/"+c;H.spin(P);mxUtils.get(c,mxUtils.bind(this,function(a){H.stop();200<=a.getStatus()&&
-299>=a.getStatus()&&(I(A,a.getText(),f,null,null,z),u&&D())}))});mxEvent.addListener(A,"dblclick",function(a){u=!0})}else A.innerHTML='<table width="100%" height="100%" style="line-height:1em;word-break: break-all;"><tr><td align="center" valign="middle">'+mxResources.get(c,null,c)+"</td></tr></table>",l&&I(A),null!=e?mxEvent.addListener(A,"click",e):(mxEvent.addListener(A,"click",function(a){I(A,null,null,b,g)}),mxEvent.addListener(A,"dblclick",function(a){D()}));P.appendChild(A)}function B(){W&&
+function(){a.hideDialog();b(k.value,n.value)});c.appendChild(m);m.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(d);this.container=c},NewDialog=function(a,c,d,b,g,e,k,n,m,q,f,l,p,u,v,t,x){function y(){var a=!0;if(null!=S)for(;J<S.length&&(a||0!=mxUtils.mod(J,30));)a=S[J++],z(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick,a.preview,a.noImg,a.clibs),a=!1}function D(){if(U)d||a.hideDialog(),u(U,Z,F.value);else if(b)d||a.hideDialog(),b(ca,F.value);
+else{var c=F.value;null!=c&&0<c.length&&a.pickFolder(a.mode,function(b){a.createFile(c,ca,null!=X&&0<X.length?X:null,null,function(){a.hideDialog()},null,b,null,null!=ga&&0<ga.length?ga:null)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function I(a,b,c,f,d,l){null!=ea&&(ea.style.backgroundColor="transparent",ea.style.border="1px solid transparent");E.removeAttribute("disabled");ca=b;X=c;ga=l;ea=a;U=f;Z=d;ea.style.backgroundColor=n;ea.style.border=m}function z(b,c,f,d,l,
+p,g,e,t,k,z){var A=document.createElement("div");A.className="geTemplate";A.style.height=aa+"px";A.style.width=fa+"px";null!=d&&0<d.length&&A.setAttribute("title",d);if(null!=p)A.style.backgroundImage="url("+p+")",A.style.backgroundSize="contain",A.style.backgroundPosition="center center",A.style.backgroundRepeat="no-repeat",mxEvent.addListener(A,"click",function(a){I(A,null,null,b,g,z)}),mxEvent.addListener(A,"dblclick",function(a){D()});else if(!k&&null!=b&&0<b.length){f=t||TEMPLATE_PATH+"/"+b.substring(0,
+b.length-4)+".png";A.style.backgroundImage="url("+f+")";A.style.backgroundPosition="center center";A.style.backgroundRepeat="no-repeat";var u=!1;mxEvent.addListener(A,"click",function(f){E.setAttribute("disabled","disabled");A.style.backgroundColor="transparent";A.style.border="1px solid transparent";f=b;f=/^https?:\/\//.test(f)&&!a.editor.isCorsEnabledForUrl(f)?PROXY_URL+"?url="+encodeURIComponent(f):TEMPLATE_PATH+"/"+f;H.spin(P);mxUtils.get(f,mxUtils.bind(this,function(a){H.stop();200<=a.getStatus()&&
+299>=a.getStatus()&&(I(A,a.getText(),c,null,null,z),u&&D())}))});mxEvent.addListener(A,"dblclick",function(a){u=!0})}else A.innerHTML='<table width="100%" height="100%" style="line-height:1em;word-break: break-all;"><tr><td align="center" valign="middle">'+mxResources.get(f,null,f)+"</td></tr></table>",l&&I(A),null!=e?mxEvent.addListener(A,"click",e):(mxEvent.addListener(A,"click",function(a){I(A,null,null,b,g)}),mxEvent.addListener(A,"dblclick",function(a){D()}));P.appendChild(A)}function B(){W&&
(W=!1,mxEvent.addListener(P,"scroll",function(a){P.scrollTop+P.clientHeight>=P.scrollHeight&&(y(),mxEvent.consume(a))}));var a=null;if(0<da){var b=document.createElement("div");b.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(b,mxResources.get("custom"));ba.appendChild(b);for(var c in O){var f=document.createElement("div"),b=c,d=O[c];18<b.length&&(b=b.substring(0,18)+"&hellip;");f.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";
-f.setAttribute("title",b+" ("+d.length+")");mxUtils.write(f,f.getAttribute("title"));null!=t&&(f.style.padding=t);ba.appendChild(f);(function(b,c){mxEvent.addListener(f,"click",function(){a!=c&&(a.style.backgroundColor="",a=c,a.style.backgroundColor=k,P.scrollTop=0,P.innerHTML="",J=0,S=O[b],N=null,y())})})(c,f)}b=document.createElement("div");b.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(b,"draw.io");ba.appendChild(b)}for(c in R)f=document.createElement("div"),
-b=mxResources.get(c),d=R[c],null==b&&(b=c.substring(0,1).toUpperCase()+c.substring(1)),18<b.length&&(b=b.substring(0,18)+"&hellip;"),f.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;",f.setAttribute("title",b+" ("+d.length+")"),mxUtils.write(f,f.getAttribute("title")),null!=t&&(f.style.padding=t),ba.appendChild(f),null==a&&0<d.length&&(a=f,a.style.backgroundColor=k,S=d),function(b,c){mxEvent.addListener(f,"click",
+f.setAttribute("title",b+" ("+d.length+")");mxUtils.write(f,f.getAttribute("title"));null!=q&&(f.style.padding=q);ba.appendChild(f);(function(b,c){mxEvent.addListener(f,"click",function(){a!=c&&(a.style.backgroundColor="",a=c,a.style.backgroundColor=k,P.scrollTop=0,P.innerHTML="",J=0,S=O[b],N=null,y())})})(c,f)}b=document.createElement("div");b.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(b,"draw.io");ba.appendChild(b)}for(c in R)f=document.createElement("div"),
+b=mxResources.get(c),d=R[c],null==b&&(b=c.substring(0,1).toUpperCase()+c.substring(1)),18<b.length&&(b=b.substring(0,18)+"&hellip;"),f.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;",f.setAttribute("title",b+" ("+d.length+")"),mxUtils.write(f,f.getAttribute("title")),null!=q&&(f.style.padding=q),ba.appendChild(f),null==a&&0<d.length&&(a=f,a.style.backgroundColor=k,S=d),function(b,c){mxEvent.addListener(f,"click",
function(){a!=c&&(a.style.backgroundColor="",a=c,a.style.backgroundColor=k,P.scrollTop=0,P.innerHTML="",J=0,S=R[b],N=null,y())})}(c,f);y()}d=null!=d?d:!0;g=null!=g?g:!1;k=null!=k?k:"#ebf2f9";n=null!=n?n:"#e6eff8";m=null!=m?m:"1px solid #ccd9ea";f=null!=f?f:EditorUi.templateFile;var C=document.createElement("div");C.style.height="100%";var A=document.createElement("div");A.style.whiteSpace="nowrap";A.style.height="46px";d&&C.appendChild(A);var G=document.createElement("img");G.setAttribute("border",
"0");G.setAttribute("align","absmiddle");G.style.width="40px";G.style.height="40px";G.style.marginRight="10px";G.style.paddingBottom="4px";G.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?
IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!c&&d&&A.appendChild(G);d&&mxUtils.write(A,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");G=".drawio";a.mode==App.MODE_GOOGLE&&null!=a.drive?G=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?G=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?G=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?G=a.gitHub.extension:
a.mode==App.MODE_GITLAB&&null!=a.gitLab?G=a.gitLab.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(G=a.trello.extension);var F=document.createElement("input");F.setAttribute("value",a.defaultFilename+G);F.style.marginLeft="10px";F.style.width=c?"220px":"430px";this.init=function(){d&&(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?F.select():document.execCommand("selectAll",!1,null))};d&&(A.appendChild(F),null!=a.editor.fileExtensions&&(G=FilenameDialog.createTypeHint(a,
-F,a.editor.fileExtensions),G.style.marginTop="12px",A.appendChild(G)));var A=!1,J=0,H=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}),E=mxUtils.button(q||mxResources.get("create"),function(){E.setAttribute("disabled","disabled");D();E.removeAttribute("disabled")});E.className="geBtn gePrimaryBtn";if(l||p){var K=[],N=null,Q=null,Y=null,T=function(a){E.setAttribute("disabled","disabled");for(var b=0;b<K.length;b++)K[b].className=
-b==a?"geBtn gePrimaryBtn":"geBtn"},A=!0;q=document.createElement("div");q.style.whiteSpace="nowrap";q.style.height="30px";C.appendChild(q);G=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ba.style.display="";P.style.left="160px";T(0);P.scrollTop=0;P.innerHTML="";J=0;N!=S&&(S=N,R=Q,da=Y,ba.innerHTML="",B(),N=null)});K.push(G);q.appendChild(G);var L=function(a){ba.style.display="none";P.style.left="30px";T(a?-1:1);null==N&&(N=S);P.scrollTop=0;P.innerHTML="";H.spin(P);var b=
-function(a,b,c){J=0;H.stop();S=a;c=c||{};var f=0,d;for(d in c)f+=c[d].length;if(b)P.innerHTML=b;else if(0==a.length&&0==f)P.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(P.innerHTML="",0<f){ba.style.display="";P.style.left="160px";ba.innerHTML="";da=0;R={"draw.io":a};for(d in c)R[d]=c[d];B()}else y()};a?p(V.value,b):l(b)};l&&(G=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){L()}),q.appendChild(G),K.push(G));if(p){G=document.createElement("span");
-G.style.marginLeft="10px";G.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");q.appendChild(G);var V=document.createElement("input");V.style.marginRight="10px";V.style.marginLeft="10px";V.style.width="220px";mxEvent.addListener(V,"keypress",function(a){13==a.keyCode&&L(!0)});q.appendChild(V);G=mxUtils.button(mxResources.get("search"),function(){L(!0)});G.className="geBtn";q.appendChild(G)}T(0)}var X=null,ga=null,ca=null,ea=null,U=null,Z=null,P=document.createElement("div");P.style.border=
+F,a.editor.fileExtensions),G.style.marginTop="12px",A.appendChild(G)));var A=!1,J=0,H=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}),E=mxUtils.button(t||mxResources.get("create"),function(){E.setAttribute("disabled","disabled");D();E.removeAttribute("disabled")});E.className="geBtn gePrimaryBtn";if(l||p){var K=[],N=null,Q=null,Y=null,T=function(a){E.setAttribute("disabled","disabled");for(var b=0;b<K.length;b++)K[b].className=
+b==a?"geBtn gePrimaryBtn":"geBtn"},A=!0;t=document.createElement("div");t.style.whiteSpace="nowrap";t.style.height="30px";C.appendChild(t);G=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ba.style.display="";P.style.left="160px";T(0);P.scrollTop=0;P.innerHTML="";J=0;N!=S&&(S=N,R=Q,da=Y,ba.innerHTML="",B(),N=null)});K.push(G);t.appendChild(G);var L=function(a){ba.style.display="none";P.style.left="30px";T(a?-1:1);null==N&&(N=S);P.scrollTop=0;P.innerHTML="";H.spin(P);var b=
+function(a,b,c){J=0;H.stop();S=a;c=c||{};var f=0,d;for(d in c)f+=c[d].length;if(b)P.innerHTML=b;else if(0==a.length&&0==f)P.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(P.innerHTML="",0<f){ba.style.display="";P.style.left="160px";ba.innerHTML="";da=0;R={"draw.io":a};for(d in c)R[d]=c[d];B()}else y()};a?p(V.value,b):l(b)};l&&(G=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){L()}),t.appendChild(G),K.push(G));if(p){G=document.createElement("span");
+G.style.marginLeft="10px";G.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");t.appendChild(G);var V=document.createElement("input");V.style.marginRight="10px";V.style.marginLeft="10px";V.style.width="220px";mxEvent.addListener(V,"keypress",function(a){13==a.keyCode&&L(!0)});t.appendChild(V);G=mxUtils.button(mxResources.get("search"),function(){L(!0)});G.className="geBtn";t.appendChild(G)}T(0)}var X=null,ga=null,ca=null,ea=null,U=null,Z=null,P=document.createElement("div");P.style.border=
"1px solid #d3d3d3";P.style.position="absolute";P.style.left="160px";P.style.right="34px";A=(d?72:40)+(A?30:0);P.style.top=A+"px";P.style.bottom="68px";P.style.margin="6px 0 0 -1px";P.style.padding="6px";P.style.overflow="auto";var ba=document.createElement("div");ba.style.cssText="position:absolute;left:30px;width:128px;top:"+A+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var aa=140,fa=140,R={},O={},da=0,W=!0;R.basic=[{title:"blankDiagram",select:!0}];var S=R.basic;if(!c){var ia=
function(){mxUtils.get(M,function(a){if(!ma){ma=!0;a=a.getXml().documentElement.firstChild;for(var b={};null!=a;){if("undefined"!==typeof a.getAttribute)if("clibs"==a.nodeName){for(var c=a.getAttribute("name"),f=a.getElementsByTagName("add"),d=[],l=0;l<f.length;l++)d.push(encodeURIComponent(mxUtils.getTextContent(f[l])));null!=c&&0<d.length&&(b[c]=d.join(";"))}else c=a.getAttribute("url"),null!=c&&(f=a.getAttribute("section"),null==f&&(f=c.indexOf("/"),f=c.substring(0,f)),c=R[f],null==c&&(c=[],R[f]=
c),f=a.getAttribute("clibs"),null!=b[f]&&(f=b[f]),c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),preview:a.getAttribute("preview"),clibs:f}));a=a.nextSibling}H.stop();B()}})};C.appendChild(ba);C.appendChild(P);var ma=!1,M=f;/^https?:\/\//.test(M)&&!a.editor.isCorsEnabledForUrl(M)&&(M=PROXY_URL+"?url="+encodeURIComponent(M));H.spin(P);null!=x?x(function(a,b){O=a;Y=da=b;ia()},ia):ia();Q=R}mxEvent.addListener(F,"keypress",function(b){a.dialog.container.firstChild==
C&&13==b.keyCode&&D()});f=document.createElement("div");f.style.marginTop=c?"4px":"16px";f.style.textAlign="right";f.style.position="absolute";f.style.left="40px";f.style.bottom="24px";f.style.right="40px";c||a.isOffline()||!d||null!=b||g||(x=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),x.className="geBtn",f.appendChild(x));x=mxUtils.button(mxResources.get("cancel"),function(){null!=e&&e();a.hideDialog(!0)});x.className=
"geBtn";!a.editor.cancelFirst||g&&null==e||f.appendChild(x);c||"1"==urlParams.embed||g||(c=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(F.value)+"&create="+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),
c.className="geBtn",f.appendChild(c));Graph.fileSupport&&v&&(v=mxUtils.button(mxResources.get("import"),function(){if(null==a.newDlgFileInputElt){var b=document.createElement("input");b.setAttribute("multiple","multiple");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(c){a.openFiles(b.files,!0);b.value=""});b.style.display="none";document.body.appendChild(b);a.newDlgFileInputElt=b}a.newDlgFileInputElt.click()}),v.className="geBtn",f.appendChild(v));f.appendChild(E);a.editor.cancelFirst||
-null!=b||g&&null==e||f.appendChild(x);C.appendChild(f);this.container=C},CreateDialog=function(a,c,d,b,g,e,k,n,m,t,f,l,p,u,v,q,x){function y(b,f,d,p){function g(){mxEvent.addListener(e,"click",function(){var b=d;if(k){var f=z.value,l=f.lastIndexOf(".");if(0>c.lastIndexOf(".")&&0>l){var b=null!=b?b:A.value,p="";b==App.MODE_GOOGLE?p=a.drive.extension:b==App.MODE_GITHUB?p=a.gitHub.extension:b==App.MODE_GITLAB?p=a.gitLab.extension:b==App.MODE_TRELLO?p=a.trello.extension:b==App.MODE_DROPBOX?p=a.dropbox.extension:
-b==App.MODE_ONEDRIVE?p=a.oneDrive.extension:b==App.MODE_DEVICE&&(p=".drawio");0<=l&&(f=f.substring(0,l));z.value=f+p}}D(d)})}var e=document.createElement("a");e.style.overflow="hidden";var q=document.createElement("img");q.src=b;q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.width="60px";q.style.height="60px";q.style.paddingBottom="6px";e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.className="geBaseButton";e.style.position="relative";e.style.margin="4px";e.style.padding=
-"8px 8px 10px 8px";e.style.whiteSpace="nowrap";e.appendChild(q);mxClient.IS_QUIRKS&&(e.style.cssFloat="left",e.style.zoom="1");e.style.color="gray";e.style.fontSize="11px";var u=document.createElement("div");e.appendChild(u);mxUtils.write(u,f);if(null!=p&&null==a[p]){q.style.visibility="hidden";mxUtils.setOpacity(u,10);var v=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(e);var n=window.setTimeout(function(){null==
-a[p]&&(v.stop(),e.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[p]&&(window.clearTimeout(n),mxUtils.setOpacity(u,100),q.style.visibility="",v.stop(),g())}))}else g();B.appendChild(e);++C==l&&(mxUtils.br(B),C=0)}function D(b){var f=z.value;if(null==b||null!=f&&0<f.length)x&&a.hideDialog(),d(f,b,z)}k=null!=k?k:!0;n=null!=n?n:!0;l=null!=l?l:4;x=null!=x?x:!0;e=document.createElement("div");e.style.whiteSpace="nowrap";null==b&&a.addLanguageMenu(e);var I=
+null!=b||g&&null==e||f.appendChild(x);C.appendChild(f);this.container=C},CreateDialog=function(a,c,d,b,g,e,k,n,m,q,f,l,p,u,v,t,x){function y(b,f,d,p){function g(){mxEvent.addListener(e,"click",function(){var b=d;if(k){var f=z.value,l=f.lastIndexOf(".");if(0>c.lastIndexOf(".")&&0>l){var b=null!=b?b:A.value,p="";b==App.MODE_GOOGLE?p=a.drive.extension:b==App.MODE_GITHUB?p=a.gitHub.extension:b==App.MODE_GITLAB?p=a.gitLab.extension:b==App.MODE_TRELLO?p=a.trello.extension:b==App.MODE_DROPBOX?p=a.dropbox.extension:
+b==App.MODE_ONEDRIVE?p=a.oneDrive.extension:b==App.MODE_DEVICE&&(p=".drawio");0<=l&&(f=f.substring(0,l));z.value=f+p}}D(d)})}var e=document.createElement("a");e.style.overflow="hidden";var t=document.createElement("img");t.src=b;t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.width="60px";t.style.height="60px";t.style.paddingBottom="6px";e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.className="geBaseButton";e.style.position="relative";e.style.margin="4px";e.style.padding=
+"8px 8px 10px 8px";e.style.whiteSpace="nowrap";e.appendChild(t);mxClient.IS_QUIRKS&&(e.style.cssFloat="left",e.style.zoom="1");e.style.color="gray";e.style.fontSize="11px";var u=document.createElement("div");e.appendChild(u);mxUtils.write(u,f);if(null!=p&&null==a[p]){t.style.visibility="hidden";mxUtils.setOpacity(u,10);var v=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(e);var n=window.setTimeout(function(){null==
+a[p]&&(v.stop(),e.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[p]&&(window.clearTimeout(n),mxUtils.setOpacity(u,100),t.style.visibility="",v.stop(),g())}))}else g();B.appendChild(e);++C==l&&(mxUtils.br(B),C=0)}function D(b){var c=z.value;if(null==b||null!=c&&0<c.length)x&&a.hideDialog(),d(c,b,z)}k=null!=k?k:!0;n=null!=n?n:!0;l=null!=l?l:4;x=null!=x?x:!0;e=document.createElement("div");e.style.whiteSpace="nowrap";null==b&&a.addLanguageMenu(e);var I=
document.createElement("h2");mxUtils.write(I,g||mxResources.get("create"));I.style.marginTop="0px";I.style.marginBottom="24px";e.appendChild(I);mxUtils.write(e,mxResources.get("filename")+":");var z=document.createElement("input");z.setAttribute("value",c);z.style.width="280px";z.style.marginLeft="10px";z.style.marginBottom="20px";z.style.maxWidth="70%";this.init=function(){z.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?z.select():document.execCommand("selectAll",
-!1,null)};e.appendChild(z);null!=q&&e.appendChild(FilenameDialog.createTypeHint(a,z,q));null!=p&&null!=u&&"image/"==u.substring(0,6)&&(z.style.width="160px",g=null,"image/svg+xml"==u&&mxClient.IS_SVG?(g=document.createElement("div"),g.innerHTML=mxUtils.trim(p),p=g.getElementsByTagName("svg")[0],u=parseInt(p.getAttribute("width")),v=parseInt(p.getAttribute("height")),p.setAttribute("viewBox","0 0 "+u+" "+v),p.setAttribute("width","120px"),p.setAttribute("height","80px")):(g=document.createElement("img"),
+!1,null)};e.appendChild(z);null!=t&&e.appendChild(FilenameDialog.createTypeHint(a,z,t));null!=p&&null!=u&&"image/"==u.substring(0,6)&&(z.style.width="160px",g=null,"image/svg+xml"==u&&mxClient.IS_SVG?(g=document.createElement("div"),g.innerHTML=mxUtils.trim(p),p=g.getElementsByTagName("svg")[0],u=parseInt(p.getAttribute("width")),v=parseInt(p.getAttribute("height")),p.setAttribute("viewBox","0 0 "+u+" "+v),p.setAttribute("width","120px"),p.setAttribute("height","80px")):(g=document.createElement("img"),
g.setAttribute("src","data:"+u+(v?";base64,":";utf8,")+p)),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%)"),e.appendChild(g),m&&Editor.popupsAllowed&&(g.style.cursor="pointer",mxEvent.addListener(g,"click",function(){D("_blank")})));mxUtils.br(e);var B=document.createElement("div");B.style.textAlign="center";var C=0;B.style.marginTop="6px";e.appendChild(B);var A=
document.createElement("select");A.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(p,mxResources.get("googleDrive")),A.appendChild(p),y(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(p,
mxResources.get("oneDrive")),A.appendChild(p),a.mode==App.MODE_ONEDRIVE&&p.setAttribute("selected","selected"),y(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(p,mxResources.get("dropbox")),A.appendChild(p),a.mode==App.MODE_DROPBOX&&p.setAttribute("selected","selected"),y(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),
App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GITHUB),mxUtils.write(p,mxResources.get("github")),A.appendChild(p),y(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.gitLab&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GITLAB),mxUtils.write(p,mxResources.get("gitlab")),A.appendChild(p),y(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),
"function"===typeof window.TrelloClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_TRELLO),mxUtils.write(p,mxResources.get("trello")),A.appendChild(p),y(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));Editor.useLocalStorage&&"device"!=urlParams.storage&&null==a.getCurrentFile()||(p=document.createElement("option"),p.setAttribute("value",App.MODE_DEVICE),mxUtils.write(p,mxResources.get("device")),A.appendChild(p),a.mode!=App.MODE_DEVICE&&
n||p.setAttribute("selected","selected"),f&&y(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE));n&&isLocalStorage&&"0"!=urlParams.browser&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_BROWSER),mxUtils.write(n,mxResources.get("browser")),A.appendChild(n),a.mode==App.MODE_BROWSER&&n.setAttribute("selected","selected"),y(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));n=document.createElement("div");n.style.marginTop=
-"26px";n.style.textAlign="center";null!=t&&(f=mxUtils.button(mxResources.get("help"),function(){a.openLink(t)}),f.className="geBtn",n.appendChild(f));f=mxUtils.button(mxResources.get("cancel"),function(){null!=b?b():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});f.className="geBtn";a.editor.cancelFirst&&n.appendChild(f);null==b&&(p=mxUtils.button(mxResources.get("decideLater"),function(){D(null)}),p.className="geBtn",n.appendChild(p));m&&Editor.popupsAllowed&&
+"26px";n.style.textAlign="center";null!=q&&(f=mxUtils.button(mxResources.get("help"),function(){a.openLink(q)}),f.className="geBtn",n.appendChild(f));f=mxUtils.button(mxResources.get("cancel"),function(){null!=b?b():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});f.className="geBtn";a.editor.cancelFirst&&n.appendChild(f);null==b&&(p=mxUtils.button(mxResources.get("decideLater"),function(){D(null)}),p.className="geBtn",n.appendChild(p));m&&Editor.popupsAllowed&&
(m=mxUtils.button(mxResources.get("openInNewWindow"),function(){D("_blank")}),m.className="geBtn",n.appendChild(m));CreateDialog.showDownloadButton&&(m=mxUtils.button(mxResources.get("download"),function(){D("download")}),m.className="geBtn",n.appendChild(m));a.editor.cancelFirst||n.appendChild(f);mxEvent.addListener(z,"keypress",function(b){13==b.keyCode?D(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});e.appendChild(n);this.container=e};
CreateDialog.showDownloadButton=!0;
var PopupDialog=function(a,c,d,b,g){g=null!=g?g:!0;var e=document.createElement("div");e.style.textAlign="left";mxUtils.write(e,mxResources.get("fileOpenLocation"));mxUtils.br(e);mxUtils.br(e);var k=mxUtils.button(mxResources.get("openInThisWindow"),function(){g&&a.hideDialog();null!=b&&b()});k.className="geBtn";k.style.marginBottom="8px";k.style.width="280px";e.appendChild(k);mxUtils.br(e);var n=mxUtils.button(mxResources.get("openInNewWindow"),function(){g&&a.hideDialog();null!=d&&d();a.openLink(c,
null,!0)});n.className="geBtn gePrimaryBtn";n.style.width=k.style.width;e.appendChild(n);mxUtils.br(e);mxUtils.br(e);mxUtils.write(e,mxResources.get("allowPopups"));this.container=e},ImageDialog=function(a,c,d,b,g,e){e=null!=e?e:!0;var k=a.editor.graph,n=document.createElement("div");mxUtils.write(n,c);c=document.createElement("div");c.className="geTitle";c.style.backgroundColor="transparent";c.style.borderColor="transparent";c.style.whiteSpace="nowrap";c.style.textOverflow="clip";c.style.cursor=
"default";mxClient.IS_VML||(c.style.paddingRight="20px");var m=document.createElement("input");m.setAttribute("value",d);m.setAttribute("type","text");m.setAttribute("spellcheck","false");m.setAttribute("autocorrect","off");m.setAttribute("autocomplete","off");m.setAttribute("autocapitalize","off");m.style.marginTop="6px";m.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";m.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";m.style.backgroundRepeat="no-repeat";
m.style.backgroundPosition="100% 50%";m.style.paddingRight="14px";d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.position="relative";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";d.style.display=mxClient.IS_VML?"inline":"inline-block";d.style.top=(mxClient.IS_VML?0:3)+"px";d.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(d,"click",function(){m.value="";m.focus()});c.appendChild(m);c.appendChild(d);
-n.appendChild(c);var t=function(f,c,d,l){var p="data:"==f.substring(0,5);!a.isOffline()||p&&"undefined"===typeof chrome?0<f.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(f,function(p){a.spinner.stop();a.hideDialog();var g=!1===l?1:null!=c&&null!=d?Math.max(c/p.width,d/p.height):Math.min(1,Math.min(520/p.width,520/p.height));e&&(f=a.convertDataUri(f));b(f,Math.round(Number(p.width)*g),Math.round(Number(p.height)*g))},function(){a.spinner.stop();b(null);a.showError(mxResources.get("error"),
-mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),b(f)):(f=a.convertDataUri(f),c=null==c?120:c,d=null==d?100:d,a.hideDialog(),b(f,c,d))},f=function(f,c){if(null!=f){var d=g?null:k.getModel().getGeometry(k.getSelectionCell());null!=d?t(f,d.width,d.height,c):t(f,null,null,c)}else a.hideDialog(),b(null)};this.init=function(){m.focus();if(Graph.fileSupport){m.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=n.parentNode,c=null;mxEvent.addListener(b,"dragleave",
-function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(f){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,function(a,b,c,d,l,p,e,g){f(a,
-g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(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)&&f(decodeURIComponent(d))}b.stopPropagation();b.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";d.style.textAlign="center";c=mxUtils.button(mxResources.get("cancel"),
+n.appendChild(c);var q=function(c,f,d,l){var p="data:"==c.substring(0,5);!a.isOffline()||p&&"undefined"===typeof chrome?0<c.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(c,function(p){a.spinner.stop();a.hideDialog();var g=!1===l?1:null!=f&&null!=d?Math.max(f/p.width,d/p.height):Math.min(1,Math.min(520/p.width,520/p.height));e&&(c=a.convertDataUri(c));b(c,Math.round(Number(p.width)*g),Math.round(Number(p.height)*g))},function(){a.spinner.stop();b(null);a.showError(mxResources.get("error"),
+mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),b(c)):(c=a.convertDataUri(c),f=null==f?120:f,d=null==d?100:d,a.hideDialog(),b(c,f,d))},f=function(c,f){if(null!=c){var d=g?null:k.getModel().getGeometry(k.getSelectionCell());null!=d?q(c,d.width,d.height,f):q(c,null,null,f)}else a.hideDialog(),b(null)};this.init=function(){m.focus();if(Graph.fileSupport){m.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=n.parentNode,c=null;mxEvent.addListener(b,"dragleave",
+function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(f){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,function(a,b,c,d,l,p,g,e){f(a,
+e)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(d)&&f(decodeURIComponent(d))}b.stopPropagation();b.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";d.style.textAlign="center";c=mxUtils.button(mxResources.get("cancel"),
function(){a.spinner.stop();a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&d.appendChild(c);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(m.value=a.url));m.focus()};if(Graph.fileSupport){if(null==a.imgDlgFileInputElt){var l=document.createElement("input");l.setAttribute("multiple","multiple");l.setAttribute("type","file");mxEvent.addListener(l,"change",function(b){null!=
l.files&&(a.importFiles(l.files,0,0,a.maxImageSize,function(a,b,c,d,l,p){f(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0),l.type="",l.type="file",l.value="")});l.style.display="none";document.body.appendChild(l);a.imgDlgFileInputElt=l}var p=mxUtils.button(mxResources.get("open"),function(){a.imgDlgFileInputElt.click()});p.className="geBtn";d.appendChild(p)}document.createElement("canvas").getContext&&"data:image/"==m.value.substring(0,
11)&&"data:image/svg"!=m.value.substring(0,14)&&(p=mxUtils.button(mxResources.get("crop"),function(){var b=new CropImageDialog(a,m.value,function(a){m.value=a});a.showDialog(b.container,200,200,!0,!0);b.init()}),p.className="geBtn",d.appendChild(p));"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(p=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);
a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}),p.className="geBtn",d.appendChild(p),null!=a.drive&&"1"==urlParams.photos&&(p=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(a.drive.token).addView(google.picker.ViewId.PHOTO_UPLOAD);
a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),p.className="geBtn",d.appendChild(p)));mxEvent.addListener(m,"keypress",function(a){13==a.keyCode&&f(m.value)});p=mxUtils.button(mxResources.get("apply"),function(){f(m.value)});p.className="geBtn gePrimaryBtn";d.appendChild(p);a.editor.cancelFirst||d.appendChild(c);Graph.fileSupport&&(d.style.marginTop="120px",n.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",n.style.backgroundPosition=
-"center 65%",n.style.backgroundRepeat="no-repeat",c=document.createElement("div"),c.style.position="absolute",c.style.width="420px",c.style.top="58%",c.style.textAlign="center",c.style.fontSize="18px",c.style.color="#a0c3ff",mxUtils.write(c,mxResources.get("dragImagesHere")),n.appendChild(c));n.appendChild(d);this.container=n},LinkDialog=function(a,c,d,b,g){function e(a,b,f){f=mxUtils.button("",f);f.className="geBtn";f.setAttribute("title",b);b=document.createElement("img");b.style.height="26px";
-b.style.width="26px";b.setAttribute("src",a);f.style.minWidth="42px";f.style.verticalAlign="middle";f.appendChild(b);x.appendChild(f)}var k=document.createElement("div");mxUtils.write(k,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";mxClient.IS_VML||(n.style.paddingRight="20px");var m=document.createElement("input");
-m.setAttribute("placeholder",mxResources.get("dragUrlsHere"));m.setAttribute("type","text");m.style.marginTop="6px";m.style.width="100%";m.style.boxSizing="border-box";m.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";m.style.backgroundRepeat="no-repeat";m.style.backgroundPosition="100% 50%";m.style.paddingRight="14px";var t=document.createElement("div");t.setAttribute("title",mxResources.get("reset"));t.style.position="relative";t.style.left="-16px";t.style.width="12px";t.style.height=
-"14px";t.style.cursor="pointer";t.style.display=mxClient.IS_VML?"inline":"inline-block";t.style.top=(mxClient.IS_VML?0:3)+"px";t.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(t,"click",function(){m.value="";m.focus()});var f=document.createElement("input");f.style.cssText="margin-right:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","current-linkdialog");var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";
-l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","current-linkdialog");var p=document.createElement("select");p.style.width="100%";if(g&&null!=a.pages){null!=c&&"data:page/id,"==c.substring(0,13)?(l.setAttribute("checked","checked"),l.defaultChecked=!0):(m.setAttribute("value",c),f.setAttribute("checked","checked"),f.defaultChecked=!0);n.appendChild(f);n.appendChild(m);n.appendChild(t);mxUtils.br(n);n.appendChild(l);g=!1;for(t=0;t<a.pages.length;t++){var u=document.createElement("option");
-mxUtils.write(u,a.pages[t].getName()||mxResources.get("pageWithNumber",[t+1]));u.setAttribute("value","data:page/id,"+a.pages[t].getId());c==u.getAttribute("value")&&(u.setAttribute("selected","selected"),g=!0);p.appendChild(u)}if(!g&&l.checked){var v=document.createElement("option");mxUtils.write(v,mxResources.get("pageNotFound"));v.setAttribute("disabled","disabled");v.setAttribute("selected","selected");v.setAttribute("value","pageNotFound");p.appendChild(v);mxEvent.addListener(p,"change",function(){null==
-v.parentNode||v.selected||v.parentNode.removeChild(v)})}n.appendChild(p)}else m.setAttribute("value",c),n.appendChild(m),n.appendChild(t);k.appendChild(n);var q=mxUtils.button(d,function(){a.hideDialog();b(l.checked?"pageNotFound"!==p.value?p.value:c:m.value,LinkDialog.selectedDocs)});q.style.verticalAlign="middle";q.className="geBtn gePrimaryBtn";this.init=function(){l.checked?p.focus():(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",
+"center 65%",n.style.backgroundRepeat="no-repeat",c=document.createElement("div"),c.style.position="absolute",c.style.width="420px",c.style.top="58%",c.style.textAlign="center",c.style.fontSize="18px",c.style.color="#a0c3ff",mxUtils.write(c,mxResources.get("dragImagesHere")),n.appendChild(c));n.appendChild(d);this.container=n},LinkDialog=function(a,c,d,b,g){function e(a,b,c){c=mxUtils.button("",c);c.className="geBtn";c.setAttribute("title",b);b=document.createElement("img");b.style.height="26px";
+b.style.width="26px";b.setAttribute("src",a);c.style.minWidth="42px";c.style.verticalAlign="middle";c.appendChild(b);x.appendChild(c)}var k=document.createElement("div");mxUtils.write(k,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";mxClient.IS_VML||(n.style.paddingRight="20px");var m=document.createElement("input");
+m.setAttribute("placeholder",mxResources.get("dragUrlsHere"));m.setAttribute("type","text");m.style.marginTop="6px";m.style.width="100%";m.style.boxSizing="border-box";m.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";m.style.backgroundRepeat="no-repeat";m.style.backgroundPosition="100% 50%";m.style.paddingRight="14px";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=mxClient.IS_VML?"inline":"inline-block";q.style.top=(mxClient.IS_VML?0:3)+"px";q.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(q,"click",function(){m.value="";m.focus()});var f=document.createElement("input");f.style.cssText="margin-right:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","current-linkdialog");var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";
+l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","current-linkdialog");var p=document.createElement("select");p.style.width="100%";if(g&&null!=a.pages){null!=c&&"data:page/id,"==c.substring(0,13)?(l.setAttribute("checked","checked"),l.defaultChecked=!0):(m.setAttribute("value",c),f.setAttribute("checked","checked"),f.defaultChecked=!0);n.appendChild(f);n.appendChild(m);n.appendChild(q);mxUtils.br(n);n.appendChild(l);g=!1;for(q=0;q<a.pages.length;q++){var u=document.createElement("option");
+mxUtils.write(u,a.pages[q].getName()||mxResources.get("pageWithNumber",[q+1]));u.setAttribute("value","data:page/id,"+a.pages[q].getId());c==u.getAttribute("value")&&(u.setAttribute("selected","selected"),g=!0);p.appendChild(u)}if(!g&&l.checked){var v=document.createElement("option");mxUtils.write(v,mxResources.get("pageNotFound"));v.setAttribute("disabled","disabled");v.setAttribute("selected","selected");v.setAttribute("value","pageNotFound");p.appendChild(v);mxEvent.addListener(p,"change",function(){null==
+v.parentNode||v.selected||v.parentNode.removeChild(v)})}n.appendChild(p)}else m.setAttribute("value",c),n.appendChild(m),n.appendChild(q);k.appendChild(n);var t=mxUtils.button(d,function(){a.hideDialog();b(l.checked?"pageNotFound"!==p.value?p.value:c:m.value,LinkDialog.selectedDocs)});t.style.verticalAlign="middle";t.className="geBtn gePrimaryBtn";this.init=function(){l.checked?p.focus():(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",
!1,null));mxEvent.addListener(p,"focus",function(){f.removeAttribute("checked");l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(m,"focus",function(){l.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});if(Graph.fileSupport){var b=k.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(f){null==
-c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(m.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),f.setAttribute("checked","checked"),f.checked=!0,q.click());a.stopPropagation();a.preventDefault()}),!1)}};var x=document.createElement("div");x.style.marginTop=
+c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(m.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),f.setAttribute("checked","checked"),f.checked=!0,t.click());a.stopPropagation();a.preventDefault()}),!1)}};var x=document.createElement("div");x.style.marginTop=
"20px";x.style.textAlign="center";d=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/solution/articles/16000080137")});d.style.verticalAlign="middle";d.className="geBtn";x.appendChild(d);a.isOffline()&&!mxClient.IS_CHROMEAPP&&(d.style.display="none");d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.style.verticalAlign="middle";d.className="geBtn";a.editor.cancelFirst&&x.appendChild(d);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==
google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var b=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||null!=a.docs[0].mimeType&&"application/vnd.jgraph."==a.docs[0].mimeType.substring(0,23)?b="https://www.draw.io/#G"+a.docs[0].id:"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(b="https://drive.google.com/#folders/"+a.docs[0].id);m.value=b;m.focus()}else LinkDialog.selectedDocs=null;m.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&
-e(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.linkPicker){var b=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),f=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),c=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0),
-b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(a.drive.token).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(b).addView(f).addView(c).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);"1"==urlParams.photos&&b.addView(google.picker.ViewId.PHOTO_UPLOAD);a.linkPicker=b.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0)}))});
+e(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.linkPicker){var b=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),f=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0),
+b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(a.drive.token).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(b).addView(c).addView(f).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);"1"==urlParams.photos&&b.addView(google.picker.ViewId.PHOTO_UPLOAD);a.linkPicker=b.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0)}))});
"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&e(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){m.value=a[0].link;m.focus()}})});null!=a.oneDrive&&e(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,b){m.value=b.value[0].webUrl;m.focus()})});null!=a.gitHub&&e(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=
-a){a=a.split("/");var b=a[0],f=a[1],c=a[2];a=a.slice(3,a.length).join("/");m.value="https://github.com/"+b+"/"+f+"/blob/"+c+"/"+a;m.focus()}})});null!=a.gitLab&&e(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){a.gitLab.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],f=a[1],c=a[2];a=a.slice(3,a.length).join("/");m.value=DRAWIO_GITLAB_URL+"/"+b+"/"+f+"/blob/"+c+"/"+a;m.focus()}})});mxEvent.addListener(m,"keypress",function(f){13==f.keyCode&&(a.hideDialog(),b(l.checked?
-p.value:m.value,LinkDialog.selectedDocs))});x.appendChild(q);a.editor.cancelFirst||x.appendChild(d);k.appendChild(x);this.container=k},AboutDialog=function(a){var c=document.createElement("div");c.style.marginTop="6px";c.setAttribute("align","center");var d=document.createElement("img");d.style.border="0px";mxClient.IS_SVG?(d.setAttribute("width","164"),d.setAttribute("height","221"),d.style.width="164px",d.style.height="221px",d.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):(d.setAttribute("width",
+a){a=a.split("/");var b=a[0],c=a[1],f=a[2];a=a.slice(3,a.length).join("/");m.value="https://github.com/"+b+"/"+c+"/blob/"+f+"/"+a;m.focus()}})});null!=a.gitLab&&e(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){a.gitLab.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],c=a[1],f=a[2];a=a.slice(3,a.length).join("/");m.value=DRAWIO_GITLAB_URL+"/"+b+"/"+c+"/blob/"+f+"/"+a;m.focus()}})});mxEvent.addListener(m,"keypress",function(c){13==c.keyCode&&(a.hideDialog(),b(l.checked?
+p.value:m.value,LinkDialog.selectedDocs))});x.appendChild(t);a.editor.cancelFirst||x.appendChild(d);k.appendChild(x);this.container=k},AboutDialog=function(a){var c=document.createElement("div");c.style.marginTop="6px";c.setAttribute("align","center");var d=document.createElement("img");d.style.border="0px";mxClient.IS_SVG?(d.setAttribute("width","164"),d.setAttribute("height","221"),d.style.width="164px",d.style.height="221px",d.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):(d.setAttribute("width",
"176"),d.setAttribute("height","219"),d.style.width="170px",d.style.height="219px",d.setAttribute("src",IMAGE_PATH+"/logo-flat.png"));"dark"==uiTheme&&(d.style.filter="grayscale(100%) invert(100%)");c.appendChild(d);mxUtils.br(c);var d="dark"==uiTheme?"#cccccc":"#505050",b=document.createElement("small");b.innerHTML="v "+EditorUi.VERSION;b.style.color=d;c.appendChild(b);mxUtils.br(c);mxUtils.br(c);b=document.createElement("small");b.style.color=d;b.innerHTML='&copy; 2005-2019 <a href="https://about.draw.io/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';
c.appendChild(b);mxEvent.addListener(c,"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container=c},FeedbackDialog=function(a){var c=document.createElement("div"),d=document.createElement("div");mxUtils.write(d,mxResources.get("sendYourFeedbackToDrawIo"));d.style.fontSize="18px";d.style.marginBottom="18px";c.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");c.appendChild(d);var b=document.createElement("input");
b.setAttribute("type","text");b.style.marginTop="6px";b.style.width="600px";var g=mxUtils.button(mxResources.get("sendMessage"),function(){var c=m.value+(k.checked?"\nDiagram:\n"+mxUtils.getXml(a.getXmlFileData()):"")+"\nBrowser:\n"+navigator.userAgent;c.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(b.value)+
@@ -8005,38 +8014,38 @@ mxEvent.addListener(b,"change",function(){0<b.value.length&&0<e.test(b.value)?g.
"14px";d.appendChild(k);var n=document.createElement("span");mxUtils.write(n," "+mxResources.get("includeCopyOfMyDiagram"));d.appendChild(n);mxEvent.addListener(n,"click",function(a){k.checked=!k.checked;mxEvent.consume(a)});c.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("feedback"));c.appendChild(d);var m=document.createElement("textarea");m.style.resize="none";m.style.width="600px";m.style.height="140px";m.style.marginTop="6px";m.setAttribute("placeholder",mxResources.get("comments"));
c.appendChild(m);d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst?(d.appendChild(n),d.appendChild(g)):(d.appendChild(g),d.appendChild(n));c.appendChild(d);this.container=c};FeedbackDialog.maxAttachmentSize=1E6;
var RevisionDialog=function(a,c,d){var b=document.createElement("div"),g=document.createElement("h3");g.style.marginTop="0px";mxUtils.write(g,mxResources.get("revisionHistory"));b.appendChild(g);var e=document.createElement("div");e.style.position="absolute";e.style.overflow="auto";e.style.width="170px";e.style.height="378px";b.appendChild(e);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";mxEvent.disableContextMenu(k);b.appendChild(k);var n=new Graph(k);n.setTooltips(!1);n.setEnabled(!1);n.setPanning(!0);n.panningHandler.ignoreCell=!0;n.panningHandler.useLeftButtonForPanning=!0;n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;var m=0,t=null,f=0,l=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=t&&null!=t[f]?t[f].getAttribute("name"):"pagenumber"==a?f+1:"pagecount"==a?null!=t?t.length:1:l.apply(this,arguments)};n.getLinkForCell=
-function(){return null};Editor.MathJaxRender&&n.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,f){a.editor.graph.mathEnabled&&Editor.MathJaxRender(n.container)}));var p=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),u=a.getCurrentFile(),v=null,q=null,x=null,y=null,D=mxUtils.button("",function(){null!=x&&n.zoomIn()});D.className="geSprite geSprite-zoomin";
+"376px";k.style.overflow="hidden";mxEvent.disableContextMenu(k);b.appendChild(k);var n=new Graph(k);n.setTooltips(!1);n.setEnabled(!1);n.setPanning(!0);n.panningHandler.ignoreCell=!0;n.panningHandler.useLeftButtonForPanning=!0;n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;var m=0,q=null,f=0,l=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=q&&null!=q[f]?q[f].getAttribute("name"):"pagenumber"==a?f+1:"pagecount"==a?null!=q?q.length:1:l.apply(this,arguments)};n.getLinkForCell=
+function(){return null};Editor.MathJaxRender&&n.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(n.container)}));var p=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),u=a.getCurrentFile(),v=null,t=null,x=null,y=null,D=mxUtils.button("",function(){null!=x&&n.zoomIn()});D.className="geSprite geSprite-zoomin";
D.setAttribute("title",mxResources.get("zoomIn"));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(){null!=x&&n.zoomOut()});I.className="geSprite geSprite-zoomout";I.setAttribute("title",mxResources.get("zoomOut"));I.style.outline="none";I.style.border="none";I.style.margin="2px";I.setAttribute("disabled","disabled");mxUtils.setOpacity(I,20);var z=mxUtils.button("",function(){null!=x&&
(n.maxFitScale=8,n.fit(8),n.center())});z.className="geSprite geSprite-fit";z.setAttribute("title",mxResources.get("fit"));z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,20);var B=mxUtils.button("",function(){null!=x&&(n.zoomActual(),n.center())});B.className="geSprite geSprite-actualsize";B.setAttribute("title",mxResources.get("actualSize"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled",
-"disabled");mxUtils.setOpacity(B,20);var C=document.createElement("div");C.style.position="absolute";C.style.textAlign="right";C.style.color="gray";C.style.marginTop="10px";C.style.backgroundColor="transparent";C.style.top="440px";C.style.right="32px";C.style.maxWidth="380px";C.style.cursor="default";var A=mxUtils.button(mxResources.get("download"),function(){if(null!=x){var b=mxUtils.getXml(x.documentElement),f=a.getBaseFilename()+".drawio";a.isLocalFileSave()?a.saveLocalFile(b,f,"text/xml"):(b=
-"undefined"===typeof pako?"&xml="+encodeURIComponent(b):"&data="+encodeURIComponent(Graph.compress(b)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(f)+"&format=xml"+b)).simulate(document,"_blank"))}});A.className="geBtn";A.setAttribute("disabled","disabled");var G=mxUtils.button(mxResources.get("restore"),function(){null!=x&&null!=y&&a.confirm(mxResources.get("areYouSure"),function(){null!=d?d(y):a.spinner.spin(document.body,mxResources.get("restoring"))&&u.save(!0,function(b){a.spinner.stop();
+"disabled");mxUtils.setOpacity(B,20);var C=document.createElement("div");C.style.position="absolute";C.style.textAlign="right";C.style.color="gray";C.style.marginTop="10px";C.style.backgroundColor="transparent";C.style.top="440px";C.style.right="32px";C.style.maxWidth="380px";C.style.cursor="default";var A=mxUtils.button(mxResources.get("download"),function(){if(null!=x){var b=mxUtils.getXml(x.documentElement),c=a.getBaseFilename()+".drawio";a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml"):(b=
+"undefined"===typeof pako?"&xml="+encodeURIComponent(b):"&data="+encodeURIComponent(Graph.compress(b)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml"+b)).simulate(document,"_blank"))}});A.className="geBtn";A.setAttribute("disabled","disabled");var G=mxUtils.button(mxResources.get("restore"),function(){null!=x&&null!=y&&a.confirm(mxResources.get("areYouSure"),function(){null!=d?d(y):a.spinner.spin(document.body,mxResources.get("restoring"))&&u.save(!0,function(b){a.spinner.stop();
a.replaceFileData(y);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});G.className="geBtn";G.setAttribute("disabled","disabled");var F=document.createElement("select");F.setAttribute("disabled","disabled");F.style.maxWidth="80px";F.style.position="relative";F.style.top="-2px";F.style.verticalAlign="bottom";F.style.marginRight="6px";F.style.display="none";var J=null;mxEvent.addListener(F,"change",function(a){null!=
-J&&(J(a),mxEvent.consume(a))});var H=mxUtils.button(mxResources.get("edit"),function(){null!=x&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(x.documentElement)),a.openLink(a.getUrl(),null,!0))});H.className="geBtn";H.setAttribute("disabled","disabled");null!=d&&(H.style.display="none");var E=mxUtils.button(mxResources.get("show"),function(){null!=q&&a.openLink(q.getUrl(F.selectedIndex))});E.className="geBtn gePrimaryBtn";E.setAttribute("disabled",
+J&&(J(a),mxEvent.consume(a))});var H=mxUtils.button(mxResources.get("edit"),function(){null!=x&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(x.documentElement)),a.openLink(a.getUrl(),null,!0))});H.className="geBtn";H.setAttribute("disabled","disabled");null!=d&&(H.style.display="none");var E=mxUtils.button(mxResources.get("show"),function(){null!=t&&a.openLink(t.getUrl(F.selectedIndex))});E.className="geBtn gePrimaryBtn";E.setAttribute("disabled",
"disabled");null!=d&&(E.style.display="none",G.className="geBtn gePrimaryBtn");g=document.createElement("div");g.style.position="absolute";g.style.top="482px";g.style.width="640px";g.style.textAlign="right";var K=document.createElement("div");K.className="geToolbarContainer";K.style.backgroundColor="transparent";K.style.padding="2px";K.style.border="none";K.style.left="199px";K.style.top="442px";var N=null;if(null!=c&&0<c.length){k.style.cursor="move";var Q=document.createElement("table");Q.style.border=
-"1px solid lightGray";Q.style.borderCollapse="collapse";Q.style.borderSpacing="0px";Q.style.width="100%";var Y=document.createElement("tbody"),T=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(m=mxUtils.indexOf(a.pages,a.currentPage));for(var L=c.length-1;0<=L;L--){var V=function(b){var d=new Date(b.modifiedDate),l=null;if(0<=d.getTime()){var e=function(c){p.stop();var e=mxUtils.parseXml(c),g=a.editor.extractGraphModel(e.documentElement,!0);if(null!=g){var q=function(a){null!=a&&(a=
-v(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(a))).documentElement));return a},v=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";k.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,n.getModel());n.maxFitScale=1;n.fit(8);n.center();return a};F.style.display="none";F.innerHTML="";x=e;y=c;t=parseSelectFunction=null;f=0;if("mxfile"==g.nodeName){e=g.getElementsByTagName("diagram");t=[];for(c=0;c<e.length;c++)t.push(e[c]);f=Math.min(m,
-t.length-1);0<t.length&&q(t[f]);if(1<t.length)for(F.removeAttribute("disabled"),F.style.display="",c=0;c<t.length;c++)e=document.createElement("option"),mxUtils.write(e,t[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),e.setAttribute("value",c),c==f&&e.setAttribute("selected","selected"),F.appendChild(e);J=function(){try{var b=parseInt(F.value);f=m=b;q(t[b])}catch(O){F.value=m,a.handleError(O)}}}else v(g);c=b.lastModifyingUserName;null!=c&&20<c.length&&(c=c.substring(0,20)+"...");
+"1px solid lightGray";Q.style.borderCollapse="collapse";Q.style.borderSpacing="0px";Q.style.width="100%";var Y=document.createElement("tbody"),T=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(m=mxUtils.indexOf(a.pages,a.currentPage));for(var L=c.length-1;0<=L;L--){var V=function(b){var d=new Date(b.modifiedDate),l=null;if(0<=d.getTime()){var g=function(c){p.stop();var e=mxUtils.parseXml(c),g=a.editor.extractGraphModel(e.documentElement,!0);if(null!=g){var t=function(a){null!=a&&(a=
+v(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(a))).documentElement));return a},v=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";k.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,n.getModel());n.maxFitScale=1;n.fit(8);n.center();return a};F.style.display="none";F.innerHTML="";x=e;y=c;q=parseSelectFunction=null;f=0;if("mxfile"==g.nodeName){e=g.getElementsByTagName("diagram");q=[];for(c=0;c<e.length;c++)q.push(e[c]);f=Math.min(m,
+q.length-1);0<q.length&&t(q[f]);if(1<q.length)for(F.removeAttribute("disabled"),F.style.display="",c=0;c<q.length;c++)e=document.createElement("option"),mxUtils.write(e,q[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),e.setAttribute("value",c),c==f&&e.setAttribute("selected","selected"),F.appendChild(e);J=function(){try{var b=parseInt(F.value);f=m=b;t(q[b])}catch(O){F.value=m,a.handleError(O)}}}else v(g);c=b.lastModifyingUserName;null!=c&&20<c.length&&(c=c.substring(0,20)+"...");
C.innerHTML="";mxUtils.write(C,(null!=c?c+" ":"")+d.toLocaleDateString()+" "+d.toLocaleTimeString());C.setAttribute("title",l.getAttribute("title"));D.removeAttribute("disabled");I.removeAttribute("disabled");z.removeAttribute("disabled");B.removeAttribute("disabled");null!=u&&u.isRestricted()||(a.editor.graph.isEnabled()&&G.removeAttribute("disabled"),A.removeAttribute("disabled"),E.removeAttribute("disabled"),H.removeAttribute("disabled"));mxUtils.setOpacity(D,60);mxUtils.setOpacity(I,60);mxUtils.setOpacity(z,
-60);mxUtils.setOpacity(B,60)}else F.style.display="none",F.innerHTML="",C.innerHTML="",mxUtils.write(C,mxResources.get("errorLoadingFile"))},l=document.createElement("tr");l.style.borderBottom="1px solid lightGray";l.style.fontSize="12px";l.style.cursor="pointer";var g=document.createElement("td");g.style.padding="6px";g.style.whiteSpace="nowrap";b==c[c.length-1]?mxUtils.write(g,mxResources.get("current")):d.toDateString()===T?mxUtils.write(g,d.toLocaleTimeString()):mxUtils.write(g,d.toLocaleDateString()+
-" "+d.toLocaleTimeString());l.appendChild(g);l.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+(null!=b.fileSize?" "+a.formatFileSize(parseInt(b.fileSize)):"")+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(l,"click",function(a){q!=b&&(p.stop(),null!=v&&(v.style.backgroundColor=""),q=b,v=l,v.style.backgroundColor="#ebf2f9",y=x=null,C.removeAttribute("title"),C.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+"..."),k.style.backgroundColor=
-"#ffffff",n.getModel().clear(),G.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),mxUtils.setOpacity(D,20),mxUtils.setOpacity(I,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(B,20),p.spin(k),b.getXml(function(a){if(q==
-b)try{e(a)}catch(ba){C.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+ba.message)}},function(a){p.stop();F.style.display="none";F.innerHTML="";C.innerHTML="";mxUtils.write(C,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(l,"dblclick",function(a){E.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);Y.appendChild(l)}return l}(c[L]);null!=V&&L==c.length-1&&(N=V)}Q.appendChild(Y);
+60);mxUtils.setOpacity(B,60)}else F.style.display="none",F.innerHTML="",C.innerHTML="",mxUtils.write(C,mxResources.get("errorLoadingFile"))},l=document.createElement("tr");l.style.borderBottom="1px solid lightGray";l.style.fontSize="12px";l.style.cursor="pointer";var e=document.createElement("td");e.style.padding="6px";e.style.whiteSpace="nowrap";b==c[c.length-1]?mxUtils.write(e,mxResources.get("current")):d.toDateString()===T?mxUtils.write(e,d.toLocaleTimeString()):mxUtils.write(e,d.toLocaleDateString()+
+" "+d.toLocaleTimeString());l.appendChild(e);l.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+(null!=b.fileSize?" "+a.formatFileSize(parseInt(b.fileSize)):"")+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(l,"click",function(a){t!=b&&(p.stop(),null!=v&&(v.style.backgroundColor=""),t=b,v=l,v.style.backgroundColor="#ebf2f9",y=x=null,C.removeAttribute("title"),C.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+"..."),k.style.backgroundColor=
+"#ffffff",n.getModel().clear(),G.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),mxUtils.setOpacity(D,20),mxUtils.setOpacity(I,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(B,20),p.spin(k),b.getXml(function(a){if(t==
+b)try{g(a)}catch(ba){C.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+ba.message)}},function(a){p.stop();F.style.display="none";F.innerHTML="";C.innerHTML="";mxUtils.write(C,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(l,"dblclick",function(a){E.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);Y.appendChild(l)}return l}(c[L]);null!=V&&L==c.length-1&&(N=V)}Q.appendChild(Y);
e.appendChild(Q)}else null==u||null==a.drive&&u.constructor==window.DriveFile||null==a.dropbox&&u.constructor==window.DropboxFile?(k.style.display="none",K.style.display="none",mxUtils.write(e,mxResources.get("notAvailable"))):(k.style.display="none",K.style.display="none",mxUtils.write(e,mxResources.get("noRevisions")));this.init=function(){null!=N&&N.click()};e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.className="geBtn";K.appendChild(F);K.appendChild(D);K.appendChild(I);
-K.appendChild(B);K.appendChild(z);a.editor.cancelFirst?(g.appendChild(e),g.appendChild(A),g.appendChild(H),g.appendChild(G),g.appendChild(E)):(g.appendChild(A),g.appendChild(H),g.appendChild(G),g.appendChild(E),g.appendChild(e));b.appendChild(g);b.appendChild(K);b.appendChild(C);this.container=b},DraftDialog=function(a,c,d,b,g,e,k,n){var m=document.createElement("div"),t=document.createElement("div");t.style.marginTop="0px";t.style.whiteSpace="nowrap";t.style.overflow="auto";mxUtils.write(t,c);m.appendChild(t);
+K.appendChild(B);K.appendChild(z);a.editor.cancelFirst?(g.appendChild(e),g.appendChild(A),g.appendChild(H),g.appendChild(G),g.appendChild(E)):(g.appendChild(A),g.appendChild(H),g.appendChild(G),g.appendChild(E),g.appendChild(e));b.appendChild(g);b.appendChild(K);b.appendChild(C);this.container=b},DraftDialog=function(a,c,d,b,g,e,k,n){var m=document.createElement("div"),q=document.createElement("div");q.style.marginTop="0px";q.style.whiteSpace="nowrap";q.style.overflow="auto";mxUtils.write(q,c);m.appendChild(q);
var f=document.createElement("div");f.style.position="absolute";f.style.border="1px solid lightGray";f.style.marginTop="10px";f.style.width="640px";f.style.top="46px";f.style.bottom="74px";f.style.overflow="hidden";mxEvent.disableContextMenu(f);m.appendChild(f);var l=new Graph(f);l.setEnabled(!1);l.setPanning(!0);l.panningHandler.ignoreCell=!0;l.panningHandler.useLeftButtonForPanning=!0;l.minFitScale=null;l.maxFitScale=null;l.centerZoom=!0;c=mxUtils.parseXml(d);var p=a.editor.extractGraphModel(c.documentElement,
-!0),u=0,v=null,q=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==a&&null!=v&&null!=v[u]?v[u].getAttribute("name"):"pagenumber"==a?u+1:"pagecount"==a?null!=v?v.length:1:q.apply(this,arguments)};l.getLinkForCell=function(){return null};c=mxUtils.button("",function(){l.zoomIn()});c.className="geSprite geSprite-zoomin";c.setAttribute("title",mxResources.get("zoomIn"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);d=mxUtils.button("",function(){l.zoomOut()});
-d.className="geSprite geSprite-zoomout";d.setAttribute("title",mxResources.get("zoomOut"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);t=mxUtils.button("",function(){l.maxFitScale=8;l.fit(8);l.center()});t.className="geSprite geSprite-fit";t.setAttribute("title",mxResources.get("fit"));t.style.outline="none";t.style.border="none";t.style.margin="2px";mxUtils.setOpacity(t,60);var x=mxUtils.button("",function(){l.zoomActual();l.center()});x.className="geSprite geSprite-actualsize";
+!0),u=0,v=null,t=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==a&&null!=v&&null!=v[u]?v[u].getAttribute("name"):"pagenumber"==a?u+1:"pagecount"==a?null!=v?v.length:1:t.apply(this,arguments)};l.getLinkForCell=function(){return null};c=mxUtils.button("",function(){l.zoomIn()});c.className="geSprite geSprite-zoomin";c.setAttribute("title",mxResources.get("zoomIn"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);d=mxUtils.button("",function(){l.zoomOut()});
+d.className="geSprite geSprite-zoomout";d.setAttribute("title",mxResources.get("zoomOut"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);q=mxUtils.button("",function(){l.maxFitScale=8;l.fit(8);l.center()});q.className="geSprite geSprite-fit";q.setAttribute("title",mxResources.get("fit"));q.style.outline="none";q.style.border="none";q.style.margin="2px";mxUtils.setOpacity(q,60);var x=mxUtils.button("",function(){l.zoomActual();l.center()});x.className="geSprite geSprite-actualsize";
x.setAttribute("title",mxResources.get("actualSize"));x.style.outline="none";x.style.border="none";x.style.margin="2px";mxUtils.setOpacity(x,60);g=mxUtils.button(k||mxResources.get("discard"),g);g.className="geBtn";var y=document.createElement("select");y.style.maxWidth="80px";y.style.position="relative";y.style.top="-2px";y.style.verticalAlign="bottom";y.style.marginRight="6px";y.style.display="none";b=mxUtils.button(e||mxResources.get("edit"),b);b.className="geBtn gePrimaryBtn";e=document.createElement("div");
e.style.position="absolute";e.style.bottom="30px";e.style.width="640px";e.style.textAlign="right";k=document.createElement("div");k.className="geToolbarContainer";k.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function a(a){if(null!=a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";f.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,l.getModel());
l.maxFitScale=1;l.fit(8);l.center()}}function b(b){null!=b&&(b=a(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(b))).documentElement));return b}mxEvent.addListener(y,"change",function(a){u=parseInt(y.value);b(v[u]);mxEvent.consume(a)});if("mxfile"==p.nodeName){var c=p.getElementsByTagName("diagram");v=[];for(var d=0;d<c.length;d++)v.push(c[d]);0<v.length&&b(v[u]);if(1<v.length)for(y.style.display="",d=0;d<v.length;d++)c=document.createElement("option"),mxUtils.write(c,v[d].getAttribute("name")||
-mxResources.get("pageWithNumber",[d+1])),c.setAttribute("value",d),d==u&&c.setAttribute("selected","selected"),y.appendChild(c)}else a(p)};k.appendChild(y);k.appendChild(c);k.appendChild(d);k.appendChild(x);k.appendChild(t);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";n=null!=n?mxUtils.button(mxResources.get("ignore"),n):null;null!=n&&(n.className="geBtn");a.editor.cancelFirst?(e.appendChild(c),null!=n&&e.appendChild(n),e.appendChild(g),e.appendChild(b)):
+mxResources.get("pageWithNumber",[d+1])),c.setAttribute("value",d),d==u&&c.setAttribute("selected","selected"),y.appendChild(c)}else a(p)};k.appendChild(y);k.appendChild(c);k.appendChild(d);k.appendChild(x);k.appendChild(q);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";n=null!=n?mxUtils.button(mxResources.get("ignore"),n):null;null!=n&&(n.className="geBtn");a.editor.cancelFirst?(e.appendChild(c),null!=n&&e.appendChild(n),e.appendChild(g),e.appendChild(b)):
(e.appendChild(b),e.appendChild(g),null!=n&&e.appendChild(n),e.appendChild(c));m.appendChild(e);m.appendChild(k);this.container=m},FindWindow=function(a,c,d,b,g){function e(a,b,c){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var f=0;f<b.length;f++)if("label"!=b[f].nodeName){var d=mxUtils.trim(b[f].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&d.substring(0,c.length)===c||null!=a&&a.test(d))return!0}}return!1}function k(){var a=m.model.getDescendants(m.model.getRoot()),
-b=p.value.toLowerCase(),c=u.checked?new RegExp(b):null,d=null;t!=b&&(t=b,f=null);var l=null==f;if(0<b.length)for(var g=0;g<a.length;g++){var k=m.view.getState(a[g]);if(null!=k&&null!=k.cell.value&&(l||null==d)&&(m.model.isVertex(k.cell)||m.model.isEdge(k.cell))&&(m.isHtmlLabel(k.cell)?(q.innerHTML=m.getLabel(k.cell),label=mxUtils.extractTextWithWhitespace([q])):label=m.getLabel(k.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==c&&(label.substring(0,b.length)===
-b||e(c,k.cell,b))||null!=c&&(c.test(label)||e(c,k.cell,b))))if(l){d=k;break}else null==d&&(d=k);l=l||k==f}null!=d?(f=d,m.scrollCellToVisible(f.cell),m.isEnabled()?m.setSelectionCell(f.cell):m.highlightCell(f.cell)):m.isEnabled()&&m.clearSelection();return 0==b.length||null!=d}var n=a.actions.get("find"),m=a.editor.graph,t=null,f=null,l=document.createElement("div");l.style.userSelect="none";l.style.overflow="hidden";l.style.padding="10px";l.style.height="100%";var p=document.createElement("input");
+b=p.value.toLowerCase(),c=u.checked?new RegExp(b):null,d=null;q!=b&&(q=b,f=null);var l=null==f;if(0<b.length)for(var g=0;g<a.length;g++){var k=m.view.getState(a[g]);if(null!=k&&null!=k.cell.value&&(l||null==d)&&(m.model.isVertex(k.cell)||m.model.isEdge(k.cell))&&(m.isHtmlLabel(k.cell)?(t.innerHTML=m.getLabel(k.cell),label=mxUtils.extractTextWithWhitespace([t])):label=m.getLabel(k.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==c&&(label.substring(0,b.length)===
+b||e(c,k.cell,b))||null!=c&&(c.test(label)||e(c,k.cell,b))))if(l){d=k;break}else null==d&&(d=k);l=l||k==f}null!=d?(f=d,m.scrollCellToVisible(f.cell),m.isEnabled()?m.setSelectionCell(f.cell):m.highlightCell(f.cell)):m.isEnabled()&&m.clearSelection();return 0==b.length||null!=d}var n=a.actions.get("find"),m=a.editor.graph,q=null,f=null,l=document.createElement("div");l.style.userSelect="none";l.style.overflow="hidden";l.style.padding="10px";l.style.height="100%";var p=document.createElement("input");
p.setAttribute("placeholder",mxResources.get("find"));p.setAttribute("type","text");p.style.marginTop="4px";p.style.marginBottom="6px";p.style.width="200px";p.style.fontSize="12px";p.style.borderRadius="4px";p.style.padding="6px";l.appendChild(p);mxUtils.br(l);var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginRight="4px";l.appendChild(u);mxUtils.write(l,mxResources.get("regularExpression"));var v=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000088250");
-v.style.position="relative";v.style.marginLeft="6px";v.style.top="-1px";l.appendChild(v);var q=document.createElement("div");mxUtils.br(l);v=mxUtils.button(mxResources.get("reset"),function(){p.value="";p.style.backgroundColor="";t=f=null;p.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.marginTop="6px";v.style.marginRight="4px";v.className="geBtn";l.appendChild(v);v=mxUtils.button(mxResources.get("find"),function(){try{p.style.backgroundColor=k()?"":"#ffcfcf"}catch(y){a.handleError(y)}});
-v.setAttribute("title",mxResources.get("find")+" (Enter)");v.style.marginTop="6px";v.className="geBtn gePrimaryBtn";l.appendChild(v);mxEvent.addListener(p,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)n.funct();else if(t!=p.value.toLowerCase()||13==a.keyCode)try{p.style.backgroundColor=k()?"":"#ffcfcf"}catch(D){p.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(l,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&
+v.style.position="relative";v.style.marginLeft="6px";v.style.top="-1px";l.appendChild(v);var t=document.createElement("div");mxUtils.br(l);v=mxUtils.button(mxResources.get("reset"),function(){p.value="";p.style.backgroundColor="";q=f=null;p.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.marginTop="6px";v.style.marginRight="4px";v.className="geBtn";l.appendChild(v);v=mxUtils.button(mxResources.get("find"),function(){try{p.style.backgroundColor=k()?"":"#ffcfcf"}catch(y){a.handleError(y)}});
+v.setAttribute("title",mxResources.get("find")+" (Enter)");v.style.marginTop="6px";v.className="geBtn gePrimaryBtn";l.appendChild(v);mxEvent.addListener(p,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)n.funct();else if(q!=p.value.toLowerCase()||13==a.keyCode)try{p.style.backgroundColor=k()?"":"#ffcfcf"}catch(D){p.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(l,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&
(n.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),l,c,d,b,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):m.container.focus()}));this.window.setLocation=
function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var x=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,
"resize",x);this.destroy=function(){mxEvent.removeListener(window,"resize",x);this.window.destroy()}},FreehandWindow=function(a,c,d,b,g){var e=a.editor.graph;a=document.createElement("div");a.style.userSelect="none";a.style.overflow="hidden";a.style.height="100%";var k=mxUtils.button(mxResources.get("startDrawing"),function(){e.freehand.isDrawing()&&e.freehand.stopDrawing();e.freehand.startDrawing()});k.setAttribute("title",mxResources.get("startDrawing"));k.style.marginTop="8px";k.style.marginRight=
@@ -8044,73 +8053,73 @@ function(a,b){var c=window.innerHeight||document.body.clientHeight||document.doc
this.window.setResizable(!1);this.window.setClosable(!0);e.addListener("freehandStateChanged",mxUtils.bind(this,function(){n.className="geBtn"+(e.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){e.freehand.isDrawing()&&e.freehand.stopDrawing()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;
a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var m=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",m);this.destroy=function(){mxEvent.removeListener(window,"resize",m);this.window.destroy()}},
TagsWindow=function(a,c,d,b,g){var e=a.editor.graph,k="tags",n=document.createElement("div");n.style.userSelect="none";n.style.overflow="hidden";n.style.padding="10px";n.style.height="100%";var m=document.createElement("input");m.setAttribute("placeholder",mxResources.get("allTags"));m.setAttribute("type","text");m.style.marginTop="4px";m.style.width="260px";m.style.fontSize="12px";m.style.borderRadius="4px";m.style.padding="6px";n.appendChild(m);if(!a.isOffline()||mxClient.IS_CHROMEAPP){m.style.width=
-"240px";var t=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");t.firstChild.style.marginBottom="6px";t.style.marginLeft="6px";n.appendChild(t)}mxEvent.addListener(m,"dblclick",function(){var b=new FilenameDialog(a,k,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(k=a)}),mxResources.get("enterPropertyName"));a.showDialog(b.container,300,80,!0,!0);b.init()});m.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(n);
-t=mxUtils.button(mxResources.get("hide"),function(){var a=e.getCellsForTags(m.value.split(" "),void 0,k,!0);e.setCellsVisible(a,!1)});t.setAttribute("title",mxResources.get("hide"));t.style.marginTop="8px";t.style.marginRight="4px";t.className="geBtn";n.appendChild(t);t=mxUtils.button(mxResources.get("show"),function(){var a=e.getCellsForTags(m.value.split(" "),void 0,k,!0);e.setCellsVisible(a,!0);if(e.isEnabled()){for(var b=[],c=0;c<a.length;c++)(e.model.isVertex(a[c])||e.model.isEdge(a[c]))&&b.push(a[c]);
-e.setSelectionCells(b)}else for(c=0;c<a.length;c++)e.highlightCell(a[c])});t.setAttribute("title",mxResources.get("show"));t.style.marginTop="8px";t.style.marginRight="4px";t.className="geBtn";n.appendChild(t);var f=a.actions.get("tags"),t=mxUtils.button(mxResources.get("close"),function(){f.funct()});t.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");t.style.marginTop="8px";t.className="geBtn gePrimaryBtn";n.appendChild(t);mxEvent.addListener(m,"keyup",function(a){13!=a.keyCode&&27!=
+"240px";var q=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");q.firstChild.style.marginBottom="6px";q.style.marginLeft="6px";n.appendChild(q)}mxEvent.addListener(m,"dblclick",function(){var b=new FilenameDialog(a,k,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(k=a)}),mxResources.get("enterPropertyName"));a.showDialog(b.container,300,80,!0,!0);b.init()});m.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(n);
+q=mxUtils.button(mxResources.get("hide"),function(){var a=e.getCellsForTags(m.value.split(" "),void 0,k,!0);e.setCellsVisible(a,!1)});q.setAttribute("title",mxResources.get("hide"));q.style.marginTop="8px";q.style.marginRight="4px";q.className="geBtn";n.appendChild(q);q=mxUtils.button(mxResources.get("show"),function(){var a=e.getCellsForTags(m.value.split(" "),void 0,k,!0);e.setCellsVisible(a,!0);if(e.isEnabled()){for(var b=[],c=0;c<a.length;c++)(e.model.isVertex(a[c])||e.model.isEdge(a[c]))&&b.push(a[c]);
+e.setSelectionCells(b)}else for(c=0;c<a.length;c++)e.highlightCell(a[c])});q.setAttribute("title",mxResources.get("show"));q.style.marginTop="8px";q.style.marginRight="4px";q.className="geBtn";n.appendChild(q);var f=a.actions.get("tags"),q=mxUtils.button(mxResources.get("close"),function(){f.funct()});q.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");q.style.marginTop="8px";q.className="geBtn gePrimaryBtn";n.appendChild(q);mxEvent.addListener(m,"keyup",function(a){13!=a.keyCode&&27!=
a.keyCode||f.funct()});this.window=new mxWindow(mxResources.get("tags"),n,c,d,b,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):e.container.focus()}));this.window.setLocation=function(a,
b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var l=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,
"resize",l);this.destroy=function(){mxEvent.removeListener(window,"resize",l);this.window.destroy()}},AuthDialog=function(a,c,d,b){var g=document.createElement("div");g.style.textAlign="center";var e=document.createElement("p");e.style.fontSize="16pt";e.style.padding="0px";e.style.margin="0px";e.style.color="gray";mxUtils.write(e,mxResources.get("authorizationRequired"));var k="Unknown",n=document.createElement("img");n.setAttribute("border","0");n.setAttribute("align","absmiddle");n.style.marginRight=
"10px";c==a.drive?(k=mxResources.get("googleDrive"),n.src=IMAGE_PATH+"/google-drive-logo-white.svg"):c==a.dropbox?(k=mxResources.get("dropbox"),n.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive?(k=mxResources.get("oneDrive"),n.src=IMAGE_PATH+"/onedrive-logo-white.svg"):c==a.gitHub?(k=mxResources.get("github"),n.src=IMAGE_PATH+"/github-logo-white.svg"):c==a.gitLab?(k=mxResources.get("gitlab"),n.src=IMAGE_PATH+"/gitlab-logo.svg",n.style.width="32px"):c==a.trello&&(k=mxResources.get("trello"),
n.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[k]));var m=document.createElement("input");m.setAttribute("type","checkbox");k=mxUtils.button(mxResources.get("authorize"),function(){b(m.checked)});k.insertBefore(n,k.firstChild);k.style.marginTop="6px";k.className="geBigButton";k.style.fontSize="18px";k.style.padding="14px";g.appendChild(e);g.appendChild(a);g.appendChild(k);d&&(d=document.createElement("p"),d.style.marginTop=
"20px",d.appendChild(m),e=document.createElement("span"),mxUtils.write(e," "+mxResources.get("rememberMe")),d.appendChild(e),g.appendChild(d),m.checked=!0,m.defaultChecked=!0,mxEvent.addListener(e,"click",function(a){m.checked=!m.checked;mxEvent.consume(a)}));this.container=g},MoreShapesDialog=function(a,c,d){d=null!=d?d:a.sidebar.entries;var b=document.createElement("div"),g=[];if(null!=a.sidebar.customEntries)for(var e=0;e<a.sidebar.customEntries.length;e++){for(var k=a.sidebar.customEntries[e],
-n={title:a.getResource(k.title),entries:[]},m=0;m<k.entries.length;m++){var t=k.entries[m];n.entries.push({id:t.id,title:a.getResource(t.title),desc:a.getResource(t.desc),image:t.preview})}g.push(n)}for(e=0;e<d.length;e++)if(null==a.sidebar.enabledLibraries)g.push(d[e]);else{n={title:d[e].title,entries:[]};for(m=0;m<d[e].entries.length;m++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,d[e].entries[m].id)&&n.entries.push(d[e].entries[m]);0<n.entries.length&&g.push(n)}d=g;if(c){m=mxUtils.bind(this,
+n={title:a.getResource(k.title),entries:[]},m=0;m<k.entries.length;m++){var q=k.entries[m];n.entries.push({id:q.id,title:a.getResource(q.title),desc:a.getResource(q.desc),image:q.preview})}g.push(n)}for(e=0;e<d.length;e++)if(null==a.sidebar.enabledLibraries)g.push(d[e]);else{n={title:d[e].title,entries:[]};for(m=0;m<d[e].entries.length;m++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,d[e].entries[m].id)&&n.entries.push(d[e].entries[m]);0<n.entries.length&&g.push(n)}d=g;if(c){m=mxUtils.bind(this,
function(b){for(var c=0;c<b.length;c++)(function(b){var d=v.cloneNode(!1);d.style.fontWeight="bold";d.style.backgroundColor="dark"==uiTheme?"#505759":"#e5e5e5";d.style.padding="6px 0px 6px 20px";mxUtils.write(d,b.title);f.appendChild(d);for(var e=0;e<b.entries.length;e++)(function(b){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",b.title+" ("+b.id+")");var g=
document.createElement("input");g.setAttribute("type","checkbox");g.checked=a.sidebar.isEntryVisible(b.id);g.defaultChecked=g.checked;d.appendChild(g);mxUtils.write(d," "+b.title);f.appendChild(d);var k=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName){l.style.textAlign="center";l.style.padding="0px";l.style.color="";l.innerHTML="";if(null!=b.desc){var c=document.createElement("pre");c.style.boxSizing="border-box";c.style.fontFamily="inherit";c.style.margin="20px";c.style.right="0px";
c.style.textAlign="left";mxUtils.write(c,b.desc);l.appendChild(c)}null!=b.imageCallback?b.imageCallback(l):null!=b.image?l.innerHTML+='<img border="0" src="'+b.image+'"/>':null==b.desc&&(l.style.padding="20px",l.style.color="rgb(179, 179, 179)",mxUtils.write(l,mxResources.get("noPreview")));null!=p&&(p.style.backgroundColor="");p=d;p.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9";null!=a&&mxEvent.consume(a)}};mxEvent.addListener(d,"click",k);mxEvent.addListener(d,"dblclick",function(a){g.checked=
!g.checked;mxEvent.consume(a)});u.push(function(){return g.checked?b.id:null});0==c&&0==e&&k()})(b.entries[e])})(b[c])});e=document.createElement("div");e.className="geDialogTitle";mxUtils.write(e,mxResources.get("shapes"));e.style.position="absolute";e.style.top="0px";e.style.left="0px";e.style.lineHeight="40px";e.style.height="40px";e.style.right="0px";mxClient.IS_QUIRKS&&(e.style.width="718px");var f=document.createElement("div"),l=document.createElement("div");f.style.position="absolute";f.style.top=
"40px";f.style.left="0px";f.style.width="202px";f.style.bottom="60px";f.style.overflow="auto";mxClient.IS_QUIRKS&&(f.style.height="437px",f.style.marginTop="1px");l.style.position="absolute";l.style.left="202px";l.style.right="0px";l.style.top="40px";l.style.bottom="60px";l.style.overflow="auto";l.style.borderLeft="1px solid rgb(211, 211, 211)";l.style.textAlign="center";mxClient.IS_QUIRKS&&(l.style.width=parseInt(e.style.width)-202+"px",l.style.height=f.style.height,l.style.marginTop=f.style.marginTop);
var p=null,u=[],v=document.createElement("div");v.style.position="relative";v.style.left="0px";v.style.right="0px";m(d);b.style.padding="30px";b.appendChild(e);b.appendChild(f);b.appendChild(l);d=document.createElement("div");d.className="geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px";d.style.color="gray";d.style.left="0px";d.style.right="0px";d.style.bottom="0px";d.style.height="60px";d.style.lineHeight="52px";mxClient.IS_QUIRKS&&(d.style.width=e.style.width,d.style.paddingTop=
-"12px");var q=document.createElement("input");q.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)e=document.createElement("span"),e.style.paddingRight="20px",e.appendChild(q),mxUtils.write(e," "+mxResources.get("rememberThisSetting")),q.checked=!0,q.defaultChecked=!0,mxEvent.addListener(e,"click",function(a){mxEvent.getSource(a)!=q&&(q.checked=!q.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(e.style.position="relative",e.style.top="-6px"),d.appendChild(e);e=mxUtils.button(mxResources.get("cancel"),
-function(){a.hideDialog()});e.className="geBtn";m=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],c=0;c<u.length;c++){var f=u[c].apply(this,arguments);null!=f&&b.push(f)}a.sidebar.showEntries(b.join(";"),q.checked,!0)});m.className="geBtn gePrimaryBtn"}else{var x=document.createElement("table"),e=document.createElement("tbody");b.style.height="100%";b.style.overflow="auto";m=document.createElement("tr");x.style.width="100%";c=document.createElement("td");var g=document.createElement("td"),
+"12px");var t=document.createElement("input");t.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)e=document.createElement("span"),e.style.paddingRight="20px",e.appendChild(t),mxUtils.write(e," "+mxResources.get("rememberThisSetting")),t.checked=!0,t.defaultChecked=!0,mxEvent.addListener(e,"click",function(a){mxEvent.getSource(a)!=t&&(t.checked=!t.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(e.style.position="relative",e.style.top="-6px"),d.appendChild(e);e=mxUtils.button(mxResources.get("cancel"),
+function(){a.hideDialog()});e.className="geBtn";m=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],c=0;c<u.length;c++){var f=u[c].apply(this,arguments);null!=f&&b.push(f)}a.sidebar.showEntries(b.join(";"),t.checked,!0)});m.className="geBtn gePrimaryBtn"}else{var x=document.createElement("table"),e=document.createElement("tbody");b.style.height="100%";b.style.overflow="auto";m=document.createElement("tr");x.style.width="100%";c=document.createElement("td");var g=document.createElement("td"),
k=document.createElement("td"),y=mxUtils.bind(this,function(b,c,f){var d=document.createElement("input");d.type="checkbox";x.appendChild(d);d.checked=a.sidebar.isEntryVisible(f);var l=document.createElement("span");mxUtils.write(l,c);c=document.createElement("div");c.style.display="block";c.appendChild(d);c.appendChild(l);mxEvent.addListener(l,"click",function(a){d.checked=!d.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return d.checked?f:null}});m.appendChild(c);m.appendChild(g);
-m.appendChild(k);e.appendChild(m);x.appendChild(e);for(var u=[],D=0,e=0;e<d.length;e++)for(m=0;m<d[e].entries.length;m++)D++;for(var I=[c,g,k],z=0,e=0;e<d.length;e++)(function(a){for(var b=0;b<a.entries.length;b++){var c=a.entries[b];u.push(y(I[Math.floor(z/(D/3))],c.title,c.id));z++}})(d[e]);b.appendChild(x);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="center";q=document.createElement("input");isLocalStorage&&(q.setAttribute("type","checkbox"),q.checked=!0,q.defaultChecked=
-!0,d.appendChild(q),e=document.createElement("span"),mxUtils.write(e," "+mxResources.get("rememberThisSetting")),d.appendChild(e),mxEvent.addListener(e,"click",function(a){q.checked=!q.checked;mxEvent.consume(a)}));b.appendChild(d);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";m=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],c=0;c<u.length;c++){var f=u[c].apply(this,arguments);null!=f&&b.push(f)}a.sidebar.showEntries(0<b.length?
-b.join(";"):"",q.checked);a.hideDialog()});m.className="geBtn gePrimaryBtn";d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right"}a.editor.cancelFirst?(d.appendChild(e),d.appendChild(m)):(d.appendChild(m),d.appendChild(e));b.appendChild(d);this.container=b},PluginsDialog=function(a){function c(){if(0==g.length)b.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{b.innerHTML="";for(var f=0;f<g.length;f++){var d=document.createElement("span");d.style.whiteSpace=
+m.appendChild(k);e.appendChild(m);x.appendChild(e);for(var u=[],D=0,e=0;e<d.length;e++)for(m=0;m<d[e].entries.length;m++)D++;for(var I=[c,g,k],z=0,e=0;e<d.length;e++)(function(a){for(var b=0;b<a.entries.length;b++){var c=a.entries[b];u.push(y(I[Math.floor(z/(D/3))],c.title,c.id));z++}})(d[e]);b.appendChild(x);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="center";t=document.createElement("input");isLocalStorage&&(t.setAttribute("type","checkbox"),t.checked=!0,t.defaultChecked=
+!0,d.appendChild(t),e=document.createElement("span"),mxUtils.write(e," "+mxResources.get("rememberThisSetting")),d.appendChild(e),mxEvent.addListener(e,"click",function(a){t.checked=!t.checked;mxEvent.consume(a)}));b.appendChild(d);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";m=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],c=0;c<u.length;c++){var f=u[c].apply(this,arguments);null!=f&&b.push(f)}a.sidebar.showEntries(0<b.length?
+b.join(";"):"",t.checked);a.hideDialog()});m.className="geBtn gePrimaryBtn";d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right"}a.editor.cancelFirst?(d.appendChild(e),d.appendChild(m)):(d.appendChild(m),d.appendChild(e));b.appendChild(d);this.container=b},PluginsDialog=function(a){function c(){if(0==g.length)b.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{b.innerHTML="";for(var f=0;f<g.length;f++){var d=document.createElement("span");d.style.whiteSpace=
"nowrap";var p=document.createElement("span");p.className="geSprite geSprite-delete";p.style.position="relative";p.style.cursor="pointer";p.style.top="5px";p.style.marginRight="4px";p.style.display="inline-block";d.appendChild(p);mxUtils.write(d,g[f]);b.appendChild(d);mxUtils.br(b);mxEvent.addListener(p,"click",function(b){return function(){a.confirm(mxResources.get("delete")+' "'+g[b]+'"?',function(){g.splice(b,1);c()})}}(f))}}}var d=document.createElement("div"),b=document.createElement("div");
-b.style.height="120px";b.style.overflow="auto";var g=mxSettings.getPlugins().slice();d.appendChild(b);c();var e=mxUtils.button(mxResources.get("add"),function(){var b="",d=urlParams.p;if(null!=d&&0<d.length){for(var p=d.split(";"),d=0;d<p.length;d++){var e=App.pluginRegistry[p[d]];null!=e&&(b+=e+";")}";"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1))}b=new FilenameDialog(a,b,mxResources.get("add"),function(a){if(null!=a&&0<a.length){p=a.split(";");for(a=0;a<p.length;a++){var b=p[a],f=App.pluginRegistry[b];
-null!=f&&(b=f);0<b.length&&0>mxUtils.indexOf(g,b)&&g.push(b)}c()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");a.showDialog(b.container,300,80,!0,!0);b.init()});e.className="geBtn";var k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";var n=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(g);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});n.className="geBtn gePrimaryBtn";var m=
-document.createElement("div");m.style.marginTop="14px";m.style.textAlign="right";var t=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});t.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(t.style.display="none");m.appendChild(t);a.editor.cancelFirst?(m.appendChild(k),m.appendChild(e),m.appendChild(n)):(m.appendChild(e),m.appendChild(n),m.appendChild(k));d.appendChild(m);this.container=d},CropImageDialog=function(a,
-c,d){var b=document.createElement("div"),g=document.createElement("table"),e=document.createElement("tbody"),k=document.createElement("tr"),n=document.createElement("td");n.style.whiteSpace="nowrap";n.setAttribute("colspan","2");mxUtils.write(n,mxResources.get("loading")+"...");k.appendChild(n);e.appendChild(k);var k=document.createElement("tr"),m=document.createElement("td"),t=document.createElement("td");g.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("left")+":");var f=document.createElement("input");
-f.setAttribute("type","text");f.style.width="100px";f.value="0";this.init=function(){f.focus();f.select()};t.appendChild(f);k.appendChild(m);k.appendChild(t);e.appendChild(k);k=document.createElement("tr");m=document.createElement("td");t=document.createElement("td");mxUtils.write(m,mxResources.get("top")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value="0";t.appendChild(l);k.appendChild(m);k.appendChild(t);e.appendChild(k);k=document.createElement("tr");
-m=document.createElement("td");t=document.createElement("td");mxUtils.write(m,mxResources.get("right")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value="0";t.appendChild(p);k.appendChild(m);k.appendChild(t);e.appendChild(k);k=document.createElement("tr");m=document.createElement("td");t=document.createElement("td");mxUtils.write(m,mxResources.get("bottom")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";
-u.value="0";t.appendChild(u);k.appendChild(m);k.appendChild(t);e.appendChild(k);k=document.createElement("tr");m=document.createElement("td");t=document.createElement("td");mxUtils.write(m,mxResources.get("circle")+":");k.appendChild(m);var v=document.createElement("input");v.setAttribute("type","checkbox");t.appendChild(v);k.appendChild(t);e.appendChild(k);g.appendChild(e);b.appendChild(g);g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";var q=new Image,
-x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=document.createElement("canvas"),c=b.getContext("2d"),e=q.width,g=q.height,k=parseInt(f.value),n=parseInt(l.value),e=Math.max(1,e-k-parseInt(p.value)),g=Math.max(1,g-n-parseInt(u.value));b.width=e;b.height=g;v.checked&&(c.fillStyle="#000000",c.arc(e/2,g/2,Math.min(e/2,g/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation="source-in");c.drawImage(q,k,n,e,g,0,0,e,g);d(b.toDataURL())});x.className="geBtn gePrimaryBtn";x.setAttribute("disabled",
-"disabled");q.onload=function(){x.removeAttribute("disabled");n.innerHTML="";mxUtils.write(n,mxResources.get("width")+": "+q.width+" "+mxResources.get("height")+": "+q.height)};q.src=c;mxEvent.addListener(b,"keypress",function(a){13==a.keyCode&&x.click()});c=document.createElement("div");c.style.marginTop="20px";c.style.textAlign="right";a.editor.cancelFirst?(c.appendChild(g),c.appendChild(x)):(c.appendChild(x),c.appendChild(g));b.appendChild(c);this.container=b},EditGeometryDialog=function(a,c){var d=
-a.editor.graph,b=1==c.length?d.getCellGeometry(c[0]):null,g=document.createElement("div"),e=document.createElement("table"),k=document.createElement("tbody"),n=document.createElement("tr"),m=document.createElement("td"),t=document.createElement("td");e.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("relative")+":");var f=document.createElement("input");f.setAttribute("type","checkbox");null!=b&&b.relative&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);this.init=function(){f.focus()};
-t.appendChild(f);n.appendChild(m);n.appendChild(t);k.appendChild(n);n=document.createElement("tr");m=document.createElement("td");t=document.createElement("td");mxUtils.write(m,mxResources.get("left")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value=null!=b?b.x:"";t.appendChild(l);n.appendChild(m);n.appendChild(t);k.appendChild(n);n=document.createElement("tr");m=document.createElement("td");t=document.createElement("td");mxUtils.write(m,mxResources.get("top")+
-":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=b?b.y:"";t.appendChild(p);n.appendChild(m);n.appendChild(t);k.appendChild(n);n=document.createElement("tr");m=document.createElement("td");t=document.createElement("td");mxUtils.write(m,mxResources.get("dx")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=b&&null!=b.offset?b.offset.x:"";t.appendChild(u);n.appendChild(m);n.appendChild(t);
-k.appendChild(n);n=document.createElement("tr");m=document.createElement("td");t=document.createElement("td");mxUtils.write(m,mxResources.get("dy")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=b&&null!=b.offset?b.offset.y:"";t.appendChild(v);n.appendChild(m);n.appendChild(t);k.appendChild(n);n=document.createElement("tr");m=document.createElement("td");t=document.createElement("td");mxUtils.write(m,mxResources.get("width")+":");var q=
-document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=b?b.width:"";t.appendChild(q);n.appendChild(m);n.appendChild(t);k.appendChild(n);n=document.createElement("tr");m=document.createElement("td");t=document.createElement("td");mxUtils.write(m,mxResources.get("height")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=null!=b?b.height:"";t.appendChild(x);n.appendChild(m);n.appendChild(t);k.appendChild(n);
-n=document.createElement("tr");m=document.createElement("td");t=document.createElement("td");mxUtils.write(m,mxResources.get("rotation")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=1==c.length?mxUtils.getValue(d.getCellStyle(c[0]),mxConstants.STYLE_ROTATION,0):"";t.appendChild(y);n.appendChild(m);n.appendChild(t);k.appendChild(n);e.appendChild(k);g.appendChild(e);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className=
+b.style.height="120px";b.style.overflow="auto";var g=mxSettings.getPlugins().slice();d.appendChild(b);c();var e=mxUtils.button(mxResources.get("add"),function(){var b="",d=urlParams.p;if(null!=d&&0<d.length){for(var p=d.split(";"),d=0;d<p.length;d++){var e=App.pluginRegistry[p[d]];null!=e&&(b+=e+";")}";"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1))}b=new FilenameDialog(a,b,mxResources.get("add"),function(a){if(null!=a&&0<a.length){p=a.split(";");for(a=0;a<p.length;a++){var b=p[a],d=App.pluginRegistry[b];
+null!=d&&(b=d);0<b.length&&0>mxUtils.indexOf(g,b)&&g.push(b)}c()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");a.showDialog(b.container,300,80,!0,!0);b.init()});e.className="geBtn";var k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";var n=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(g);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});n.className="geBtn gePrimaryBtn";var m=
+document.createElement("div");m.style.marginTop="14px";m.style.textAlign="right";var q=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});q.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(q.style.display="none");m.appendChild(q);a.editor.cancelFirst?(m.appendChild(k),m.appendChild(e),m.appendChild(n)):(m.appendChild(e),m.appendChild(n),m.appendChild(k));d.appendChild(m);this.container=d},CropImageDialog=function(a,
+c,d){var b=document.createElement("div"),g=document.createElement("table"),e=document.createElement("tbody"),k=document.createElement("tr"),n=document.createElement("td");n.style.whiteSpace="nowrap";n.setAttribute("colspan","2");mxUtils.write(n,mxResources.get("loading")+"...");k.appendChild(n);e.appendChild(k);var k=document.createElement("tr"),m=document.createElement("td"),q=document.createElement("td");g.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("left")+":");var f=document.createElement("input");
+f.setAttribute("type","text");f.style.width="100px";f.value="0";this.init=function(){f.focus();f.select()};q.appendChild(f);k.appendChild(m);k.appendChild(q);e.appendChild(k);k=document.createElement("tr");m=document.createElement("td");q=document.createElement("td");mxUtils.write(m,mxResources.get("top")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value="0";q.appendChild(l);k.appendChild(m);k.appendChild(q);e.appendChild(k);k=document.createElement("tr");
+m=document.createElement("td");q=document.createElement("td");mxUtils.write(m,mxResources.get("right")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value="0";q.appendChild(p);k.appendChild(m);k.appendChild(q);e.appendChild(k);k=document.createElement("tr");m=document.createElement("td");q=document.createElement("td");mxUtils.write(m,mxResources.get("bottom")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";
+u.value="0";q.appendChild(u);k.appendChild(m);k.appendChild(q);e.appendChild(k);k=document.createElement("tr");m=document.createElement("td");q=document.createElement("td");mxUtils.write(m,mxResources.get("circle")+":");k.appendChild(m);var v=document.createElement("input");v.setAttribute("type","checkbox");q.appendChild(v);k.appendChild(q);e.appendChild(k);g.appendChild(e);b.appendChild(g);g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";var t=new Image,
+x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=document.createElement("canvas"),c=b.getContext("2d"),e=t.width,g=t.height,k=parseInt(f.value),n=parseInt(l.value),e=Math.max(1,e-k-parseInt(p.value)),g=Math.max(1,g-n-parseInt(u.value));b.width=e;b.height=g;v.checked&&(c.fillStyle="#000000",c.arc(e/2,g/2,Math.min(e/2,g/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation="source-in");c.drawImage(t,k,n,e,g,0,0,e,g);d(b.toDataURL())});x.className="geBtn gePrimaryBtn";x.setAttribute("disabled",
+"disabled");t.onload=function(){x.removeAttribute("disabled");n.innerHTML="";mxUtils.write(n,mxResources.get("width")+": "+t.width+" "+mxResources.get("height")+": "+t.height)};t.src=c;mxEvent.addListener(b,"keypress",function(a){13==a.keyCode&&x.click()});c=document.createElement("div");c.style.marginTop="20px";c.style.textAlign="right";a.editor.cancelFirst?(c.appendChild(g),c.appendChild(x)):(c.appendChild(x),c.appendChild(g));b.appendChild(c);this.container=b},EditGeometryDialog=function(a,c){var d=
+a.editor.graph,b=1==c.length?d.getCellGeometry(c[0]):null,g=document.createElement("div"),e=document.createElement("table"),k=document.createElement("tbody"),n=document.createElement("tr"),m=document.createElement("td"),q=document.createElement("td");e.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("relative")+":");var f=document.createElement("input");f.setAttribute("type","checkbox");null!=b&&b.relative&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);this.init=function(){f.focus()};
+q.appendChild(f);n.appendChild(m);n.appendChild(q);k.appendChild(n);n=document.createElement("tr");m=document.createElement("td");q=document.createElement("td");mxUtils.write(m,mxResources.get("left")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value=null!=b?b.x:"";q.appendChild(l);n.appendChild(m);n.appendChild(q);k.appendChild(n);n=document.createElement("tr");m=document.createElement("td");q=document.createElement("td");mxUtils.write(m,mxResources.get("top")+
+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=b?b.y:"";q.appendChild(p);n.appendChild(m);n.appendChild(q);k.appendChild(n);n=document.createElement("tr");m=document.createElement("td");q=document.createElement("td");mxUtils.write(m,mxResources.get("dx")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=b&&null!=b.offset?b.offset.x:"";q.appendChild(u);n.appendChild(m);n.appendChild(q);
+k.appendChild(n);n=document.createElement("tr");m=document.createElement("td");q=document.createElement("td");mxUtils.write(m,mxResources.get("dy")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=b&&null!=b.offset?b.offset.y:"";q.appendChild(v);n.appendChild(m);n.appendChild(q);k.appendChild(n);n=document.createElement("tr");m=document.createElement("td");q=document.createElement("td");mxUtils.write(m,mxResources.get("width")+":");var t=
+document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=b?b.width:"";q.appendChild(t);n.appendChild(m);n.appendChild(q);k.appendChild(n);n=document.createElement("tr");m=document.createElement("td");q=document.createElement("td");mxUtils.write(m,mxResources.get("height")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=null!=b?b.height:"";q.appendChild(x);n.appendChild(m);n.appendChild(q);k.appendChild(n);
+n=document.createElement("tr");m=document.createElement("td");q=document.createElement("td");mxUtils.write(m,mxResources.get("rotation")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=1==c.length?mxUtils.getValue(d.getCellStyle(c[0]),mxConstants.STYLE_ROTATION,0):"";q.appendChild(y);n.appendChild(m);n.appendChild(q);k.appendChild(n);e.appendChild(k);g.appendChild(e);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className=
"geBtn";var D=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.getModel().beginUpdate();try{for(var b=0;b<c.length;b++){var e=d.getCellGeometry(c[b]);null!=e&&(e=e.clone(),d.isCellMovable(c[b])&&(e.relative=f.checked,0<mxUtils.trim(l.value).length&&(e.x=Number(l.value)),0<mxUtils.trim(p.value).length&&(e.y=Number(p.value)),0<mxUtils.trim(u.value).length&&(null==e.offset&&(e.offset=new mxPoint),e.offset.x=Number(u.value)),0<mxUtils.trim(v.value).length&&(null==e.offset&&(e.offset=
-new mxPoint),e.offset.y=Number(v.value))),d.isCellResizable(c[b])&&(0<mxUtils.trim(q.value).length&&(e.width=Number(q.value)),0<mxUtils.trim(x.value).length&&(e.height=Number(x.value))),d.getModel().setGeometry(c[b],e));0<mxUtils.trim(y.value).length&&d.setCellStyles(mxConstants.STYLE_ROTATION,Number(y.value),[c[b]])}}finally{d.getModel().endUpdate()}});D.className="geBtn gePrimaryBtn";mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&D.click()});e=document.createElement("div");e.style.marginTop=
+new mxPoint),e.offset.y=Number(v.value))),d.isCellResizable(c[b])&&(0<mxUtils.trim(t.value).length&&(e.width=Number(t.value)),0<mxUtils.trim(x.value).length&&(e.height=Number(x.value))),d.getModel().setGeometry(c[b],e));0<mxUtils.trim(y.value).length&&d.setCellStyles(mxConstants.STYLE_ROTATION,Number(y.value),[c[b]])}}finally{d.getModel().endUpdate()}});D.className="geBtn gePrimaryBtn";mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&D.click()});e=document.createElement("div");e.style.marginTop=
"20px";e.style.textAlign="right";a.editor.cancelFirst?(e.appendChild(b),e.appendChild(D)):(e.appendChild(D),e.appendChild(b));g.appendChild(e);this.container=g},LibraryDialog=function(a,c,d,b,g,e){function k(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=u;)a=a.parentNode;var b=null;if(null!=a)for(var c=u.firstChild,b=0;null!=c&&c!=a;)c=c.nextSibling,b++;return b}function n(b,c,d,l,p,e,g,m,B){try{if(a.spinner.stop(),null==c||"image/"==c.substring(0,6))if(null==b&&null!=
-g||null==q[b]){var A=function(){H.innerHTML="";H.style.cursor="pointer";H.style.whiteSpace="nowrap";H.style.textOverflow="ellipsis";mxUtils.write(H,null!=K.title&&0<K.title.length?K.title:mxResources.get("untitled"));H.style.color=null==K.title||0==K.title.length?"#d0d0d0":""};u.style.backgroundImage="";v.style.display="none";var y=p,C=e;if(p>a.maxImageSize||e>a.maxImageSize){var G=Math.min(1,Math.min(a.maxImageSize/Math.max(1,p)),a.maxImageSize/Math.max(1,e));p*=G;e*=G}y>C?(C=Math.round(100*C/y),
-y=100):(y=Math.round(100*y/C),C=100);var E=document.createElement("div");E.setAttribute("draggable","true");E.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";E.style.position="relative";E.style.cursor="move";mxUtils.setPrefixedStyle(E.style,"transition","transform .1s ease-in-out");if(null!=b){var t=document.createElement("img");t.setAttribute("src",I.convert(b));t.style.width=y+"px";t.style.height=C+"px";t.style.margin="10px";t.style.paddingBottom=Math.floor((100-C)/2)+"px";t.style.paddingLeft=
-Math.floor((100-y)/2)+"px";E.appendChild(t)}else if(null!=g){var F=a.stringToCells(Graph.decompress(g.xml));0<F.length&&(a.sidebar.createThumb(F,100,100,E,null,!0,!1),E.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",E.firstChild.style.cursor="")}var J=document.createElement("img");J.setAttribute("src",Editor.closeImage);J.setAttribute("border","0");J.setAttribute("title",mxResources.get("delete"));J.setAttribute("align","top");J.style.paddingTop="4px";J.style.position="absolute";
-J.style.marginLeft="-12px";J.style.zIndex="1";J.style.cursor="pointer";mxEvent.addListener(J,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,c){mxEvent.addListener(J,"click",function(d){q[b]=null;for(var l=0;l<f.length;l++)if(null!=f[l].data&&f[l].data==b||null!=f[l].xml&&null!=c&&f[l].xml==c.xml){f.splice(l,1);break}E.parentNode.removeChild(a);0==f.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(d)});mxEvent.addListener(J,"dblclick",
-function(a){mxEvent.consume(a)})})(E,b,g);E.appendChild(J);E.style.marginBottom="30px";var H=document.createElement("div");H.style.position="absolute";H.style.boxSizing="border-box";H.style.bottom="-18px";H.style.left="10px";H.style.right="10px";H.style.backgroundColor="#ffffff";H.style.overflow="hidden";H.style.textAlign="center";var K=null;null!=b?(K={data:b,w:p,h:e,title:B},null!=m&&(K.aspect=m),q[b]=t,f.push(K)):null!=g&&(g.aspect="fixed",f.push(g),K=g);mxEvent.addListener(H,"keydown",function(a){13==
+g||null==t[b]){var A=function(){H.innerHTML="";H.style.cursor="pointer";H.style.whiteSpace="nowrap";H.style.textOverflow="ellipsis";mxUtils.write(H,null!=K.title&&0<K.title.length?K.title:mxResources.get("untitled"));H.style.color=null==K.title||0==K.title.length?"#d0d0d0":""};u.style.backgroundImage="";v.style.display="none";var y=p,C=e;if(p>a.maxImageSize||e>a.maxImageSize){var G=Math.min(1,Math.min(a.maxImageSize/Math.max(1,p)),a.maxImageSize/Math.max(1,e));p*=G;e*=G}y>C?(C=Math.round(100*C/y),
+y=100):(y=Math.round(100*y/C),C=100);var E=document.createElement("div");E.setAttribute("draggable","true");E.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";E.style.position="relative";E.style.cursor="move";mxUtils.setPrefixedStyle(E.style,"transition","transform .1s ease-in-out");if(null!=b){var q=document.createElement("img");q.setAttribute("src",I.convert(b));q.style.width=y+"px";q.style.height=C+"px";q.style.margin="10px";q.style.paddingBottom=Math.floor((100-C)/2)+"px";q.style.paddingLeft=
+Math.floor((100-y)/2)+"px";E.appendChild(q)}else if(null!=g){var F=a.stringToCells(Graph.decompress(g.xml));0<F.length&&(a.sidebar.createThumb(F,100,100,E,null,!0,!1),E.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",E.firstChild.style.cursor="")}var J=document.createElement("img");J.setAttribute("src",Editor.closeImage);J.setAttribute("border","0");J.setAttribute("title",mxResources.get("delete"));J.setAttribute("align","top");J.style.paddingTop="4px";J.style.position="absolute";
+J.style.marginLeft="-12px";J.style.zIndex="1";J.style.cursor="pointer";mxEvent.addListener(J,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,c){mxEvent.addListener(J,"click",function(d){t[b]=null;for(var l=0;l<f.length;l++)if(null!=f[l].data&&f[l].data==b||null!=f[l].xml&&null!=c&&f[l].xml==c.xml){f.splice(l,1);break}E.parentNode.removeChild(a);0==f.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(d)});mxEvent.addListener(J,"dblclick",
+function(a){mxEvent.consume(a)})})(E,b,g);E.appendChild(J);E.style.marginBottom="30px";var H=document.createElement("div");H.style.position="absolute";H.style.boxSizing="border-box";H.style.bottom="-18px";H.style.left="10px";H.style.right="10px";H.style.backgroundColor="#ffffff";H.style.overflow="hidden";H.style.textAlign="center";var K=null;null!=b?(K={data:b,w:p,h:e,title:B},null!=m&&(K.aspect=m),t[b]=q,f.push(K)):null!=g&&(g.aspect="fixed",f.push(g),K=g);mxEvent.addListener(H,"keydown",function(a){13==
a.keyCode&&null!=D&&(D(),D=null,mxEvent.consume(a))});A();E.appendChild(H);mxEvent.addListener(H,"mousedown",function(a){"true"!=H.getAttribute("contentEditable")&&mxEvent.consume(a)});F=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var c=new FilenameDialog(a,K.title||"",mxResources.get("ok"),function(a){null!=a&&(K.title=a,A())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}else if("true"!=
H.getAttribute("contentEditable")){null!=D&&(D(),D=null);if(null==K.title||0==K.title.length)H.innerHTML="";H.style.textOverflow="";H.style.whiteSpace="";H.style.cursor="text";H.style.color="";H.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(H.style,"user-select","text");H.focus();document.execCommand("selectAll",!1,null);D=function(){H.removeAttribute("contentEditable");H.style.cursor="pointer";K.title=H.innerHTML;A()};mxEvent.consume(b)}};mxEvent.addListener(H,"click",F);mxEvent.addListener(E,
"dblclick",F);u.appendChild(E);mxEvent.addListener(E,"dragstart",function(a){null==b&&null!=g&&(J.style.visibility="hidden",H.style.visibility="hidden");mxClient.IS_FF&&null!=g.xml&&a.dataTransfer.setData("Text",g.xml);x=k(a);mxClient.IS_GC&&(E.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(E.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(E,30);J.style.visibility="";H.style.visibility=""},0)});mxEvent.addListener(E,"dragend",function(a){"hidden"==J.style.visibility&&
(J.style.visibility="",H.style.visibility="");x=null;mxUtils.setOpacity(E,100);mxUtils.setPrefixedStyle(E.style,"transform",null)})}else z||(z=!0,a.handleError({message:mxResources.get("fileExists")}));else{p=!1;try{if(y=mxUtils.parseXml(b),"mxlibrary"==y.documentElement.nodeName){C=JSON.parse(mxUtils.getTextContent(y.documentElement));if(null!=C&&0<C.length)for(var N=0;N<C.length;N++)null!=C[N].xml?n(null,null,0,0,0,0,C[N]):n(C[N].data,null,0,0,C[N].w,C[N].h,null,"fixed",C[N].title);p=!0}else if("mxfile"==
y.documentElement.nodeName){for(var Q=y.documentElement.getElementsByTagName("diagram"),N=0;N<Q.length;N++){var C=mxUtils.getTextContent(Q[N]),F=a.stringToCells(Graph.decompress(C)),aa=a.editor.graph.getBoundingBoxFromGeometry(F);n(null,null,0,0,0,0,{xml:C,w:aa.width,h:aa.height})}p=!0}}catch(fa){}p||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(fa){}return null}function m(a){a.dataTransfer.dropEffect=null!=x?"move":"copy";a.stopPropagation();a.preventDefault()}
-function t(b){b.stopPropagation();b.preventDefault();z=!1;y=k(b);if(null!=x)null!=y&&y<u.children.length?(f.splice(y>x?y-1:y,0,f.splice(x,1)[0]),u.insertBefore(u.children[x],u.children[y])):(f.push(f.splice(x,1)[0]),u.appendChild(u.children[x]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,B(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||
+function q(b){b.stopPropagation();b.preventDefault();z=!1;y=k(b);if(null!=x)null!=y&&y<u.children.length?(f.splice(y>x?y-1:y,0,f.splice(x,1)[0]),u.insertBefore(u.children[x],u.children[y])):(f.push(f.splice(x,1)[0]),u.appendChild(u.children[x]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,B(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||
/(\.png)($|\?)/i.test(c)||/(\.gif)($|\?)/i.test(c)||/(\.svg)($|\?)/i.test(c))&&a.loadImage(c,function(a){n(c,null,0,0,a.width,a.height);u.scrollTop=u.scrollHeight})}b.stopPropagation();b.preventDefault()}var f=[];d=document.createElement("div");d.style.height="100%";var l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.height="40px";d.appendChild(l);mxUtils.write(l,mxResources.get("filename")+":");null==c&&(c=a.defaultLibraryName+".xml");var p=document.createElement("input");p.setAttribute("value",
c);p.style.marginRight="20px";p.style.marginLeft="10px";p.style.width="500px";null==g||g.isRenamable()||p.setAttribute("disabled","true");this.init=function(){if(null==g||g.isRenamable())p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};l.appendChild(p);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==f.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 q={},x=null,y=null,D=null;
+u.style.overflow="auto";u.style.height="340px";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";0==f.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 t={},x=null,y=null,D=null;
c=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=D&&(D(),D=null,mxEvent.consume(a))};mxEvent.addListener(u,"mousedown",c);mxEvent.addListener(u,"pointerdown",c);mxEvent.addListener(u,"touchstart",c);var I=new mxUrlConverter,z=!1;if(null!=b)for(c=0;c<b.length;c++)l=b[c],n(l.data,null,0,0,l.w,l.h,l,l.aspect,l.title);mxEvent.addListener(u,"dragleave",function(a){v.style.cursor="";for(var b=mxEvent.getSource(a);null!=b;){if(b==u||b==v){a.stopPropagation();a.preventDefault();
-break}b=b.parentNode}});var B=function(b){return function(c,f,d,l,p,e,g,k,q){null!=q&&(/(\.vsdx)($|\?)/i.test(q.name)||/(\.vssx)($|\?)/i.test(q.name))?a.importVisio(q,mxUtils.bind(this,function(a){n(a,f,d,l,p,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," "))})):null!=q&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,q.name)?a.parseFile(q,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=c.status&&(n(c.responseText,
-f,d,l,p,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(n(c,f,d,l,p,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",m);mxEvent.addListener(u,"drop",t);mxEvent.addListener(v,"dragover",m);mxEvent.addListener(v,"drop",t);d.appendChild(u);b=document.createElement("div");b.style.textAlign="right";b.style.marginTop="20px";
+break}b=b.parentNode}});var B=function(b){return function(c,d,f,l,p,e,g,k,t){null!=t&&(/(\.vsdx)($|\?)/i.test(t.name)||/(\.vssx)($|\?)/i.test(t.name))?a.importVisio(t,mxUtils.bind(this,function(a){n(a,d,f,l,p,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," "))})):null!=t&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,t.name)?a.parseFile(t,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=c.status&&(n(c.responseText,
+d,f,l,p,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(n(c,d,f,l,p,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",m);mxEvent.addListener(u,"drop",q);mxEvent.addListener(v,"dragover",m);mxEvent.addListener(v,"drop",q);d.appendChild(u);b=document.createElement("div");b.style.textAlign="right";b.style.marginTop="20px";
c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.setAttribute("id","btnCancel");c.className="geBtn";a.editor.cancelFirst&&b.appendChild(c);l=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(f),c=p.value;/(\.xml)$/i.test(c)||(c+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")});l.setAttribute("id",
-"btnDownload");l.className="geBtn";b.appendChild(l);if(Graph.fileSupport){if(null==a.libDlgFileInputElt){var C=document.createElement("input");C.setAttribute("multiple","multiple");C.setAttribute("type","file");mxEvent.addListener(C,"change",function(b){z=!1;a.importFiles(C.files,0,0,a.maxImageSize,function(a,c,f,d,l,p,e,g,k){null!=C.files&&(B(b)(a,c,f,d,l,p,e,g,k),C.type="",C.type="file",C.value="")});u.scrollTop=u.scrollHeight});C.style.display="none";document.body.appendChild(C);a.libDlgFileInputElt=
-C}l=mxUtils.button(mxResources.get("import"),function(){null!=D&&(D(),D=null);a.libDlgFileInputElt.click()});l.setAttribute("id","btnAddImage");l.className="geBtn";b.appendChild(l)}l=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=D&&(D(),D=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){z=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var f=a.indexOf(",");0<f&&(a=a.substring(0,f)+";base64,"+a.substring(f+1))}n(a,null,0,0,b,c);u.scrollTop=u.scrollHeight}})});
-l.setAttribute("id","btnAddImageUrl");l.className="geBtn";b.appendChild(l);this.saveBtnClickHandler=function(b,c,f,d){a.saveLibrary(b,c,f,d)};l=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=D&&(D(),D=null);this.saveBtnClickHandler(p.value,f,g,e)}));l.setAttribute("id","btnSave");l.className="geBtn gePrimaryBtn";b.appendChild(l);a.editor.cancelFirst||b.appendChild(c);d.appendChild(b);this.container=d},EditShapeDialog=function(a,c,d,b,g){b=null!=b?b:300;g=null!=g?g:120;var e,
-k,n=document.createElement("table"),m=document.createElement("tbody");n.style.cellPadding="4px";e=document.createElement("tr");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";mxUtils.write(k,d);e.appendChild(k);m.appendChild(e);e=document.createElement("tr");k=document.createElement("td");var t=document.createElement("textarea");t.style.outline="none";t.style.resize="none";t.style.width=b-200+"px";t.style.height=g+"px";this.textarea=t;this.init=function(){t.focus();
-t.scrollTop=0};k.appendChild(t);e.appendChild(k);k=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);k.appendChild(d);var f=new Graph(d);f.setEnabled(!1);var l=a.editor.graph.cloneCell(c);f.addCells([l]);d=f.view.getState(l);var p="";null!=d.shape&&null!=d.shape.stencil&&(p=mxUtils.getPrettyXml(d.shape.stencil.desc));
-mxUtils.write(t,p||"");d=f.getGraphBounds();g=Math.min(160/d.width,(g-40)/d.height);f.view.scaleAndTranslate(g,20/g-d.x,20/g-d.y);e.appendChild(k);m.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.setAttribute("colspan","2");k.style.paddingTop="2px";k.style.whiteSpace="nowrap";k.setAttribute("align","right");a.isOffline()||(g=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),g.className="geBtn",
-k.appendChild(g));g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&k.appendChild(g);var u=function(b,c,f){var d=t.value,l=mxUtils.parseXml(d),d=mxUtils.getPrettyXml(l.documentElement),l=l.documentElement.getElementsByTagName("parsererror");if(null!=l&&0<l.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(f&&a.hideDialog(),l=!b.model.contains(c),!f||l||d!=p){d=Graph.compress(d);
-b.getModel().beginUpdate();try{if(l){var e=a.editor.graph.getFreeInsertPoint();c.geometry.x=e.x;c.geometry.y=e.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+d+")",[c])}catch(z){throw z;}finally{b.getModel().endUpdate()}l&&(b.setSelectionCell(c),b.scrollCellToVisible(c))}};d=mxUtils.button(mxResources.get("preview"),function(){u(f,l,!1)});d.className="geBtn";k.appendChild(d);d=mxUtils.button(mxResources.get("apply"),function(){u(a.editor.graph,c,!0)});d.className="geBtn gePrimaryBtn";
+"btnDownload");l.className="geBtn";b.appendChild(l);if(Graph.fileSupport){if(null==a.libDlgFileInputElt){var C=document.createElement("input");C.setAttribute("multiple","multiple");C.setAttribute("type","file");mxEvent.addListener(C,"change",function(b){z=!1;a.importFiles(C.files,0,0,a.maxImageSize,function(a,c,d,f,l,p,e,g,k){null!=C.files&&(B(b)(a,c,d,f,l,p,e,g,k),C.type="",C.type="file",C.value="")});u.scrollTop=u.scrollHeight});C.style.display="none";document.body.appendChild(C);a.libDlgFileInputElt=
+C}l=mxUtils.button(mxResources.get("import"),function(){null!=D&&(D(),D=null);a.libDlgFileInputElt.click()});l.setAttribute("id","btnAddImage");l.className="geBtn";b.appendChild(l)}l=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=D&&(D(),D=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){z=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var d=a.indexOf(",");0<d&&(a=a.substring(0,d)+";base64,"+a.substring(d+1))}n(a,null,0,0,b,c);u.scrollTop=u.scrollHeight}})});
+l.setAttribute("id","btnAddImageUrl");l.className="geBtn";b.appendChild(l);this.saveBtnClickHandler=function(b,c,d,f){a.saveLibrary(b,c,d,f)};l=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=D&&(D(),D=null);this.saveBtnClickHandler(p.value,f,g,e)}));l.setAttribute("id","btnSave");l.className="geBtn gePrimaryBtn";b.appendChild(l);a.editor.cancelFirst||b.appendChild(c);d.appendChild(b);this.container=d},EditShapeDialog=function(a,c,d,b,g){b=null!=b?b:300;g=null!=g?g:120;var e,
+k,n=document.createElement("table"),m=document.createElement("tbody");n.style.cellPadding="4px";e=document.createElement("tr");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";mxUtils.write(k,d);e.appendChild(k);m.appendChild(e);e=document.createElement("tr");k=document.createElement("td");var q=document.createElement("textarea");q.style.outline="none";q.style.resize="none";q.style.width=b-200+"px";q.style.height=g+"px";this.textarea=q;this.init=function(){q.focus();
+q.scrollTop=0};k.appendChild(q);e.appendChild(k);k=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);k.appendChild(d);var f=new Graph(d);f.setEnabled(!1);var l=a.editor.graph.cloneCell(c);f.addCells([l]);d=f.view.getState(l);var p="";null!=d.shape&&null!=d.shape.stencil&&(p=mxUtils.getPrettyXml(d.shape.stencil.desc));
+mxUtils.write(q,p||"");d=f.getGraphBounds();g=Math.min(160/d.width,(g-40)/d.height);f.view.scaleAndTranslate(g,20/g-d.x,20/g-d.y);e.appendChild(k);m.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.setAttribute("colspan","2");k.style.paddingTop="2px";k.style.whiteSpace="nowrap";k.setAttribute("align","right");a.isOffline()||(g=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),g.className="geBtn",
+k.appendChild(g));g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&k.appendChild(g);var u=function(b,c,d){var f=q.value,l=mxUtils.parseXml(f),f=mxUtils.getPrettyXml(l.documentElement),l=l.documentElement.getElementsByTagName("parsererror");if(null!=l&&0<l.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(d&&a.hideDialog(),l=!b.model.contains(c),!d||l||f!=p){f=Graph.compress(f);
+b.getModel().beginUpdate();try{if(l){var e=a.editor.graph.getFreeInsertPoint();c.geometry.x=e.x;c.geometry.y=e.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+f+")",[c])}catch(z){throw z;}finally{b.getModel().endUpdate()}l&&(b.setSelectionCell(c),b.scrollCellToVisible(c))}};d=mxUtils.button(mxResources.get("preview"),function(){u(f,l,!1)});d.className="geBtn";k.appendChild(d);d=mxUtils.button(mxResources.get("apply"),function(){u(a.editor.graph,c,!0)});d.className="geBtn gePrimaryBtn";
k.appendChild(d);a.editor.cancelFirst||k.appendChild(g);e.appendChild(k);m.appendChild(e);n.appendChild(m);this.container=n},CustomDialog=function(a,c,d,b,g,e,k,n){var m=document.createElement("div");m.appendChild(c);c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="center";null!=k&&c.appendChild(k);a.isOffline()||null==e||(k=mxUtils.button(mxResources.get("help"),function(){a.openLink(e)}),k.className="geBtn",c.appendChild(k));k=mxUtils.button(mxResources.get("cancel"),
function(){a.hideDialog();null!=b&&b()});k.className="geBtn";n&&(k.style.display="none");a.editor.cancelFirst&&c.appendChild(k);g=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d()});c.appendChild(g);g.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(k);m.appendChild(c);this.cancelBtn=k;this.okButton=g;this.container=m},TemplatesDialog=function(){var a='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" placeholder="'+
mxResources.get("search",null,"Search")+'"></div><div class="geTemplatesList"><div class="geTempDlgNewDiagramlbl">'+mxResources.get("newDiagram",null,"New Diagram")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+mxResources.get("templates",null,"Templates")+'</div></div><div class="geTempDlgContent"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+mxResources.get("newDiagram",null,"New Diagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+
@@ -8118,20 +8127,20 @@ mxResources.get("showAll",null,"+ Show all")+'</div></div></div><div class="geTe
mxResources.get("allDiagrams",null,"All diagrams")+'</span></div><div class="geTempDlgSpacer"> </div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall geTempDlgRadioBtnActive" data-id="tilesBtn"><img src="/images/tiles-sel.svg" class="geTempDlgTilesBtnImg"></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall" data-id="listBtn"><img src="/images/list.svg" class="geTempDlgListBtnImg"></div></div></div><div class="geTempDlgDiagramsTiles"></div></div></div><br style="clear:both;"/><div class="geTempDlgFooter"><span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">&#x1F6C8; '+
mxResources.get("linkToDiagramHint",null,"Add a link to this diagram. The diagram can only be edited from the page that owns it.")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram",null,"Link to Diagram")+'</button><div class="geTempDlgCreateBtn">'+mxResources.get("create",null,"Create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel",null,"Cancel")+"</div></div>",c=document.createElement("div");c.innerHTML=a;c.className="geTemplateDlg";
var a=window.innerWidth,d=window.innerHeight,b=987,g=712;.9*a<b&&(b=Math.max(.9*a,600),c.style.width=b+"px");.9*d<g&&(g=Math.max(.9*d,300),c.style.height=g+"px");this.width=b;this.height=g;this.container=c};
-TemplatesDialog.prototype.init=function(a,c,d,b,g,e,k,n,m,t){function f(){null!=G&&(G.style.fontWeight="normal",G.style.textDecoration="none",G=null)}function l(a,b,c,f,d,l,p){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";B.querySelector(".geTempDlgRadioBtn[data-id="+f+"]").className="geTempDlgRadioBtn "+(p?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");B.querySelector("."+b).src="/images/"+c+"-sel.svg";B.querySelector("."+d).src="/images/"+
-l+".svg";return!0}function p(a){function b(a){X.removeChild(f);B.removeChild(c);X.scrollTop=l}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var c=document.createElement("div");c.className="geTempDlgDialogMask";B.appendChild(c);var f=document.createElement("div");f.className="geTempDlgDiagramPreviewBox";var d=document.createElement("img");d.src=a;f.appendChild(d);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
-a.setAttribute("title",mxResources.get("close"));f.appendChild(a);var l=X.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(c,"click",b);X.appendChild(f);X.scrollTop=0;f.style.lineHeight=f.clientHeight+"px"}function u(a,b,c){if(null!=F){for(var f=F.className.split(" "),d=0;d<f.length;d++)if(-1<f[d].indexOf("Active")){f.splice(d,1);break}F.className=f.join(" ")}null!=a?(F=a,F.className+=" "+b,J=c,U.className="geTempDlgCreateBtn"):(J=F=null,U.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
-function v(b){if(null!=J){var f=J;J=null;U.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";f.isExternal?(1==b?t(f.url,f,"nameInput.value"):m(f.url,f,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+f.url,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(c(b.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function q(a){a=a?"":"none";for(var b=B.querySelectorAll(".geTempDlgLinkToDiagram"),c=0;c<b.length;c++)b[c].style.display=
-a}function x(a,b,c){function f(){U.innerHTML=b?mxUtils.htmlEntities(mxResources.get("create")):mxUtils.htmlEntities(mxResources.get("copy"));q(!b)}T.innerHTML="";u();N=a;var d=null;if(c){d=document.createElement("table");d.className="geTempDlgDiagramsListGrid";var l=document.createElement("tr"),e=document.createElement("th");e.style.width="50%";e.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram",null,"Diagram"));l.appendChild(e);e=document.createElement("th");e.style.width="25%";e.innerHTML=
-mxUtils.htmlEntities(mxResources.get("changedBy",null,"Changed By"));l.appendChild(e);e=document.createElement("th");e.style.width="25%";e.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn",null,"Last modified on"));l.appendChild(e);d.appendChild(l);T.appendChild(d)}for(l=0;l<a.length;l++){a[l].isExternal=!b;var g=a[l].url,e=mxUtils.htmlEntities(a[l].title),k=a[l].tooltip||a[l].title,z=a[l].imgUrl,A=mxUtils.htmlEntities(a[l].changedBy||""),n=mxUtils.htmlEntities(a[l].lastModifiedOn||
+TemplatesDialog.prototype.init=function(a,c,d,b,g,e,k,n,m,q){function f(){null!=G&&(G.style.fontWeight="normal",G.style.textDecoration="none",G=null)}function l(a,b,c,d,f,l,p){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";B.querySelector(".geTempDlgRadioBtn[data-id="+d+"]").className="geTempDlgRadioBtn "+(p?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");B.querySelector("."+b).src="/images/"+c+"-sel.svg";B.querySelector("."+f).src="/images/"+
+l+".svg";return!0}function p(a){function b(a){X.removeChild(d);B.removeChild(c);X.scrollTop=l}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var c=document.createElement("div");c.className="geTempDlgDialogMask";B.appendChild(c);var d=document.createElement("div");d.className="geTempDlgDiagramPreviewBox";var f=document.createElement("img");f.src=a;d.appendChild(f);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
+a.setAttribute("title",mxResources.get("close"));d.appendChild(a);var l=X.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(c,"click",b);X.appendChild(d);X.scrollTop=0;d.style.lineHeight=d.clientHeight+"px"}function u(a,b,c){if(null!=F){for(var d=F.className.split(" "),f=0;f<d.length;f++)if(-1<d[f].indexOf("Active")){d.splice(f,1);break}F.className=d.join(" ")}null!=a?(F=a,F.className+=" "+b,J=c,U.className="geTempDlgCreateBtn"):(J=F=null,U.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
+function v(b){if(null!=J){var d=J;J=null;U.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";d.isExternal?(1==b?q(d.url,d,"nameInput.value"):m(d.url,d,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+d.url,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(c(b.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function t(a){a=a?"":"none";for(var b=B.querySelectorAll(".geTempDlgLinkToDiagram"),c=0;c<b.length;c++)b[c].style.display=
+a}function x(a,b,c){function d(){U.innerHTML=b?mxUtils.htmlEntities(mxResources.get("create")):mxUtils.htmlEntities(mxResources.get("copy"));t(!b)}T.innerHTML="";u();N=a;var f=null;if(c){f=document.createElement("table");f.className="geTempDlgDiagramsListGrid";var l=document.createElement("tr"),e=document.createElement("th");e.style.width="50%";e.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram",null,"Diagram"));l.appendChild(e);e=document.createElement("th");e.style.width="25%";e.innerHTML=
+mxUtils.htmlEntities(mxResources.get("changedBy",null,"Changed By"));l.appendChild(e);e=document.createElement("th");e.style.width="25%";e.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn",null,"Last modified on"));l.appendChild(e);f.appendChild(l);T.appendChild(f)}for(l=0;l<a.length;l++){a[l].isExternal=!b;var g=a[l].url,e=mxUtils.htmlEntities(a[l].title),k=a[l].tooltip||a[l].title,z=a[l].imgUrl,A=mxUtils.htmlEntities(a[l].changedBy||""),n=mxUtils.htmlEntities(a[l].lastModifiedOn||
"");z||(z=TEMPLATE_PATH+"/"+g.substring(0,g.length-4)+".png");g=c?50:15;null!=e&&e.length>g&&(e=e.substring(0,g)+"&hellip;");if(c){var m=document.createElement("tr"),z=document.createElement("td"),B=document.createElement("img");B.src="/images/icon-search.svg";B.className="geTempDlgDiagramListPreviewBtn";B.setAttribute("title",mxResources.get("preview"));z.appendChild(B);k=document.createElement("span");k.className="geTempDlgDiagramTitle";k.innerHTML=e;z.appendChild(k);m.appendChild(z);z=document.createElement("td");
-z.innerHTML=A;m.appendChild(z);z=document.createElement("td");z.innerHTML=n;m.appendChild(z);d.appendChild(m);null==F&&(f(),u(m,"geTempDlgDiagramsListGridActive",a[l]));(function(a,b){mxEvent.addListener(m,"click",function(){F!=b&&(f(),u(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(m,"dblclick",v);mxEvent.addListener(B,"click",function(){p(a)})})(a[l],m)}else{var x=document.createElement("div");x.className="geTempDlgDiagramTile";x.setAttribute("title",k);null==F&&(f(),u(x,"geTempDlgDiagramTileActive",
+z.innerHTML=A;m.appendChild(z);z=document.createElement("td");z.innerHTML=n;m.appendChild(z);f.appendChild(m);null==F&&(d(),u(m,"geTempDlgDiagramsListGridActive",a[l]));(function(a,b){mxEvent.addListener(m,"click",function(){F!=b&&(d(),u(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(m,"dblclick",v);mxEvent.addListener(B,"click",function(){p(a)})})(a[l],m)}else{var x=document.createElement("div");x.className="geTempDlgDiagramTile";x.setAttribute("title",k);null==F&&(d(),u(x,"geTempDlgDiagramTileActive",
a[l]));A=document.createElement("div");A.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var y=document.createElement("img");y.style.display="none";(function(a,b){y.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};y.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(y,A);y.src=z;A.appendChild(y);x.appendChild(A);A=document.createElement("div");A.className="geTempDlgDiagramTileLbl";A.innerHTML=null!=e?e:"";x.appendChild(A);
-B=document.createElement("img");B.src="/images/icon-search.svg";B.className="geTempDlgDiagramPreviewBtn";B.setAttribute("title",mxResources.get("preview"));x.appendChild(B);(function(a,b){mxEvent.addListener(x,"click",function(){F!=b&&(f(),u(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(x,"dblclick",v);mxEvent.addListener(B,"click",function(){p(a)})})(a[l],x);T.appendChild(x)}}}function y(a,b){ea.innerHTML="";u();for(var c=!b&&5<a.length?5:a.length,f=0;f<c;f++){var d=a[f];d.isCategory=
-!0;var l=document.createElement("div"),p=mxResources.get(d.title);null==p&&(p=d.title.substring(0,1).toUpperCase()+d.title.substring(1));l.className="geTempDlgNewDiagramCatItem";l.setAttribute("title",p);p=mxUtils.htmlEntities(p);15<p.length&&(p=p.substring(0,15)+"&hellip;");null==F&&(U.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),q(),u(l,"geTempDlgNewDiagramCatItemActive",d));var e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemImg";var g=document.createElement("img");
-g.src=NEW_DIAGRAM_CATS_PATH+"/"+d.img;e.appendChild(g);l.appendChild(e);e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemLbl";e.innerHTML=p;l.appendChild(e);ea.appendChild(l);(function(a,b){mxEvent.addListener(l,"click",function(){F!=b&&(U.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),q(),u(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(l,"dblclick",v)})(d,l)}Y.style.display=5>a.length?"none":""}function D(a){var b=B.querySelector(".geTemplatesList"),
-c;for(c in a){var f=document.createElement("div"),d=mxResources.get(c),l=a[c];null==d&&(d=c.substring(0,1).toUpperCase()+c.substring(1));f.className="geTemplateCatLink";f.setAttribute("title",d+" ("+l.length+")");d=mxUtils.htmlEntities(d);15<d.length&&(d=d.substring(0,15)+"&hellip;");f.innerHTML=d+" ("+l.length+")";b.appendChild(f);(function(b,c,d){mxEvent.addListener(f,"click",function(){G!=d&&(null!=G?(G.style.fontWeight="normal",G.style.textDecoration="none"):(ca.style.display="none",ga.style.minHeight=
-"100%"),G=d,G.style.fontWeight="bold",G.style.textDecoration="underline",X.scrollTop=0,C&&(A=!0),L.innerHTML=c,V.style.display="none",x(a[b],!0))})})(c,d,f)}}function I(a){k&&(X.scrollTop=0,T.innerHTML="",Z.spin(T),A=!1,C=!0,L.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag",null,"Recent Diagrams")),Q=null,k(O,a?null:e))}function z(a){f();X.scrollTop=0;T.innerHTML="";Z.spin(T);A=!1;C=!0;da=null;L.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults",null,"Search Results"))+' "'+
+B=document.createElement("img");B.src="/images/icon-search.svg";B.className="geTempDlgDiagramPreviewBtn";B.setAttribute("title",mxResources.get("preview"));x.appendChild(B);(function(a,b){mxEvent.addListener(x,"click",function(){F!=b&&(d(),u(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(x,"dblclick",v);mxEvent.addListener(B,"click",function(){p(a)})})(a[l],x);T.appendChild(x)}}}function y(a,b){ea.innerHTML="";u();for(var c=!b&&5<a.length?5:a.length,d=0;d<c;d++){var f=a[d];f.isCategory=
+!0;var l=document.createElement("div"),p=mxResources.get(f.title);null==p&&(p=f.title.substring(0,1).toUpperCase()+f.title.substring(1));l.className="geTempDlgNewDiagramCatItem";l.setAttribute("title",p);p=mxUtils.htmlEntities(p);15<p.length&&(p=p.substring(0,15)+"&hellip;");null==F&&(U.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),t(),u(l,"geTempDlgNewDiagramCatItemActive",f));var e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemImg";var g=document.createElement("img");
+g.src=NEW_DIAGRAM_CATS_PATH+"/"+f.img;e.appendChild(g);l.appendChild(e);e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemLbl";e.innerHTML=p;l.appendChild(e);ea.appendChild(l);(function(a,b){mxEvent.addListener(l,"click",function(){F!=b&&(U.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),t(),u(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(l,"dblclick",v)})(f,l)}Y.style.display=5>a.length?"none":""}function D(a){var b=B.querySelector(".geTemplatesList"),
+c;for(c in a){var d=document.createElement("div"),f=mxResources.get(c),l=a[c];null==f&&(f=c.substring(0,1).toUpperCase()+c.substring(1));d.className="geTemplateCatLink";d.setAttribute("title",f+" ("+l.length+")");f=mxUtils.htmlEntities(f);15<f.length&&(f=f.substring(0,15)+"&hellip;");d.innerHTML=f+" ("+l.length+")";b.appendChild(d);(function(b,c,f){mxEvent.addListener(d,"click",function(){G!=f&&(null!=G?(G.style.fontWeight="normal",G.style.textDecoration="none"):(ca.style.display="none",ga.style.minHeight=
+"100%"),G=f,G.style.fontWeight="bold",G.style.textDecoration="underline",X.scrollTop=0,C&&(A=!0),L.innerHTML=c,V.style.display="none",x(a[b],!0))})})(c,f,d)}}function I(a){k&&(X.scrollTop=0,T.innerHTML="",Z.spin(T),A=!1,C=!0,L.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag",null,"Recent Diagrams")),Q=null,k(O,a?null:e))}function z(a){f();X.scrollTop=0;T.innerHTML="";Z.spin(T);A=!1;C=!0;da=null;L.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults",null,"Search Results"))+' "'+
mxUtils.htmlEntities(a)+'"';n(a,O,E?null:e);Q=a}b=null!=b?b:TEMPLATE_PATH+"/index.xml";g=null!=g?g:NEW_DIAGRAM_CATS_PATH+"/index.xml";var B=this.container,C=!1,A=!1,G=null,F=null,J=null,H=!1,E=!0,K=!1,N=[],Q,Y=B.querySelector(".geTempDlgShowAllBtn"),T=B.querySelector(".geTempDlgDiagramsTiles"),L=B.querySelector(".geTempDlgDiagramsListTitle"),V=B.querySelector(".geTempDlgDiagramsListBtns"),X=B.querySelector(".geTempDlgContent"),ga=B.querySelector(".geTempDlgDiagramsList"),ca=B.querySelector(".geTempDlgNewDiagramCat"),
ea=B.querySelector(".geTempDlgNewDiagramCatList"),U=B.querySelector(".geTempDlgCreateBtn"),Z=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(B.querySelector(".geTempDlgNewDiagramlbl"),"click",function(){f();ca.style.display="";ga.style.minHeight="calc(100% - 280px)";I(E)});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){l(this,"geTempDlgAllDiagramsBtnImg",
"all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(E=!0,null==Q?I(E):z(Q))});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){l(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(E=!1,null==Q?I(E):z(Q))});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){l(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg",
@@ -8141,18 +8150,18 @@ a.nextSibling}D(aa)}});mxUtils.get(g,function(a){if(!ba){ba=!0;for(a=a.getXml().
x(a,!1,K)};I(E);var da=null;n&&mxEvent.addListener(B.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=da&&clearTimeout(da);13==a.keyCode?z(b.value):da=setTimeout(function(){z(b.value)},500)});mxEvent.addListener(U,"click",v);mxEvent.addListener(B.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){v(!0)});mxEvent.addListener(B.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=d&&d();a.hideDialog(!0)})};
var BtnDialog=function(a,c,d,b){var g=document.createElement("div");g.style.textAlign="center";var e=document.createElement("p");e.style.fontSize="16pt";e.style.padding="0px";e.style.margin="0px";e.style.color="gray";mxUtils.write(e,mxResources.get("done"));var k="Unknown",n=document.createElement("img");n.setAttribute("border","0");n.setAttribute("align","absmiddle");n.style.marginRight="10px";c==a.drive?(k=mxResources.get("googleDrive"),n.src=IMAGE_PATH+"/google-drive-logo-white.svg"):c==a.dropbox?
(k=mxResources.get("dropbox"),n.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive?(k=mxResources.get("oneDrive"),n.src=IMAGE_PATH+"/onedrive-logo-white.svg"):c==a.gitHub?(k=mxResources.get("github"),n.src=IMAGE_PATH+"/github-logo-white.svg"):c==a.gitLab?(k=mxResources.get("gitlab"),n.src=IMAGE_PATH+"/gitlab-logo.svg"):c==a.trello&&(k=mxResources.get("trello"),n.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizedIn",[k],"You are now authorized in {1}"));
-d=mxUtils.button(d,b);d.insertBefore(n,d.firstChild);d.style.marginTop="6px";d.className="geBigButton";d.style.fontSize="18px";d.style.padding="14px";g.appendChild(e);g.appendChild(a);g.appendChild(d);this.container=g},FontDialog=function(a,c,d,b,g){function e(a){this.style.border="";13==a.keyCode&&D.click()}var k,n,m,t=document.createElement("table"),f=document.createElement("tbody");t.style.marginTop="8px";k=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.whiteSpace=
+d=mxUtils.button(d,b);d.insertBefore(n,d.firstChild);d.style.marginTop="6px";d.className="geBigButton";d.style.fontSize="18px";d.style.padding="14px";g.appendChild(e);g.appendChild(a);g.appendChild(d);this.container=g},FontDialog=function(a,c,d,b,g){function e(a){this.style.border="";13==a.keyCode&&D.click()}var k,n,m,q=document.createElement("table"),f=document.createElement("tbody");q.style.marginTop="8px";k=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.whiteSpace=
"nowrap";n.style.fontSize="10pt";n.style.fontWeight="bold";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";l.setAttribute("value","sysfonts");l.setAttribute("type","radio");l.setAttribute("name","current-fontdialog");l.setAttribute("id","fontdialog-sysfonts");n.appendChild(l);m=document.createElement("label");m.setAttribute("for","fontdialog-sysfonts");mxUtils.write(m,mxResources.get("sysFonts",null,"System Fonts"));n.appendChild(m);k.appendChild(n);f.appendChild(k);
k=document.createElement("tr");n=document.createElement("td");n.style.whiteSpace="nowrap";n.style.fontSize="10pt";n.style.width="120px";n.style.paddingLeft="15px";mxUtils.write(n,mxResources.get("fontname",null,"Font Name")+":");k.appendChild(n);var p=document.createElement("input");"s"==b&&p.setAttribute("value",c);p.style.marginLeft="4px";p.style.width="250px";p.className="dlg_fontName_s";n=document.createElement("td");n.appendChild(p);k.appendChild(n);f.appendChild(k);k=document.createElement("tr");
n=document.createElement("td");n.colSpan=2;n.style.whiteSpace="nowrap";n.style.fontSize="10pt";n.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");n.appendChild(u);m=document.createElement("label");m.setAttribute("for","fontdialog-googlefonts");mxUtils.write(m,mxResources.get("googleFonts",
null,"Google Fonts"));n.appendChild(m);k.appendChild(n);f.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.style.whiteSpace="nowrap";n.style.fontSize="10pt";n.style.width="120px";n.style.paddingLeft="15px";mxUtils.write(n,mxResources.get("fontname",null,"Font Name")+":");k.appendChild(n);var v=document.createElement("input");"g"==b&&v.setAttribute("value",c);v.style.marginLeft="4px";v.style.width="250px";v.className="dlg_fontName_g";n=document.createElement("td");n.appendChild(v);
-k.appendChild(n);f.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.whiteSpace="nowrap";n.style.fontSize="10pt";n.style.fontWeight="bold";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","webfonts");q.setAttribute("type","radio");q.setAttribute("name","current-fontdialog");q.setAttribute("id","fontdialog-webfonts");n.appendChild(q);m=document.createElement("label");m.setAttribute("for",
+k.appendChild(n);f.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.whiteSpace="nowrap";n.style.fontSize="10pt";n.style.fontWeight="bold";var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","webfonts");t.setAttribute("type","radio");t.setAttribute("name","current-fontdialog");t.setAttribute("id","fontdialog-webfonts");n.appendChild(t);m=document.createElement("label");m.setAttribute("for",
"fontdialog-webfonts");mxUtils.write(m,mxResources.get("webfonts",null,"Web Fonts"));n.appendChild(m);k.appendChild(n);f.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.style.whiteSpace="nowrap";n.style.fontSize="10pt";n.style.width="120px";n.style.paddingLeft="15px";mxUtils.write(n,mxResources.get("fontname",null,"Font Name")+":");k.appendChild(n);var x=document.createElement("input");"w"==b&&x.setAttribute("value",c);x.style.marginLeft="4px";x.style.width="250px";
x.className="dlg_fontName_w";n=document.createElement("td");n.appendChild(x);k.appendChild(n);f.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.style.whiteSpace="nowrap";n.style.fontSize="10pt";n.style.width="120px";n.style.paddingLeft="15px";mxUtils.write(n,mxResources.get("fontUrl",null,"Font URL")+":");k.appendChild(n);var y=document.createElement("input");y.setAttribute("value",d||"");y.style.marginLeft="4px";y.style.width="250px";y.className="dlg_fontUrl";n=document.createElement("td");
n.appendChild(y);k.appendChild(n);f.appendChild(k);this.init=function(){var a=p;"g"==b?a=v:"w"==b&&(a=x);a.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?a.select():document.execCommand("selectAll",!1,null)};k=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="20px";n.style.whiteSpace="nowrap";n.setAttribute("align","right");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&
-n.appendChild(c);var D=mxUtils.button(mxResources.get("apply"),function(){var b,c,f;l.checked?(b=p.value,f="s"):u.checked?(b=v.value,c=Editor.GOOGLE_FONTS+encodeURIComponent(b).replace(/%20/g,"+"),f="g"):q.checked&&(b=x.value,c=y.value,f="w");var d;d=c;var e=f,k=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==b||0==b.length?(t.querySelector(".dlg_fontName_"+e).style.border="1px solid red",d=!1):"w"!=e||k.test(d)?d=!0:(t.querySelector(".dlg_fontUrl").style.border=
-"1px solid red",d=!1);d&&(g(b,c,f),a.hideDialog())});D.className="geBtn gePrimaryBtn";mxEvent.addListener(p,"keypress",e);mxEvent.addListener(v,"keypress",e);mxEvent.addListener(x,"keypress",e);mxEvent.addListener(y,"keypress",e);mxEvent.addListener(p,"focus",function(){l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(v,"focus",function(){u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(x,"focus",function(){q.setAttribute("checked","checked");q.checked=
-!0});mxEvent.addListener(y,"focus",function(){q.setAttribute("checked","checked");q.checked=!0});n.appendChild(D);a.editor.cancelFirst||n.appendChild(c);k.appendChild(n);f.appendChild(k);t.appendChild(f);this.container=t};
+n.appendChild(c);var D=mxUtils.button(mxResources.get("apply"),function(){var b,c,d;l.checked?(b=p.value,d="s"):u.checked?(b=v.value,c=Editor.GOOGLE_FONTS+encodeURIComponent(b).replace(/%20/g,"+"),d="g"):t.checked&&(b=x.value,c=y.value,d="w");var f;f=c;var e=d,k=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==b||0==b.length?(q.querySelector(".dlg_fontName_"+e).style.border="1px solid red",f=!1):"w"!=e||k.test(f)?f=!0:(q.querySelector(".dlg_fontUrl").style.border=
+"1px solid red",f=!1);f&&(g(b,c,d),a.hideDialog())});D.className="geBtn gePrimaryBtn";mxEvent.addListener(p,"keypress",e);mxEvent.addListener(v,"keypress",e);mxEvent.addListener(x,"keypress",e);mxEvent.addListener(y,"keypress",e);mxEvent.addListener(p,"focus",function(){l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(v,"focus",function(){u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(x,"focus",function(){t.setAttribute("checked","checked");t.checked=
+!0});mxEvent.addListener(y,"focus",function(){t.setAttribute("checked","checked");t.checked=!0});n.appendChild(D);a.editor.cancelFirst||n.appendChild(c);k.appendChild(n);f.appendChild(k);q.appendChild(f);this.container=q};
function AspectDialog(a,c,d,b,g){this.aspect={pageId:c||a.pages[0].getId(),layerIds:d||[]};c=document.createElement("div");var e=document.createElement("h5");e.style.margin="0 0 10px";mxUtils.write(e,mxResources.get("pages"));c.appendChild(e);d=document.createElement("div");d.className="geAspectDlgList";c.appendChild(d);e=document.createElement("h5");e.style.margin="0 0 10px";mxUtils.write(e,mxResources.get("layers"));c.appendChild(e);e=document.createElement("div");e.className="geAspectDlgList";
c.appendChild(e);this.pagesContainer=d;this.layersContainer=e;this.ui=a;d=document.createElement("div");d.style.marginTop="16px";d.style.textAlign="center";e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});e.className="geBtn";a.editor.cancelFirst&&d.appendChild(e);var k=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){a.hideDialog();b({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));d.appendChild(k);k.className="geBtn gePrimaryBtn";
a.editor.cancelFirst||d.appendChild(e);k.setAttribute("disabled","disabled");this.okBtn=k;c.appendChild(d);this.container=c}AspectDialog.prototype.init=function(){for(var a=0;a<this.ui.pages.length;a++){var c=this.ui.updatePageRoot(this.ui.pages[a]);this.createPageItem(c.getId(),c.getName(),c.node,c.root)}};
@@ -8184,53 +8193,53 @@ defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectangle
dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1.5,isVisible:function(a){return"1"==mxUtils.getValue(a.style,"comic","0")}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"collapsible",dispName:"Collapsible",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1},{name:"recursiveResize",
dispName:"Resize Children",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{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:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(a,b){return 0<a.vertices.length&&b.editorUi.editor.graph.isContainer(a.vertices[0])}}];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## 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## 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## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\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\nEvan 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-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan 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\nRon Donovan,System Admin,rdo,Office 3,Evan 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\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
-Editor.fastCompress=function(a){return null==a||0==a.length||"undefined"===typeof pako?a:pako.deflateRaw(a,{to:"string"})};Editor.fastDecompress=function(a){return null==a||0==a.length||"undefined"===typeof pako?a:pako.inflateRaw(a,{to:"string"})};Editor.extractGraphModel=function(a,b){if(null!=a&&"undefined"!==typeof pako){var c=a.ownerDocument.getElementsByTagName("div"),f=[];if(null!=c&&0<c.length)for(var d=0;d<c.length;d++)if("mxgraph"==c[d].getAttribute("class")){f.push(c[d]);break}0<f.length&&
-(c=f[0].getAttribute("data-mxgraph"),null!=c?(f=JSON.parse(c),null!=f&&null!=f.xml&&(f=mxUtils.parseXml(f.xml),a=f.documentElement)):(f=f[0].getElementsByTagName("div"),0<f.length&&(c=mxUtils.getTextContent(f[0]),c=Graph.decompress(c),0<c.length&&(f=mxUtils.parseXml(c),a=f.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(c=a.getAttribute("content"),null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),
-null!=c&&0<c.length)a=mxUtils.parseXml(c).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||b||(f=null,"diagram"==a.nodeName?f=a:"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),0<c.length&&(f=c[Math.max(0,Math.min(c.length-1,urlParams.page||0))])),null!=f&&(a=Editor.parseDiagramNode(f)));null==a||"mxGraphModel"==a.nodeName||b&&"mxfile"==a.nodeName||(a=null);return a};Editor.parseDiagramNode=function(a){var b=mxUtils.trim(mxUtils.getTextContent(a)),c=null;0<
+Editor.fastCompress=function(a){return null==a||0==a.length||"undefined"===typeof pako?a:pako.deflateRaw(a,{to:"string"})};Editor.fastDecompress=function(a){return null==a||0==a.length||"undefined"===typeof pako?a:pako.inflateRaw(a,{to:"string"})};Editor.extractGraphModel=function(a,b){if(null!=a&&"undefined"!==typeof pako){var c=a.ownerDocument.getElementsByTagName("div"),d=[];if(null!=c&&0<c.length)for(var f=0;f<c.length;f++)if("mxgraph"==c[f].getAttribute("class")){d.push(c[f]);break}0<d.length&&
+(c=d[0].getAttribute("data-mxgraph"),null!=c?(d=JSON.parse(c),null!=d&&null!=d.xml&&(d=mxUtils.parseXml(d.xml),a=d.documentElement)):(d=d[0].getElementsByTagName("div"),0<d.length&&(c=mxUtils.getTextContent(d[0]),c=Graph.decompress(c),0<c.length&&(d=mxUtils.parseXml(c),a=d.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(c=a.getAttribute("content"),null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),
+null!=c&&0<c.length)a=mxUtils.parseXml(c).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||b||(d=null,"diagram"==a.nodeName?d=a:"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),0<c.length&&(d=c[Math.max(0,Math.min(c.length-1,urlParams.page||0))])),null!=d&&(a=Editor.parseDiagramNode(d)));null==a||"mxGraphModel"==a.nodeName||b&&"mxfile"==a.nodeName||(a=null);return a};Editor.parseDiagramNode=function(a){var b=mxUtils.trim(mxUtils.getTextContent(a)),c=null;0<
b.length?(a=Graph.decompress(b),null!=a&&0<a.length&&(c=mxUtils.parseXml(a).documentElement)):(a=mxUtils.getChildNodes(a),0<a.length&&(c=mxUtils.createXmlDocument(),c.appendChild(c.importNode(a[0],!0)),c=c.documentElement));return c};Editor.getDiagramNodeXml=function(a){var b=mxUtils.getTextContent(a),c=null;0<b.length?c=Graph.decompress(b):null!=a.firstChild&&(c=mxUtils.getXml(a.firstChild));return c};Editor.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),
-f=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(f,mxUtils.bind(this,function(a,c,d){a=f.substring(a+8,a+8+d);"zTXt"==c?(d=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,d)&&(a=pako.inflateRaw(a.substring(d+2),{to:"string"}).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(H){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));
-null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};Editor.extractParserError=function(a,b){var c=null,f=null!=a?a.getElementsByTagName("parsererror"):null;null!=f&&0<f.length&&(c=b||mxResources.get("invalidChars"),f=f[0].getElementsByTagName("div"),0<f.length&&(c=mxUtils.getTextContent(f[0])));return c};Editor.configure=function(a,b){if(null!=a){Editor.config=a;Editor.configVersion=a.version;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
+d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,f){a=d.substring(a+8,a+8+f);"zTXt"==c?(f=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,f)&&(a=pako.inflateRaw(a.substring(f+2),{to:"string"}).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(H){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));
+null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};Editor.extractParserError=function(a,b){var c=null,d=null!=a?a.getElementsByTagName("parsererror"):null;null!=d&&0<d.length&&(c=b||mxResources.get("invalidChars"),d=d[0].getElementsByTagName("div"),0<d.length&&(c=mxUtils.getTextContent(d[0])));return c};Editor.configure=function(a,b){if(null!=a){Editor.config=a;Editor.configVersion=a.version;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=a.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=a.autosaveDelay||DrawioFile.prototype.autosaveDelay;null!=a.templateFile&&(EditorUi.templateFile=a.templateFile);null!=a.globalVars&&
(Editor.globalVars=a.globalVars);null!=a.compressXml&&(Editor.compressXml=a.compressXml);a.customFonts&&(Menus.prototype.defaultFonts=a.customFonts.concat(Menus.prototype.defaultFonts));a.customPresetColors&&(ColorDialog.prototype.presetColors=a.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=a.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=a.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=a.css){var c=document.createElement("style");
-c.setAttribute("type","text/css");c.appendChild(document.createTextNode(a.css));var f=document.getElementsByTagName("script")[0];f.parentNode.insertBefore(c,f)}null!=a.libraries&&(Sidebar.prototype.customEntries=a.libraries);null!=a.enabledLibraries&&(Sidebar.prototype.enabledLibraries=a.enabledLibraries);null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=a.defaultCustomLibraries);null!=a.enableCustomLibraries&&
+c.setAttribute("type","text/css");c.appendChild(document.createTextNode(a.css));var d=document.getElementsByTagName("script")[0];d.parentNode.insertBefore(c,d)}null!=a.libraries&&(Sidebar.prototype.customEntries=a.libraries);null!=a.enabledLibraries&&(Sidebar.prototype.enabledLibraries=a.enabledLibraries);null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=a.defaultCustomLibraries);null!=a.enableCustomLibraries&&
(Editor.enableCustomLibraries=a.enableCustomLibraries);null!=a.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=a.defaultVertexStyle);null!=a.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=a.defaultEdgeStyle);a.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=a.emptyDiagramXml);a.thumbWidth&&(Sidebar.prototype.thumbWidth=a.thumbWidth);a.thumbHeight&&(Sidebar.prototype.thumbHeight=a.thumbHeight);a.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=a.emptyLibraryXml);a.sidebarWidth&&
-(EditorUi.prototype.hsplitPosition=a.sidebarWidth);a.fontCss&&(c=document.createElement("style"),c.setAttribute("type","text/css"),c.appendChild(document.createTextNode(a.fontCss)),f=document.getElementsByTagName("script")[0],f.parentNode.insertBefore(c,f),Editor.prototype.fontCss=a.fontCss);null!=a.autosaveDelay&&(c=parseInt(a.autosaveDelay),!isNaN(c)&&0<c?DrawioFile.prototype.autosaveDelay=c:EditorUi.debug("Invalid autosaveDelay: "+a.autosaveDelay));if(null!=a.plugins&&!b)for(App.initPluginCallback(),
+(EditorUi.prototype.hsplitPosition=a.sidebarWidth);a.fontCss&&(c=document.createElement("style"),c.setAttribute("type","text/css"),c.appendChild(document.createTextNode(a.fontCss)),d=document.getElementsByTagName("script")[0],d.parentNode.insertBefore(c,d),Editor.prototype.fontCss=a.fontCss);null!=a.autosaveDelay&&(c=parseInt(a.autosaveDelay),!isNaN(c)&&0<c?DrawioFile.prototype.autosaveDelay=c:EditorUi.debug("Invalid autosaveDelay: "+a.autosaveDelay));if(null!=a.plugins&&!b)for(App.initPluginCallback(),
c=0;c<a.plugins.length;c++)mxscript(a.plugins[c])}};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(a){a=null!=a?a:Editor.GUID_LENGTH;for(var b=[],c=0;c<a;c++)b.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return b.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!1;Editor.prototype.editButtonLink=
-null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(b){b=null!=b&&"mxlibrary"!=b.nodeName?this.extractGraphModel(b):null;if(null!=b){var c=b.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"==b.nodeName){c=b.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&&(d=new mxCodec(f.ownerDocument),d.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 d=new mxCodec(f.ownerDocument);d.decode(f,this.graph.getStylesheet())}this.graph.currentStyle=c;this.graph.mathEnabled="1"==urlParams.math||
+null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(b){b=null!=b&&"mxlibrary"!=b.nodeName?this.extractGraphModel(b):null;if(null!=b){var c=b.getElementsByTagName("parsererror");if(null!=c&&0<c.length){var c=c[0],d=c.getElementsByTagName("div");null!=d&&0<d.length&&(c=d[0]);throw{message:mxUtils.getTextContent(c)};}if("mxGraphModel"==b.nodeName){c=b.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=
+c&&""!=c)c!=this.graph.currentStyle&&(d=null!=this.graph.themes?this.graph.themes[c]:mxUtils.load(STYLE_PATH+"/"+c+".xml").getDocumentElement(),null!=d&&(f=new mxCodec(d.ownerDocument),f.decode(d,this.graph.getStylesheet())));else if(d=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=d){var f=new mxCodec(d.ownerDocument);f.decode(d,this.graph.getStylesheet())}this.graph.currentStyle=c;this.graph.mathEnabled="1"==urlParams.math||
"1"==b.getAttribute("math");c=b.getAttribute("backgroundImage");null!=c?(c=JSON.parse(c),this.graph.setBackgroundImage(new mxImage(c.src,c.width,c.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==b.getAttribute("shadow"),!1);if(c=
-b.getAttribute("extFonts"))try{for(c=c.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}}),f=0;f<c.length;f++)this.graph.addExtFont(c[f].name,c[f].url)}catch(H){console.log("ExtFonts format error: "+H.message)}}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var c=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var b=c.apply(this,arguments);null!=this.graph.currentStyle&&
-"default-style2"!=this.graph.currentStyle&&b.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));b.setAttribute("math",this.graph.mathEnabled?"1":"0");b.setAttribute("shadow",this.graph.shadowVisible?"1":"0");if(null!=this.graph.extFonts&&0<this.graph.extFonts.length){var f=this.graph.extFonts.map(function(a){return a.name+"^"+a.url});b.setAttribute("extFonts",f.join("|"))}return b};Editor.prototype.isDataSvg=
+b.getAttribute("extFonts"))try{for(c=c.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}}),d=0;d<c.length;d++)this.graph.addExtFont(c[d].name,c[d].url)}catch(H){console.log("ExtFonts format error: "+H.message)}}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var c=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var b=c.apply(this,arguments);null!=this.graph.currentStyle&&
+"default-style2"!=this.graph.currentStyle&&b.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));b.setAttribute("math",this.graph.mathEnabled?"1":"0");b.setAttribute("shadow",this.graph.shadowVisible?"1":"0");if(null!=this.graph.extFonts&&0<this.graph.extFonts.length){var d=this.graph.extFonts.map(function(a){return a.name+"^"+a.url});b.setAttribute("extFonts",d.join("|"))}return b};Editor.prototype.isDataSvg=
function(a){try{var b=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=b&&(null!=b&&"<"!=b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)),null!=b&&0<b.length)){var c=mxUtils.parseXml(b).documentElement;return"mxfile"==c.nodeName||"mxGraphModel"==c.nodeName}}catch(J){}return!1};Editor.prototype.extractGraphModel=function(a,b){return Editor.extractGraphModel.apply(this,arguments)};var d=Editor.prototype.resetGraph;
Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();d.apply(this,arguments)};var b=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){b.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.initMath=function(a,b){a=null!=a?a:DRAW_MATH_URL+"/MathJax.js?config=TeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){window.setTimeout(function(){"hidden"!=a.style.visibility&&MathJax.Hub.Queue(["Typeset",
MathJax.Hub,a])},0)};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(b||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],"HTML-CSS":{imageFont:null},TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=
0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var c=Editor.prototype.init;Editor.prototype.init=function(){c.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,b){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&
-Editor.MathJaxRender(this.graph.container)}))};var f=document.getElementsByTagName("script");if(null!=f&&0<f.length){var d=document.createElement("script");d.type="text/javascript";d.src=a;f[0].parentNode.appendChild(d)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;var b=
-[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,c,f,d){void 0!==c?b.push(c.replace(/\\'/g,"'")):void 0!==f?b.push(f.replace(/\\"/g,'"')):void 0!==d&&b.push(d);return""});/,\s*$/.test(a)&&b.push("");return b};Editor.prototype.isCorsEnabledForUrl=function(a){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));
+Editor.MathJaxRender(this.graph.container)}))};var d=document.getElementsByTagName("script");if(null!=d&&0<d.length){var f=document.createElement("script");f.type="text/javascript";f.src=a;d[0].parentNode.appendChild(f)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;var b=
+[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,c,d,f){void 0!==c?b.push(c.replace(/\\'/g,"'")):void 0!==d?b.push(d.replace(/\\"/g,'"')):void 0!==f&&b.push(f);return""});/,\s*$/.test(a)&&b.push("");return b};Editor.prototype.isCorsEnabledForUrl=function(a){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(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.blob.core.windows.net\//.test(a)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};Editor.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,
-c=this;a.convert=function(f){if(null!=f){var d="http://"==f.substring(0,7)||"https://"==f.substring(0,8);d&&!navigator.onLine?f=EditorUi.prototype.svgBrokenImage.src:!d||f.substring(0,a.baseUrl.length)==a.baseUrl||EditorUi.prototype.crossOriginImages&&c.isCorsEnabledForUrl(f)?"chrome-extension://"==f.substring(0,19)||mxClient.IS_CHROMEAPP||(f=b.apply(this,arguments)):f=PROXY_URL+"?url="+encodeURIComponent(f)}return f};return a};Editor.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+
-btoa(unescape(encodeURIComponent(a)))};Editor.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(EditorUi.prototype.svgBrokenImage.src)});else{var c=new Image;EditorUi.prototype.crossOriginImages&&(c.crossOrigin="anonymous");c.onload=function(){var a=document.createElement("canvas"),f=a.getContext("2d");a.height=c.height;a.width=c.width;f.drawImage(c,0,0);try{b(a.toDataURL())}catch(E){b(EditorUi.prototype.svgBrokenImage.src)}};
-c.onerror=function(){b(EditorUi.prototype.svgBrokenImage.src)};c.src=a}};Editor.prototype.convertImages=function(a,b,c,f){null==f&&(f=this.createImageUrlConverter());var d=0,l=c||{};c=mxUtils.bind(this,function(c,p){for(var e=a.getElementsByTagName(c),g=0;g<e.length;g++)mxUtils.bind(this,function(c){var e=f.convert(c.getAttribute(p));if(null!=e&&"data:"!=e.substring(0,5)){var g=l[e];null==g?(d++,this.convertImageToDataUri(e,function(f){null!=f&&(l[e]=f,c.setAttribute(p,f));d--;0==d&&b(a)})):c.setAttribute(p,
-g)}else null!=e&&c.setAttribute(p,e)})(e[g])});c("image","xlink:href");c("img","src");0==d&&b(a)};Editor.prototype.base64Encode=function(a){for(var b="",c=0,f=a.length,d,l,p;c<f;){d=a.charCodeAt(c++)&255;if(c==f){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);b+="==";break}l=a.charCodeAt(c++);if(c==f){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>
-2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(l&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2);b+="=";break}p=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(l&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2|(p&192)>>6);
-b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(p&63)}return b};Editor.prototype.loadUrl=function(a,b,c,f,d,l){try{var p=f||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);d=null!=d?d:!0;var e=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var f=a.getText();if(p){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=
-mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),d=0;d<a.length;d++)f[d]=String.fromCharCode(a[d]);f=f.join("")}l=null!=l?l:"data:image/png;base64,";f=l+this.base64Encode(f)}b(f)}}else null!=c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},p,this.timeout,function(){d&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:e})})});e()}catch(Q){null!=c&&c(Q)}};Editor.prototype.loadFonts=function(a){if(null!=this.fontCss&&null==this.resolvedFontCss){var b=
-function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},c=this.fontCss.split("url("),f=0,d={},l=mxUtils.bind(this,function(){if(0==f){for(var l=[c[0]],p=1;p<c.length;p++){var e=c[p].indexOf(")");l.push('url("');l.push(d[b(c[p].substring(0,e))]);l.push('"'+c[p].substring(e))}this.resolvedFontCss=l.join("");a()}});if(0<c.length)for(var p=1;p<c.length;p++){var e=c[p].indexOf(")"),g=null,k=c[p].indexOf("format(",e);0<k&&(g=b(c[p].substring(k+7,c[p].indexOf(")",
-k))));mxUtils.bind(this,function(a){if(null==d[a]){d[a]=a;f++;var b="application/x-font-ttf";if("svg"==g||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==g||"embedded-opentype"==g||/(\.otf)($|\?)/i.test(a))b="application/x-font-opentype";else if("woff"==g||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==g||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==g||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==g||/(\.sfnt)($|\?)/i.test(a))b=
-"application/font-sfnt";var c=a;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){d[a]=b;f--;l()}),mxUtils.bind(this,function(a){f--;l()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[p].substring(0,e)),g)}}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var b=document.getElementsByTagName("style"),c=0;c<b.length;c++)0<mxUtils.getTextContent(b[c]).indexOf("MathJax")&&
+c=this;a.convert=function(d){if(null!=d){var f="http://"==d.substring(0,7)||"https://"==d.substring(0,8);f&&!navigator.onLine?d=EditorUi.prototype.svgBrokenImage.src:!f||d.substring(0,a.baseUrl.length)==a.baseUrl||EditorUi.prototype.crossOriginImages&&c.isCorsEnabledForUrl(d)?"chrome-extension://"==d.substring(0,19)||mxClient.IS_CHROMEAPP||(d=b.apply(this,arguments)):d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return a};Editor.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+
+btoa(unescape(encodeURIComponent(a)))};Editor.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(EditorUi.prototype.svgBrokenImage.src)});else{var c=new Image;EditorUi.prototype.crossOriginImages&&(c.crossOrigin="anonymous");c.onload=function(){var a=document.createElement("canvas"),d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);try{b(a.toDataURL())}catch(E){b(EditorUi.prototype.svgBrokenImage.src)}};
+c.onerror=function(){b(EditorUi.prototype.svgBrokenImage.src)};c.src=a}};Editor.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var f=0,l=c||{};c=mxUtils.bind(this,function(c,p){for(var e=a.getElementsByTagName(c),g=0;g<e.length;g++)mxUtils.bind(this,function(c){var e=d.convert(c.getAttribute(p));if(null!=e&&"data:"!=e.substring(0,5)){var g=l[e];null==g?(f++,this.convertImageToDataUri(e,function(d){null!=d&&(l[e]=d,c.setAttribute(p,d));f--;0==f&&b(a)})):c.setAttribute(p,
+g)}else null!=e&&c.setAttribute(p,e)})(e[g])});c("image","xlink:href");c("img","src");0==f&&b(a)};Editor.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,f,l,p;c<d;){f=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4);b+="==";break}l=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>
+2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(l&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2);b+="=";break}p=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(l&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2|(p&192)>>6);
+b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(p&63)}return b};Editor.prototype.loadUrl=function(a,b,c,d,f,l){try{var p=d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);f=null!=f?f:!0;var e=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var d=a.getText();if(p){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=
+mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var d=Array(a.length),f=0;f<a.length;f++)d[f]=String.fromCharCode(a[f]);d=d.join("")}l=null!=l?l:"data:image/png;base64,";d=l+this.base64Encode(d)}b(d)}}else null!=c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},p,this.timeout,function(){f&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:e})})});e()}catch(Q){null!=c&&c(Q)}};Editor.prototype.loadFonts=function(a){if(null!=this.fontCss&&null==this.resolvedFontCss){var b=
+function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},c=this.fontCss.split("url("),d=0,f={},l=mxUtils.bind(this,function(){if(0==d){for(var l=[c[0]],p=1;p<c.length;p++){var e=c[p].indexOf(")");l.push('url("');l.push(f[b(c[p].substring(0,e))]);l.push('"'+c[p].substring(e))}this.resolvedFontCss=l.join("");a()}});if(0<c.length)for(var p=1;p<c.length;p++){var e=c[p].indexOf(")"),g=null,k=c[p].indexOf("format(",e);0<k&&(g=b(c[p].substring(k+7,c[p].indexOf(")",
+k))));mxUtils.bind(this,function(a){if(null==f[a]){f[a]=a;d++;var b="application/x-font-ttf";if("svg"==g||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==g||"embedded-opentype"==g||/(\.otf)($|\?)/i.test(a))b="application/x-font-opentype";else if("woff"==g||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==g||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==g||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==g||/(\.sfnt)($|\?)/i.test(a))b=
+"application/font-sfnt";var c=a;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){f[a]=b;d--;l()}),mxUtils.bind(this,function(a){d--;l()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[p].substring(0,e)),g)}}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var b=document.getElementsByTagName("style"),c=0;c<b.length;c++)0<mxUtils.getTextContent(b[c]).indexOf("MathJax")&&
a[0].appendChild(b[c].cloneNode(!0))};Editor.prototype.addFontCss=function(a){var b=a.getElementsByTagName("defs");null!=this.fontCss&&null!=b&&0<b.length&&(a=a.ownerDocument,a=null!=a.createElementNS?a.createElementNS(mxConstants.NS_SVG,"style"):a.createElement("style"),a.setAttribute("type","text/css"),mxUtils.setTextContent(a,this.fontCss),b[0][0].appendChild(a))};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||(null==this.graph.extFonts||0==this.graph.extFonts.length)&&
-this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,b,c,f,d,l,p,e,g,k,q,z,u,n){l=null!=l?l:!0;z=null!=z?z:this.graph;u=null!=u?u:0;var m=g?null:z.background;m==mxConstants.NONE&&(m=null);null==m&&(m=f);null==m&&0==g&&(m=this.graph.defaultPageBackgroundColor);this.convertImages(z.getSvg(m,null,null,n,null,null!=p?p:!0,null,null,null,k),mxUtils.bind(this,function(c){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var p=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),
-k=parseInt(c.getAttribute("height"));e=null!=e?e:1;null!=b&&(e=l?Math.min(1,Math.min(3*b/(4*k),b/g)):b/g);g=Math.ceil(e*g)+2*u;k=Math.ceil(e*k)+2*u;p.setAttribute("width",g);p.setAttribute("height",k);var q=p.getContext("2d");null!=m&&(q.beginPath(),q.rect(0,0,g,k),q.fillStyle=m,q.fill());q.scale(e,e);mxClient.IS_SF?window.setTimeout(function(){q.drawImage(f,u/e,u/e);a(p)},0):(q.drawImage(f,u/e,u/e),a(p))}catch(fa){null!=d&&d(fa)}});f.onerror=function(a){null!=d&&d(a)};try{k&&this.graph.addSvgShadow(c);
-var p=mxUtils.bind(this,function(){if(null!=this.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}z.mathEnabled&&this.addMathCss(c);f.src=this.createSvgDataUri(mxUtils.getXml(c))});this.loadFonts(p)}catch(Z){null!=d&&d(Z)}}),c,q)};Editor.prototype.writeGraphModelToPng=function(a,b,c,f,d){function l(a,b){var c=g;g+=b;return a.substring(c,g)}function p(a){a=l(a,4);return a.charCodeAt(3)+
-(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function e(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var g=0;if(l(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(l(a,4),"IHDR"!=l(a,4))null!=d&&d();else{l(a,17);d=a.substring(0,g);do{var k=p(a);if("IDAT"==l(a,4)){d=a.substring(0,g-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):
-"")+f;f=4294967295;f=EditorUi.prototype.updateCRC(f,b,0,4);f=EditorUi.prototype.updateCRC(f,c,0,c.length);d+=e(c.length)+b+c+e(f^4294967295);d+=a.substring(g-8,a.length);break}d+=a.substring(g-8,g-4+k);l(a,k);l(a,4)}while(k);return"data:image/png;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";var g=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){g.apply(this,
+this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,b,c,d,f,l,p,e,g,k,t,z,u,n){l=null!=l?l:!0;z=null!=z?z:this.graph;u=null!=u?u:0;var m=g?null:z.background;m==mxConstants.NONE&&(m=null);null==m&&(m=d);null==m&&0==g&&(m=this.graph.defaultPageBackgroundColor);this.convertImages(z.getSvg(m,null,null,n,null,null!=p?p:!0,null,null,null,k),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){try{var p=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),
+k=parseInt(c.getAttribute("height"));e=null!=e?e:1;null!=b&&(e=l?Math.min(1,Math.min(3*b/(4*k),b/g)):b/g);g=Math.ceil(e*g)+2*u;k=Math.ceil(e*k)+2*u;p.setAttribute("width",g);p.setAttribute("height",k);var t=p.getContext("2d");null!=m&&(t.beginPath(),t.rect(0,0,g,k),t.fillStyle=m,t.fill());t.scale(e,e);mxClient.IS_SF?window.setTimeout(function(){t.drawImage(d,u/e,u/e);a(p)},0):(t.drawImage(d,u/e,u/e),a(p))}catch(fa){null!=f&&f(fa)}});d.onerror=function(a){null!=f&&f(a)};try{k&&this.graph.addSvgShadow(c);
+var p=mxUtils.bind(this,function(){if(null!=this.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}z.mathEnabled&&this.addMathCss(c);d.src=this.createSvgDataUri(mxUtils.getXml(c))});this.loadFonts(p)}catch(Z){null!=f&&f(Z)}}),c,t)};Editor.prototype.writeGraphModelToPng=function(a,b,c,d,f){function l(a,b){var c=g;g+=b;return a.substring(c,g)}function p(a){a=l(a,4);return a.charCodeAt(3)+
+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function e(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var g=0;if(l(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=f&&f();else if(l(a,4),"IHDR"!=l(a,4))null!=f&&f();else{l(a,17);f=a.substring(0,g);do{var k=p(a);if("IDAT"==l(a,4)){f=a.substring(0,g-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):
+"")+d;d=4294967295;d=EditorUi.prototype.updateCRC(d,b,0,4);d=EditorUi.prototype.updateCRC(d,c,0,c.length);f+=e(c.length)+b+c+e(d^4294967295);f+=a.substring(g-8,a.length);break}f+=a.substring(g-8,g-4+k);l(a,k);l(a,4)}while(k);return"data:image/png;base64,"+(window.btoa?btoa(f):Base64.encode(f,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";var g=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){g.apply(this,
arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var e=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){e.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,b){var c=null;null!=a.editor.graph.getModel().getParent(b)?c=b.getId():null!=a.currentPage&&(c=a.currentPage.getId());return c});if(null!=window.StyleFormatPanel){var k=Format.prototype.init;
Format.prototype.init=function(){k.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var n=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?n.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=
-function(a){return!1};var m=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=m.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var b=this.editorUi,c=b.editor.graph,f=this.createOption(mxResources.get("shadow"),function(){return c.shadowVisible},function(a){var f=new ChangePageSetup(b);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=a;c.model.execute(f)},{install:function(a){this.listener=function(){a(c.shadowVisible)};
-b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});Editor.shadowOptionEnabled||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));a.appendChild(f)}return a};var t=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=t.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;if(c.isEnabled()){var f=b.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var d=
-this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a);b.editor.autosave&&f.isModified()&&f.fileChanged()},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}});a.appendChild(d)}}if(this.isMathOptionVisible()&&c.isEnabled()&&"undefined"!==typeof MathJax){d=this.createOption(mxResources.get("mathematicalTypesetting"),
-function(){return c.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(c.mathEnabled)};b.addListener("mathEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});d.style.paddingTop="5px";a.appendChild(d);var l=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");l.style.position="relative";l.style.marginLeft="6px";l.style.top="2px";d.appendChild(l)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=
+function(a){return!1};var m=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=m.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var b=this.editorUi,c=b.editor.graph,d=this.createOption(mxResources.get("shadow"),function(){return c.shadowVisible},function(a){var d=new ChangePageSetup(b);d.ignoreColor=!0;d.ignoreImage=!0;d.shadowVisible=a;c.model.execute(d)},{install:function(a){this.listener=function(){a(c.shadowVisible)};
+b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});Editor.shadowOptionEnabled||(d.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(d,60));a.appendChild(d)}return a};var q=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=q.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;if(c.isEnabled()){var d=b.getCurrentFile();if(null!=d&&d.isAutosaveOptional()){var f=
+this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a);b.editor.autosave&&d.isModified()&&d.fileChanged()},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}});a.appendChild(f)}}if(this.isMathOptionVisible()&&c.isEnabled()&&"undefined"!==typeof MathJax){f=this.createOption(mxResources.get("mathematicalTypesetting"),
+function(){return c.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(c.mathEnabled)};b.addListener("mathEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});f.style.paddingTop="5px";a.appendChild(f);var l=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");l.style.position="relative";l.style.marginLeft="6px";l.style.top="2px";f.appendChild(l)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=
[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",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",
@@ -8251,63 +8260,63 @@ type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,de
{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:"#aa00ff",stroke:"#7700CC",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:"#ffffff"},{fill:"#f0a30a",stroke:"#BD7000",font:"#ffffff"},{fill:"#e3c800",
stroke:"#B09500",font:"#ffffff"},{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(a,b,c){if(null!=b){var f=function(a){if(null!=a)if(c)for(var f=0;f<a.length;f++)b[a[f].name]=a[f];else for(var d in b){for(var l=!1,f=0;f<a.length;f++)if(a[f].name==d&&a[f].type==b[d].type){l=!0;break}l||delete b[d]}},d=this.editorUi.editor.graph.view.getState(a);null!=d&&
-null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),f(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(E){}}};var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=
+stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(a,b,c){if(null!=b){var d=function(a){if(null!=a)if(c)for(var d=0;d<a.length;d++)b[a[d].name]=a[d];else for(var f in b){for(var l=!1,d=0;d<a.length;d++)if(a[d].name==f&&a[d].type==b[f].type){l=!0;break}l||delete b[f]}},f=this.editorUi.editor.graph.view.getState(a);null!=f&&
+null!=f.shape&&(f.shape.commonCustomPropAdded||(f.shape.commonCustomPropAdded=!0,f.shape.customProperties=f.shape.customProperties||[],f.cell.vertex?Array.prototype.push.apply(f.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(f.shape.customProperties,Editor.commonEdgeProperties)),d(f.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{d(JSON.parse(a))}catch(E){}}};var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=
this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},c=a.vertices,d=a.edges,l=0;l<c.length;l++)this.findCommonProperties(c[l],b,0==l);for(l=0;l<d.length;l++)this.findCommonProperties(d[l],b,0==c.length&&0==l);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),
b,a))}};var l=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";b.style.marginRight="2px";a.appendChild(b);b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,
-function(a){this.editorUi.actions.get("pasteStyle").funct()}));b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return l.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,b,c){function f(a,b,c,f){z.getModel().beginUpdate();try{var d=[],l=[];if(null!=c.index){for(var p=[],e=c.parentRow.nextSibling;e&&
-e.getAttribute("data-pName")==a;)p.push(e.getAttribute("data-pValue")),e=e.nextSibling;c.index<p.length?null!=f?p.splice(f,1):p[c.index]=b:p.push(b);null!=c.size&&p.length>c.size&&(p=p.slice(0,c.size));b=p.join(",");null!=c.countProperty&&(z.setCellStyles(c.countProperty,p.length,z.getSelectionCells()),d.push(c.countProperty),l.push(p.length))}z.setCellStyles(a,b,z.getSelectionCells());d.push(a);l.push(b);if(null!=c.dependentProps)for(a=0;a<c.dependentProps.length;a++){var g=c.dependentPropsDefVal[a],
-k=c.dependentPropsVals[a];if(k.length>b)k=k.slice(0,b);else for(var u=k.length;u<b;u++)k.push(g);k=k.join(",");z.setCellStyles(c.dependentProps[a],k,z.getSelectionCells());d.push(c.dependentProps[a]);l.push(k)}if("function"==typeof c.onChange)c.onChange(z,b);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",l,"cells",z.getSelectionCells()))}finally{z.getModel().endUpdate()}}function d(b,c,f){var d=mxUtils.getOffset(a,!0),l=mxUtils.getOffset(b,!0);c.style.position="absolute";
-c.style.left=l.x-d.x+"px";c.style.top=l.y-d.y+"px";c.style.width=b.offsetWidth+"px";c.style.height=b.offsetHeight-(f?4:0)+"px";c.style.zIndex=5}function l(a,b,c){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,function(l){this.editorUi.pickColor(b,function(b){d.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+
-"')":b;f(a,b,c)});mxEvent.consume(l)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function p(a,b,c,d,l,p,e){null!=b&&(b=b.split(","),u.push({name:a,values:b,type:c,defVal:d,countProperty:l,parentRow:p,isDeletable:!0,flipBkg:e}));btn=mxUtils.button("+",mxUtils.bind(q,function(b){for(var g=p,q=0;null!=g.nextSibling;)if(g.nextSibling.getAttribute("data-pName")==a)g=g.nextSibling,q++;else break;var z={type:c,parentRow:p,index:q,isDeletable:!0,
-defVal:d,countProperty:l},q=k(a,"",z,0==q%2,e);f(a,d,z);g.parentNode.insertBefore(q,g.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function e(a,b,c,f,d,l,p){if(0<d){var e=Array(d);b=null!=b?b.split(","):[];for(var g=0;g<d;g++)e[g]=null!=b[g]?b[g]:null!=f?f:"";u.push({name:a,values:e,type:c,defVal:f,parentRow:l,flipBkg:p,size:d})}return document.createElement("div")}function g(a,b,c){var d=document.createElement("input");d.type=
-"checkbox";d.checked="1"==b;mxEvent.addListener(d,"change",function(){f(a,d.checked?"1":"0",c)});return d}function k(b,c,k,z,u){var m=k.dispName,n=k.type,v=document.createElement("tr");v.className="gePropRow"+(u?"Dark":"")+(z?"Alt":"")+" gePropNonHeaderRow";v.setAttribute("data-pName",b);v.setAttribute("data-pValue",c);z=!1;null!=k.index&&(v.setAttribute("data-index",k.index),m=(null!=m?m:"")+"["+k.index+"]",z=!0);var B=document.createElement("td");B.className="gePropRowCell";B.innerHTML=mxUtils.htmlEntities(mxResources.get(m,
-null,m));z&&(B.style.textAlign="right");v.appendChild(B);B=document.createElement("td");B.className="gePropRowCell";if("color"==n)B.appendChild(l(b,c,k));else if("bool"==n||"boolean"==n)B.appendChild(g(b,c,k));else if("enum"==n){var x=k.enumList;for(u=0;u<x.length;u++)if(m=x[u],m.val==c){B.innerHTML=mxUtils.htmlEntities(mxResources.get(m.dispName,null,m.dispName));break}mxEvent.addListener(B,"click",mxUtils.bind(q,function(){var l=document.createElement("select");d(B,l);for(var p=0;p<x.length;p++){var e=
-x[p],g=document.createElement("option");g.value=mxUtils.htmlEntities(e.val);g.innerHTML=mxUtils.htmlEntities(mxResources.get(e.dispName,null,e.dispName));l.appendChild(g)}l.value=c;a.appendChild(l);mxEvent.addListener(l,"change",function(){var a=mxUtils.htmlEntities(l.value);f(b,a,k)});l.focus();mxEvent.addListener(l,"blur",function(){a.removeChild(l)})}))}else"dynamicArr"==n?B.appendChild(p(b,c,k.subType,k.subDefVal,k.countProperty,v,u)):"staticArr"==n?B.appendChild(e(b,c,k.subType,k.subDefVal,k.size,
-v,u)):(B.innerHTML=c,mxEvent.addListener(B,"click",mxUtils.bind(q,function(){function l(){var a=p.value,a=0==a.length&&"string"!=n?0:a;k.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",n="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=k.min&&a<k.min?a=k.min:null!=k.max&&a>k.max&&(a=k.max);a=mxUtils.htmlEntities(("int"==n?parseInt(a):a)+"");f(b,a,k)}var p=document.createElement("input");d(B,p,!0);p.value=c;p.className="gePropEditor";"int"!=n&&"float"!=n||k.allowAuto||(p.type="number",p.step=
-"int"==n?"1":"any",null!=k.min&&(p.min=parseFloat(k.min)),null!=k.max&&(p.max=parseFloat(k.max)));a.appendChild(p);mxEvent.addListener(p,"keypress",function(a){13==a.keyCode&&l()});p.focus();mxEvent.addListener(p,"blur",function(){l()})})));k.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(q,function(a){f(b,"",k,k.index);mxEvent.consume(a)})),u.style.height="16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",B.appendChild(u));v.appendChild(B);return v}var q=this,z=this.editorUi.editor.graph,
-u=[];a.style.position="relative";a.style.padding="0";var n=document.createElement("table");n.style.whiteSpace="nowrap";n.style.width="100%";var m=document.createElement("tr");m.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"));m.style.cursor="pointer";var x=function(){var b=n.querySelectorAll(".gePropNonHeaderRow"),c;if(q.editorUi.propertiesCollapsed){B.src=
-Sidebar.prototype.collapsedImage;c="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],l=d.nodeName.toUpperCase();"INPUT"!=l&&"SELECT"!=l||a.removeChild(d)}catch(ka){}}else B.src=Sidebar.prototype.expandedImage,c="";for(f=0;f<b.length;f++)b[f].style.display=c};mxEvent.addListener(m,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;x()});m.appendChild(v);v=document.createElement("th");v.className="gePropHeaderCell";v.innerHTML=mxResources.get("value");
-m.appendChild(v);n.appendChild(m);var y=!1,A=!1,C;for(C in b)if(m=b[C],"function"!=typeof m.isVisible||m.isVisible(c,this)){var D=null!=c.style[C]?mxUtils.htmlEntities(c.style[C]+""):m.defVal;if("separator"==m.type)A=!A;else{if("staticArr"==m.type)m.size=parseInt(c.style[m.sizeProperty]||b[m.sizeProperty].defVal)||0;else if(null!=m.dependentProps){for(var t=m.dependentProps,I=[],G=[],v=0;v<t.length;v++){var F=c.style[t[v]];G.push(b[t[v]].subDefVal);I.push(null!=F?F.split(","):[])}m.dependentPropsDefVal=
-G;m.dependentPropsVals=I}n.appendChild(k(C,D,m,y,A));y=!y}}for(v=0;v<u.length;v++)for(m=u[v],b=m.parentRow,c=0;c<m.values.length;c++)C=k(m.name,m.values[c],{type:m.type,parentRow:m.parentRow,isDeletable:m.isDeletable,index:c,defVal:m.defVal,countProperty:m.countProperty,size:m.size},0==c%2,m.flipBkg),b.parentNode.insertBefore(C,b.nextSibling),b=C;a.appendChild(n);x();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){f.getModel().beginUpdate();
-try{var c=f.getSelectionCells();for(b=0;b<c.length;b++){for(var d=f.getModel().getStyle(c[b]),p=0;p<l.length;p++)d=mxUtils.removeStylename(d,l[p]);var e=f.getModel().isVertex(c[b])?f.defaultVertexStyle:f.defaultEdgeStyle;null!=a?(d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(e,mxConstants.STYLE_GRADIENTCOLOR,null)),d=""==a.fill?mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,
-null)),d=""==a.stroke?mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(e,mxConstants.STYLE_STROKECOLOR,null)),f.getModel().isVertex(c[b])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(e,mxConstants.STYLE_FONTCOLOR,null)))):(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,"#ffffff")),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(e,
-mxConstants.STYLE_STROKECOLOR,"#000000")),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(e,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(c[b])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(e,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(c[b],d)}}finally{f.getModel().endUpdate()}});b.className="geStyleButton";b.style.width="36px";b.style.height="30px";b.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&
-(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?b.style.background="url('"+Dialog.prototype.noColorImage+"')":b.style.backgroundColor=""==a.fill?mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"):a.fill||mxUtils.getValue(f.defaultVertexStyle,
-mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"),b.style.border=a.stroke==mxConstants.NONE?"1px solid transparent":""==a.stroke?"1px solid "+mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"):"1px solid "+(a.stroke||mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"));else{var c=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),p=mxUtils.getValue(f.defaultVertexStyle,
-mxConstants.STYLE_STROKECOLOR,"#000000");b.style.backgroundColor=c;b.style.border="1px solid "+p}d.appendChild(b)}d.innerHTML="";for(var c=0;c<a.length;c++)0<c&&0==mxUtils.mod(c,4)&&mxUtils.br(d),b(a[c])}function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var f=this.editorUi.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight="20px";
-a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);var 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(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var p=document.createElement("div");p.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+function(a){this.editorUi.actions.get("pasteStyle").funct()}));b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return l.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,b,c){function d(a,b,c,d){z.getModel().beginUpdate();try{var f=[],l=[];if(null!=c.index){for(var p=[],e=c.parentRow.nextSibling;e&&
+e.getAttribute("data-pName")==a;)p.push(e.getAttribute("data-pValue")),e=e.nextSibling;c.index<p.length?null!=d?p.splice(d,1):p[c.index]=b:p.push(b);null!=c.size&&p.length>c.size&&(p=p.slice(0,c.size));b=p.join(",");null!=c.countProperty&&(z.setCellStyles(c.countProperty,p.length,z.getSelectionCells()),f.push(c.countProperty),l.push(p.length))}z.setCellStyles(a,b,z.getSelectionCells());f.push(a);l.push(b);if(null!=c.dependentProps)for(a=0;a<c.dependentProps.length;a++){var g=c.dependentPropsDefVal[a],
+k=c.dependentPropsVals[a];if(k.length>b)k=k.slice(0,b);else for(var u=k.length;u<b;u++)k.push(g);k=k.join(",");z.setCellStyles(c.dependentProps[a],k,z.getSelectionCells());f.push(c.dependentProps[a]);l.push(k)}if("function"==typeof c.onChange)c.onChange(z,b);t.editorUi.fireEvent(new mxEventObject("styleChanged","keys",f,"values",l,"cells",z.getSelectionCells()))}finally{z.getModel().endUpdate()}}function f(b,c,d){var f=mxUtils.getOffset(a,!0),l=mxUtils.getOffset(b,!0);c.style.position="absolute";
+c.style.left=l.x-f.x+"px";c.style.top=l.y-f.y+"px";c.style.width=b.offsetWidth+"px";c.style.height=b.offsetHeight-(d?4:0)+"px";c.style.zIndex=5}function l(a,b,c){var f=document.createElement("div");f.style.width="32px";f.style.height="4px";f.style.margin="2px";f.style.border="1px solid black";f.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(t,function(l){this.editorUi.pickColor(b,function(b){f.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+
+"')":b;d(a,b,c)});mxEvent.consume(l)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(f);return btn}function p(a,b,c,f,l,p,e){null!=b&&(b=b.split(","),u.push({name:a,values:b,type:c,defVal:f,countProperty:l,parentRow:p,isDeletable:!0,flipBkg:e}));btn=mxUtils.button("+",mxUtils.bind(t,function(b){for(var g=p,t=0;null!=g.nextSibling;)if(g.nextSibling.getAttribute("data-pName")==a)g=g.nextSibling,t++;else break;var z={type:c,parentRow:p,index:t,isDeletable:!0,
+defVal:f,countProperty:l},t=k(a,"",z,0==t%2,e);d(a,f,z);g.parentNode.insertBefore(t,g.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function e(a,b,c,d,f,l,p){if(0<f){var e=Array(f);b=null!=b?b.split(","):[];for(var g=0;g<f;g++)e[g]=null!=b[g]?b[g]:null!=d?d:"";u.push({name:a,values:e,type:c,defVal:d,parentRow:l,flipBkg:p,size:f})}return document.createElement("div")}function g(a,b,c){var f=document.createElement("input");f.type=
+"checkbox";f.checked="1"==b;mxEvent.addListener(f,"change",function(){d(a,f.checked?"1":"0",c)});return f}function k(b,c,k,z,u){var m=k.dispName,n=k.type,v=document.createElement("tr");v.className="gePropRow"+(u?"Dark":"")+(z?"Alt":"")+" gePropNonHeaderRow";v.setAttribute("data-pName",b);v.setAttribute("data-pValue",c);z=!1;null!=k.index&&(v.setAttribute("data-index",k.index),m=(null!=m?m:"")+"["+k.index+"]",z=!0);var B=document.createElement("td");B.className="gePropRowCell";B.innerHTML=mxUtils.htmlEntities(mxResources.get(m,
+null,m));z&&(B.style.textAlign="right");v.appendChild(B);B=document.createElement("td");B.className="gePropRowCell";if("color"==n)B.appendChild(l(b,c,k));else if("bool"==n||"boolean"==n)B.appendChild(g(b,c,k));else if("enum"==n){var x=k.enumList;for(u=0;u<x.length;u++)if(m=x[u],m.val==c){B.innerHTML=mxUtils.htmlEntities(mxResources.get(m.dispName,null,m.dispName));break}mxEvent.addListener(B,"click",mxUtils.bind(t,function(){var l=document.createElement("select");f(B,l);for(var p=0;p<x.length;p++){var e=
+x[p],g=document.createElement("option");g.value=mxUtils.htmlEntities(e.val);g.innerHTML=mxUtils.htmlEntities(mxResources.get(e.dispName,null,e.dispName));l.appendChild(g)}l.value=c;a.appendChild(l);mxEvent.addListener(l,"change",function(){var a=mxUtils.htmlEntities(l.value);d(b,a,k)});l.focus();mxEvent.addListener(l,"blur",function(){a.removeChild(l)})}))}else"dynamicArr"==n?B.appendChild(p(b,c,k.subType,k.subDefVal,k.countProperty,v,u)):"staticArr"==n?B.appendChild(e(b,c,k.subType,k.subDefVal,k.size,
+v,u)):(B.innerHTML=c,mxEvent.addListener(B,"click",mxUtils.bind(t,function(){function l(){var a=p.value,a=0==a.length&&"string"!=n?0:a;k.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",n="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=k.min&&a<k.min?a=k.min:null!=k.max&&a>k.max&&(a=k.max);a=mxUtils.htmlEntities(("int"==n?parseInt(a):a)+"");d(b,a,k)}var p=document.createElement("input");f(B,p,!0);p.value=c;p.className="gePropEditor";"int"!=n&&"float"!=n||k.allowAuto||(p.type="number",p.step=
+"int"==n?"1":"any",null!=k.min&&(p.min=parseFloat(k.min)),null!=k.max&&(p.max=parseFloat(k.max)));a.appendChild(p);mxEvent.addListener(p,"keypress",function(a){13==a.keyCode&&l()});p.focus();mxEvent.addListener(p,"blur",function(){l()})})));k.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(t,function(a){d(b,"",k,k.index);mxEvent.consume(a)})),u.style.height="16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",B.appendChild(u));v.appendChild(B);return v}var t=this,z=this.editorUi.editor.graph,
+u=[];a.style.position="relative";a.style.padding="0";var n=document.createElement("table");n.style.whiteSpace="nowrap";n.style.width="100%";var m=document.createElement("tr");m.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"));m.style.cursor="pointer";var x=function(){var b=n.querySelectorAll(".gePropNonHeaderRow"),c;if(t.editorUi.propertiesCollapsed){B.src=
+Sidebar.prototype.collapsedImage;c="none";for(var d=a.childNodes.length-1;0<=d;d--)try{var f=a.childNodes[d],l=f.nodeName.toUpperCase();"INPUT"!=l&&"SELECT"!=l||a.removeChild(f)}catch(ka){}}else B.src=Sidebar.prototype.expandedImage,c="";for(d=0;d<b.length;d++)b[d].style.display=c};mxEvent.addListener(m,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;x()});m.appendChild(v);v=document.createElement("th");v.className="gePropHeaderCell";v.innerHTML=mxResources.get("value");
+m.appendChild(v);n.appendChild(m);var y=!1,A=!1,C;for(C in b)if(m=b[C],"function"!=typeof m.isVisible||m.isVisible(c,this)){var D=null!=c.style[C]?mxUtils.htmlEntities(c.style[C]+""):m.defVal;if("separator"==m.type)A=!A;else{if("staticArr"==m.type)m.size=parseInt(c.style[m.sizeProperty]||b[m.sizeProperty].defVal)||0;else if(null!=m.dependentProps){for(var q=m.dependentProps,I=[],G=[],v=0;v<q.length;v++){var F=c.style[q[v]];G.push(b[q[v]].subDefVal);I.push(null!=F?F.split(","):[])}m.dependentPropsDefVal=
+G;m.dependentPropsVals=I}n.appendChild(k(C,D,m,y,A));y=!y}}for(v=0;v<u.length;v++)for(m=u[v],b=m.parentRow,c=0;c<m.values.length;c++)C=k(m.name,m.values[c],{type:m.type,parentRow:m.parentRow,isDeletable:m.isDeletable,index:c,defVal:m.defVal,countProperty:m.countProperty,size:m.size},0==c%2,m.flipBkg),b.parentNode.insertBefore(C,b.nextSibling),b=C;a.appendChild(n);x();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){d.getModel().beginUpdate();
+try{var c=d.getSelectionCells();for(b=0;b<c.length;b++){for(var f=d.getModel().getStyle(c[b]),p=0;p<l.length;p++)f=mxUtils.removeStylename(f,l[p]);var e=d.getModel().isVertex(c[b])?d.defaultVertexStyle:d.defaultEdgeStyle;null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(e,mxConstants.STYLE_GRADIENTCOLOR,null)),f=""==a.fill?mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,
+null)),f=""==a.stroke?mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(e,mxConstants.STYLE_STROKECOLOR,null)),d.getModel().isVertex(c[b])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(e,mxConstants.STYLE_FONTCOLOR,null)))):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,"#ffffff")),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(e,
+mxConstants.STYLE_STROKECOLOR,"#000000")),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(e,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(c[b])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(e,mxConstants.STYLE_FONTCOLOR,null))));d.getModel().setStyle(c[b],f)}}finally{d.getModel().endUpdate()}});b.className="geStyleButton";b.style.width="36px";b.style.height="30px";b.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&
+(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?b.style.background="url('"+Dialog.prototype.noColorImage+"')":b.style.backgroundColor=""==a.fill?mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"):a.fill||mxUtils.getValue(d.defaultVertexStyle,
+mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"),b.style.border=a.stroke==mxConstants.NONE?"1px solid transparent":""==a.stroke?"1px solid "+mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"):"1px solid "+(a.stroke||mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"));else{var c=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),p=mxUtils.getValue(d.defaultVertexStyle,
+mxConstants.STYLE_STROKECOLOR,"#000000");b.style.backgroundColor=c;b.style.border="1px solid "+p}f.appendChild(b)}f.innerHTML="";for(var c=0;c<a.length;c++)0<c&&0==mxUtils.mod(c,4)&&mxUtils.br(f),b(a[c])}function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var d=this.editorUi.editor.graph,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.paddingLeft="24px";f.style.paddingRight="20px";
+a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(f);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(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var p=document.createElement("div");p.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));var e=document.createElement("div");e.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
1<this.defaultColorSchemes.length&&(a.appendChild(p),a.appendChild(e));mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));c(p);c(e);b(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),c=null;1==this.editorUi.editor.graph.getSelectionCount()&&
-(c=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){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",a.appendChild(c));var f=this.editorUi.editor.graph,d=f.view.getState(f.getSelectionCell());1==f.getSelectionCount()&&null!=d&&null!=d.shape&&null!=d.shape.stencil?(b=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
+(c=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){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",a.appendChild(c));var d=this.editorUi.editor.graph,f=d.view.getState(d.getSelectionCell());1==d.getSelectionCount()&&null!=f&&null!=f.shape&&null!=f.shape.stencil?(b=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
function(a){this.editorUi.actions.get("editShape").funct()})),b.setAttribute("title",mxResources.get("editShape")),b.style.marginBottom="2px",null==c?b.style.width="202px":(c.style.width="100px",b.style.width="100px",b.style.marginLeft="2px"),a.appendChild(b)):b.image&&(b=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),b.setAttribute("title",mxResources.get("editImage")),b.style.marginBottom="2px",null==c?b.style.width="202px":
(c.style.width="100px",b.style.width="100px",b.style.marginLeft="2px"),a.appendChild(b));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize=
"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.init;Graph.prototype.init=function(){function a(a){b=a;try{if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=document.createEventObject(a),b.type=a.type,b.canBubble=a.canBubble,b.cancelable=a.cancelable,b.view=a.view,b.detail=a.detail,b.screenX=a.screenX,b.screenY=a.screenY,b.clientX=a.clientX,b.clientY=a.clientY,b.ctrlKey=a.ctrlKey,b.altKey=a.altKey,b.shiftKey=a.shiftKey,b.metaKey=a.metaKey,b.button=
-a.button,b.relatedTarget=a.relatedTarget}catch(E){}}p.apply(this,arguments);window.mxFreehand&&(this.freehand=new mxFreehand(this));var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var f=this.layoutManager.getLayout;
+a.button,b.relatedTarget=a.relatedTarget}catch(E){}}p.apply(this,arguments);window.mxFreehand&&(this.freehand=new mxFreehand(this));var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var d=this.layoutManager.getLayout;
this.layoutManager.getLayout=function(a){var b=this.graph.getCellStyle(a);if(null!=b){if("rack"==b.childLayout){var c=new mxStackLayout(this.graph,!1);c.gridSize=null!=b.rackUnitSize?parseFloat(b.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;c.fill=!0;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.allowGaps=b.allowGaps||0;c.resizeParent=!1;return c}if("undefined"!==typeof mxTableLayout&&"tableLayout"==
b.childLayout)return c=new mxTableLayout(this.graph),c.rows=b.tableRows||2,c.columns=b.tableColumns||2,c.colPercentages=b.colPercentages,c.rowPercentages=b.rowPercentages,c.equalColumns="1"==mxUtils.getValue(b,"equalColumns",c.colPercentages?"0":"1"),c.equalRows="1"==mxUtils.getValue(b,"equalRows",c.rowPercentages?"0":"1"),c.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),c.border=b.tableBorder||c.border,c.marginLeft=b.marginLeft||0,c.marginRight=b.marginRight||0,c.marginTop=b.marginTop||
-0,c.marginBottom=b.marginBottom||0,c.autoAddCol="1"==mxUtils.getValue(b,"autoAddCol","0"),c.autoAddRow="1"==mxUtils.getValue(b,"autoAddRow",c.autoAddCol?"0":"1"),c.colWidths=b.colWidths||"100",c.rowHeights=b.rowHeights||"50",c}return f.apply(this,arguments)};this.updateGlobalUrlVariables()};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));
+0,c.marginBottom=b.marginBottom||0,c.autoAddCol="1"==mxUtils.getValue(b,"autoAddCol","0"),c.autoAddRow="1"==mxUtils.getValue(b,"autoAddRow",c.autoAddCol?"0":"1"),c.colWidths=b.colWidths||"100",c.rowHeights=b.rowHeights||"50",c}return d.apply(this,arguments)};this.updateGlobalUrlVariables()};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));
if(null!=a)for(var b in a)this.globalVars[b]=a[b]}catch(F){null!=window.console&&console.log("Error in vars URL parameter: "+F)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var u=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var b=u.apply(this,arguments);null==b&&null!=this.globalVars&&(b=this.globalVars[a]);return b};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=
-this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var v=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,b,c,f,d,l,p,e,g,k,q){var z=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&&(z=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var u=v.apply(this,arguments);if(q&&null!=this.extFonts&&0<this.extFonts.length){var m=
+this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var v=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,b,c,d,f,l,p,e,g,k,t){var z=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&&(z=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var u=v.apply(this,arguments);if(t&&null!=this.extFonts&&0<this.extFonts.length){var m=
u.ownerDocument,n=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"style"):m.createElement("style");null!=m.setAttributeNS?n.setAttributeNS("type","text/css"):n.setAttribute("type","text/css");for(var B="",x=0;x<this.extFonts.length;x++)var y=this.extFonts[x].name,C=this.extFonts[x].url,B=0==C.indexOf(Editor.GOOGLE_FONTS)?B+("@import url("+C+");"):B+('@font-face {font-family: "'+y+'";src: url("'+C+'");}');n.appendChild(m.createTextNode(B));u.getElementsByTagName("defs")[0].appendChild(n)}null!=
-z&&(this.stylesheet=z,this.refresh());return u};var q=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=q.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var b=a.drawText;a.drawText=function(a,c){if(null!=c.addForeignObject&&null!=a.text&&a.text.checkBounds()&&null!=a.text.node&&null==a.text.node.ownerSVGElement){c.save();var f=a.text.node.cloneNode(!0);f.style.transformOrigin="";f.style.transform="";f.style.top="0px";f.style.left=
-"0px";for(var d=f.getElementsByTagName("math");0<d.length;)d[0].parentNode.removeChild(d[0]);var l=a.text.scale,d=a.text.bounds.x/l,p=a.text.bounds.y/l,e=a.text.bounds.width/l,l=a.text.bounds.height/l;a.text.updateTransform(c,d,p,e,l);a.text.configureCanvas(c,d,p,e,l);var g=mxUtils.isNode(a.text.value)||a.text.dialect==mxConstants.DIALECT_STRICTHTML,k=g||c instanceof mxVmlCanvas2D?"html":"",q=a.text.value;g||"html"!=k||(q=mxUtils.htmlEntities(q,!1));"html"!=k||mxUtils.isNode(a.text.value)||(q=mxUtils.replaceTrailingNewlines(q,
-"<div><br></div>"));var q=!mxUtils.isNode(a.text.value)&&a.text.replaceLinefeeds&&"html"==k?q.replace(/\n/g,"<br/>"):q,z=a.text.textDirection;z!=mxConstants.TEXT_DIRECTION_AUTO||g||(z=a.text.getAutoDirection());z!=mxConstants.TEXT_DIRECTION_LTR&&z!=mxConstants.TEXT_DIRECTION_RTL&&(z=null);c.addForeignObject(d+c.state.dx,p+c.state.dy,e,l,q,a.text.align,a.text.valign,a.text.wrap,k,a.text.overflow,a.text.clipped,a.text.getTextRotation(),z,f,c.root.ownerSVGElement);c.restore()}else b.apply(this,arguments)}}return a};
+z&&(this.stylesheet=z,this.refresh());return u};var t=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=t.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var b=a.drawText;a.drawText=function(a,c){if(null!=c.addForeignObject&&null!=a.text&&a.text.checkBounds()&&null!=a.text.node&&null==a.text.node.ownerSVGElement){c.save();var d=a.text.node.cloneNode(!0);d.style.transformOrigin="";d.style.transform="";d.style.top="0px";d.style.left=
+"0px";for(var f=d.getElementsByTagName("math");0<f.length;)f[0].parentNode.removeChild(f[0]);var l=a.text.scale,f=a.text.bounds.x/l,p=a.text.bounds.y/l,e=a.text.bounds.width/l,l=a.text.bounds.height/l;a.text.updateTransform(c,f,p,e,l);a.text.configureCanvas(c,f,p,e,l);var g=mxUtils.isNode(a.text.value)||a.text.dialect==mxConstants.DIALECT_STRICTHTML,k=g||c instanceof mxVmlCanvas2D?"html":"",t=a.text.value;g||"html"!=k||(t=mxUtils.htmlEntities(t,!1));"html"!=k||mxUtils.isNode(a.text.value)||(t=mxUtils.replaceTrailingNewlines(t,
+"<div><br></div>"));var t=!mxUtils.isNode(a.text.value)&&a.text.replaceLinefeeds&&"html"==k?t.replace(/\n/g,"<br/>"):t,z=a.text.textDirection;z!=mxConstants.TEXT_DIRECTION_AUTO||g||(z=a.text.getAutoDirection());z!=mxConstants.TEXT_DIRECTION_LTR&&z!=mxConstants.TEXT_DIRECTION_RTL&&(z=null);c.addForeignObject(f+c.state.dx,p+c.state.dy,e,l,t,a.text.align,a.text.valign,a.text.wrap,k,a.text.overflow,a.text.clipped,a.text.getTextRotation(),z,d,c.root.ownerSVGElement);c.restore()}else b.apply(this,arguments)}}return a};
var x=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return x.apply(this,arguments)&&!mxClient.IS_SF};var y=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){y.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?
null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,
a.ownerSVGElement))}};var D=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){D.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var b=0;b<a.actions.length;b++){var c=a.actions[b];if(null!=c.open)if(this.isCustomLink(c.open)){if(!this.customLinkClicked(c.open))return}else this.openLink(c.open)}this.model.beginUpdate();try{for(b=
-0;b<a.actions.length;b++)c=a.actions[b],null!=c.toggle&&this.toggleCells(this.getCellsForAction(c.toggle,!0)),null!=c.show&&this.setCellsVisible(this.getCellsForAction(c.show,!0),!0),null!=c.hide&&this.setCellsVisible(this.getCellsForAction(c.hide,!0),!1)}finally{this.model.endUpdate()}for(b=0;b<a.actions.length;b++){var c=a.actions[b],f=[];null!=c.select&&this.isEnabled()&&(f=this.getCellsForAction(c.select),this.setSelectionCells(f));null!=c.highlight&&(f=this.getCellsForAction(c.highlight),this.highlightCells(f,
-c.highlight.color,c.highlight.duration,c.highlight.opacity));null!=c.scroll&&(f=this.getCellsForAction(c.scroll));0<f.length&&this.scrollCellToVisible(f[0])}}};Graph.prototype.updateCustomLinksForCell=function(a,b){var c=this.getLinkForCell(b);null!=c&&"data:action/json,"==c.substring(0,17)&&this.setLinkForCell(b,this.updateCustomLink(a,c));if(this.isHtmlLabel(b)){var f=document.createElement("div");f.innerHTML=this.getLabel(b);for(var d=f.getElementsByTagName("a"),l=!1,p=0;p<d.length;p++)c=d[p].getAttribute("href"),
-null!=c&&"data:action/json,"==c.substring(0,17)&&(d[p].setAttribute("href",this.updateCustomLink(a,c)),l=!0);l&&this.labelChanged(b,f.innerHTML)}};Graph.prototype.updateCustomLink=function(a,b){if("data:action/json,"==b.substring(0,17))try{var c=JSON.parse(b.substring(17));null!=c.actions&&(this.updateCustomLinkActions(a,c.actions),b="data:action/json,"+JSON.stringify(c))}catch(J){}return b};Graph.prototype.updateCustomLinkActions=function(a,b){for(var c=0;c<b.length;c++){var f=b[c];this.updateCustomLinkAction(a,
-f.toggle);this.updateCustomLinkAction(a,f.show);this.updateCustomLinkAction(a,f.hide);this.updateCustomLinkAction(a,f.select);this.updateCustomLinkAction(a,f.highlight);this.updateCustomLinkAction(a,f.scroll)}};Graph.prototype.updateCustomLinkAction=function(a,b){if(null!=b&&null!=b.cells){for(var c=[],f=0;f<b.cells.length;f++)if("*"==b.cells[f])c.push(b.cells[f]);else{var d=a[b.cells[f]];null!=d?""!=d&&c.push(d):c.push(b.cells[f])}b.cells=c}};Graph.prototype.getCellsForAction=function(a,b){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,
-null,null,b))};Graph.prototype.getCellsById=function(a){var b=[];if(null!=a)for(var c=0;c<a.length;c++)if("*"==a[c])var f=this.getDefaultParent(),b=b.concat(this.model.filterDescendants(function(a){return a!=f},f));else{var d=this.model.getCell(a[c]);null!=d&&b.push(d)}return b};Graph.prototype.getCellsForTags=function(a,b,c,f){var d=[];if(null!=a){b=null!=b?b:this.model.getDescendants(this.model.getRoot());c=null!=c?c:"tags";for(var l=0,p={},e=0;e<a.length;e++)0<a[e].length&&(p[a[e].toLowerCase()]=
-!0,l++);for(e=0;e<b.length;e++)if(f&&this.model.getParent(b[e])==this.model.root||this.model.isVertex(b[e])||this.model.isEdge(b[e])){var g=null!=b[e].value&&"object"==typeof b[e].value?mxUtils.trim(b[e].value.getAttribute(c)||""):"",k=!1;if(0<g.length){if(g=g.toLowerCase().split(" "),g.length>=a.length){for(var q=k=0;q<g.length&&k<l;q++)null!=p[g[q]]&&k++;k=k==l}}else k=0==a.length;k&&d.push(b[e])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],
-!this.model.isVisible(a[b]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,b){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],b)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,b,c,f){for(var d=0;d<a.length;d++)this.highlightCell(a[d],b,c,f)};Graph.prototype.highlightCell=function(a,b,c,f){b=null!=b?b:mxConstants.DEFAULT_VALID_COLOR;c=null!=c?c:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,
-mxConstants.STYLE_STROKEWIDTH,1)+4),l=new mxCellHighlight(this,b,d,!1);null!=f&&(l.opacity=f);l.highlight(a);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)},c)}};Graph.prototype.addSvgShadow=function(a,b,c){c=null!=c?c:!1;var f=a.ownerDocument,d=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");
-d.setAttribute("id",this.shadowId);var l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");l.setAttribute("in","SourceAlpha");l.setAttribute("stdDeviation",this.svgShadowBlur);l.setAttribute("result","blur");d.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset");l.setAttribute("in","blur");l.setAttribute("dx",this.svgShadowSize);l.setAttribute("dy",this.svgShadowSize);l.setAttribute("result",
-"offsetBlur");d.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");l.setAttribute("flood-color",this.svgShadowColor);l.setAttribute("flood-opacity",this.svgShadowOpacity);l.setAttribute("result","offsetColor");d.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feComposite"):f.createElement("feComposite");l.setAttribute("in","offsetColor");l.setAttribute("in2","offsetBlur");l.setAttribute("operator","in");
-l.setAttribute("result","offsetBlur");d.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");l.setAttribute("in","SourceGraphic");l.setAttribute("in2","offsetBlur");d.appendChild(l);l=a.getElementsByTagName("defs");0==l.length?(f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=a.firstChild?a.insertBefore(f,a.firstChild):a.appendChild(f)):f=l[0];f.appendChild(d);c||(b=null!=b?b:a.getElementsByTagName("g")[0],
-null!=b&&(b.setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6),b=a.getAttribute("viewBox"),null!=b&&0<b.length&&(b=b.split(" "),3<b.length&&(w=parseFloat(b[2])+6,h=parseFloat(b[3])+6,a.setAttribute("viewBox",b[0]+" "+b[1]+" "+w+" "+h))))));return d};Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=
+0;b<a.actions.length;b++)c=a.actions[b],null!=c.toggle&&this.toggleCells(this.getCellsForAction(c.toggle,!0)),null!=c.show&&this.setCellsVisible(this.getCellsForAction(c.show,!0),!0),null!=c.hide&&this.setCellsVisible(this.getCellsForAction(c.hide,!0),!1)}finally{this.model.endUpdate()}for(b=0;b<a.actions.length;b++){var c=a.actions[b],d=[];null!=c.select&&this.isEnabled()&&(d=this.getCellsForAction(c.select),this.setSelectionCells(d));null!=c.highlight&&(d=this.getCellsForAction(c.highlight),this.highlightCells(d,
+c.highlight.color,c.highlight.duration,c.highlight.opacity));null!=c.scroll&&(d=this.getCellsForAction(c.scroll));0<d.length&&this.scrollCellToVisible(d[0])}}};Graph.prototype.updateCustomLinksForCell=function(a,b){var c=this.getLinkForCell(b);null!=c&&"data:action/json,"==c.substring(0,17)&&this.setLinkForCell(b,this.updateCustomLink(a,c));if(this.isHtmlLabel(b)){var d=document.createElement("div");d.innerHTML=this.getLabel(b);for(var f=d.getElementsByTagName("a"),l=!1,p=0;p<f.length;p++)c=f[p].getAttribute("href"),
+null!=c&&"data:action/json,"==c.substring(0,17)&&(f[p].setAttribute("href",this.updateCustomLink(a,c)),l=!0);l&&this.labelChanged(b,d.innerHTML)}};Graph.prototype.updateCustomLink=function(a,b){if("data:action/json,"==b.substring(0,17))try{var c=JSON.parse(b.substring(17));null!=c.actions&&(this.updateCustomLinkActions(a,c.actions),b="data:action/json,"+JSON.stringify(c))}catch(J){}return b};Graph.prototype.updateCustomLinkActions=function(a,b){for(var c=0;c<b.length;c++){var d=b[c];this.updateCustomLinkAction(a,
+d.toggle);this.updateCustomLinkAction(a,d.show);this.updateCustomLinkAction(a,d.hide);this.updateCustomLinkAction(a,d.select);this.updateCustomLinkAction(a,d.highlight);this.updateCustomLinkAction(a,d.scroll)}};Graph.prototype.updateCustomLinkAction=function(a,b){if(null!=b&&null!=b.cells){for(var c=[],d=0;d<b.cells.length;d++)if("*"==b.cells[d])c.push(b.cells[d]);else{var f=a[b.cells[d]];null!=f?""!=f&&c.push(f):c.push(b.cells[d])}b.cells=c}};Graph.prototype.getCellsForAction=function(a,b){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,
+null,null,b))};Graph.prototype.getCellsById=function(a){var b=[];if(null!=a)for(var c=0;c<a.length;c++)if("*"==a[c])var d=this.getDefaultParent(),b=b.concat(this.model.filterDescendants(function(a){return a!=d},d));else{var f=this.model.getCell(a[c]);null!=f&&b.push(f)}return b};Graph.prototype.getCellsForTags=function(a,b,c,d){var f=[];if(null!=a){b=null!=b?b:this.model.getDescendants(this.model.getRoot());c=null!=c?c:"tags";for(var l=0,p={},e=0;e<a.length;e++)0<a[e].length&&(p[a[e].toLowerCase()]=
+!0,l++);for(e=0;e<b.length;e++)if(d&&this.model.getParent(b[e])==this.model.root||this.model.isVertex(b[e])||this.model.isEdge(b[e])){var g=null!=b[e].value&&"object"==typeof b[e].value?mxUtils.trim(b[e].value.getAttribute(c)||""):"",k=!1;if(0<g.length){if(g=g.toLowerCase().split(" "),g.length>=a.length){for(var t=k=0;t<g.length&&k<l;t++)null!=p[g[t]]&&k++;k=k==l}}else k=0==a.length;k&&f.push(b[e])}}return f};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],
+!this.model.isVisible(a[b]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,b){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],b)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,b,c,d){for(var f=0;f<a.length;f++)this.highlightCell(a[f],b,c,d)};Graph.prototype.highlightCell=function(a,b,c,d){b=null!=b?b:mxConstants.DEFAULT_VALID_COLOR;c=null!=c?c:1E3;a=this.view.getState(a);if(null!=a){var f=Math.max(5,mxUtils.getValue(a.style,
+mxConstants.STYLE_STROKEWIDTH,1)+4),l=new mxCellHighlight(this,b,f,!1);null!=d&&(l.opacity=d);l.highlight(a);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)},c)}};Graph.prototype.addSvgShadow=function(a,b,c){c=null!=c?c:!1;var d=a.ownerDocument,f=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"filter"):d.createElement("filter");
+f.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");f.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");f.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",this.svgShadowOpacity);l.setAttribute("result","offsetColor");f.appendChild(l);l=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feComposite"):d.createElement("feComposite");l.setAttribute("in","offsetColor");l.setAttribute("in2","offsetBlur");l.setAttribute("operator","in");
+l.setAttribute("result","offsetBlur");f.appendChild(l);l=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feBlend"):d.createElement("feBlend");l.setAttribute("in","SourceGraphic");l.setAttribute("in2","offsetBlur");f.appendChild(l);l=a.getElementsByTagName("defs");0==l.length?(d=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"defs"):d.createElement("defs"),null!=a.firstChild?a.insertBefore(d,a.firstChild):a.appendChild(d)):d=l[0];d.appendChild(f);c||(b=null!=b?b:a.getElementsByTagName("g")[0],
+null!=b&&(b.setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6),b=a.getAttribute("viewBox"),null!=b&&0<b.length&&(b=b.split(" "),3<b.length&&(w=parseFloat(b[2])+6,h=parseFloat(b[3])+6,a.setAttribute("viewBox",b[0]+" "+b[1]+" "+w+" "+h))))));return f};Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=
a)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),b,c=0;do b=this.model.getChildAt(this.model.root,c);while(c++<a&&"1"==mxUtils.getValue(this.getCellStyle(b),"locked","0"));null!=b&&this.setDefaultParent(b)}};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+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+
"/kubernetes.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+
@@ -8317,63 +8326,63 @@ a)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this
[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",
STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];
mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=
-[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var I=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,f,d,l,p,e,g,k){if(null!=c&&null==mxMarker.markers[c]){var q=
-this.getPackageForType(c);null!=q&&mxStencilRegistry.getStencil(q)}return I.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function c(){m.value=Math.max(1,Math.min(e,Math.max(parseInt(m.value),parseInt(u.value))));u.value=Math.max(1,Math.min(e,Math.min(parseInt(m.value),parseInt(u.value))))}function f(b){function c(b,c,l){var p=b.useCssTransforms,e=b.currentTranslate,g=b.currentScale,k=b.view.translate,q=b.view.scale;b.useCssTransforms&&(b.useCssTransforms=!1,b.currentTranslate=
-new mxPoint(0,0),b.currentScale=1,b.view.translate=new mxPoint(0,0),b.view.scale=1);var z=b.getGraphBounds(),u=0,m=0,n=ma.get(),v=1/b.pageScale,y=x.checked;if(y)var v=parseInt(S.value),C=parseInt(ia.value),v=Math.min(n.height*C/(z.height/b.view.scale),n.width*v/(z.width/b.view.scale));else v=parseInt(B.value)/(100*b.pageScale),isNaN(v)&&(f=1/b.pageScale,B.value="100 %");n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width*f);n.height=Math.ceil(n.height*f);v*=f;!y&&b.pageVisible?(z=b.getPageLayout(),
-u-=z.x*n.width,m-=z.y*n.height):y=!0;if(null==c){c=PrintDialog.createPrintPreview(b,v,n,0,u,m,y);c.pageSelector=!1;c.mathEnabled=!1;u=a.getCurrentFile();null!=u&&(c.title=u.getTitle());var D=c.writeHead;c.writeHead=function(b){D.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"))};if("undefined"!==typeof MathJax){var t=c.renderPage;c.renderPage=function(a,b,c,f,d,l){var p=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&
-!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var e=t.apply(this,arguments);mxClient.NO_FO=p;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:e.className="geDisableMathJax";return e}}u=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(u=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());c.open(null,null,l,!0);null!=u&&(d.stylesheet=u,d.refresh())}else{n=b.background;if(null==n||""==n||n==mxConstants.NONE)n="#ffffff";c.backgroundColor=n;c.autoOrigin=y;
-c.appendGraph(b,v,u,m,l,!0)}p&&(b.useCssTransforms=p,b.currentTranslate=e,b.currentScale=g,b.view.translate=k,b.view.scale=q);return c}var f=parseInt(M.value)/100;isNaN(f)&&(f=1,M.value="100 %");var f=.75*f,l=u.value,p=m.value,e=!q.checked,k=null;e&&(e=l==g&&p==g);if(!e&&null!=a.pages&&a.pages.length){var z=0,e=a.pages.length-1;q.checked||(z=parseInt(l)-1,e=parseInt(p)-1);for(var n=z;n<=e;n++){var v=a.pages[n],l=v==a.currentPage?d:null;if(null==l){var l=a.createTemporaryGraph(d.getStylesheet()),p=
+[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var I=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,f,l,p,e,g,k){if(null!=c&&null==mxMarker.markers[c]){var t=
+this.getPackageForType(c);null!=t&&mxStencilRegistry.getStencil(t)}return I.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function c(){m.value=Math.max(1,Math.min(e,Math.max(parseInt(m.value),parseInt(u.value))));u.value=Math.max(1,Math.min(e,Math.min(parseInt(m.value),parseInt(u.value))))}function d(b){function c(b,c,l){var p=b.useCssTransforms,e=b.currentTranslate,g=b.currentScale,k=b.view.translate,t=b.view.scale;b.useCssTransforms&&(b.useCssTransforms=!1,b.currentTranslate=
+new mxPoint(0,0),b.currentScale=1,b.view.translate=new mxPoint(0,0),b.view.scale=1);var z=b.getGraphBounds(),u=0,m=0,n=ma.get(),v=1/b.pageScale,y=x.checked;if(y)var v=parseInt(S.value),C=parseInt(ia.value),v=Math.min(n.height*C/(z.height/b.view.scale),n.width*v/(z.width/b.view.scale));else v=parseInt(B.value)/(100*b.pageScale),isNaN(v)&&(d=1/b.pageScale,B.value="100 %");n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width*d);n.height=Math.ceil(n.height*d);v*=d;!y&&b.pageVisible?(z=b.getPageLayout(),
+u-=z.x*n.width,m-=z.y*n.height):y=!0;if(null==c){c=PrintDialog.createPrintPreview(b,v,n,0,u,m,y);c.pageSelector=!1;c.mathEnabled=!1;u=a.getCurrentFile();null!=u&&(c.title=u.getTitle());var D=c.writeHead;c.writeHead=function(b){D.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"))};if("undefined"!==typeof MathJax){var q=c.renderPage;c.renderPage=function(a,b,c,d,f,l){var p=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&
+!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var e=q.apply(this,arguments);mxClient.NO_FO=p;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:e.className="geDisableMathJax";return e}}u=null;null!=f.themes&&"darkTheme"==f.defaultThemeName&&(u=f.stylesheet,f.stylesheet=f.getDefaultStylesheet(),f.refresh());c.open(null,null,l,!0);null!=u&&(f.stylesheet=u,f.refresh())}else{n=b.background;if(null==n||""==n||n==mxConstants.NONE)n="#ffffff";c.backgroundColor=n;c.autoOrigin=y;
+c.appendGraph(b,v,u,m,l,!0)}p&&(b.useCssTransforms=p,b.currentTranslate=e,b.currentScale=g,b.view.translate=k,b.view.scale=t);return c}var d=parseInt(M.value)/100;isNaN(d)&&(d=1,M.value="100 %");var d=.75*d,l=u.value,p=m.value,e=!t.checked,k=null;e&&(e=l==g&&p==g);if(!e&&null!=a.pages&&a.pages.length){var z=0,e=a.pages.length-1;t.checked||(z=parseInt(l)-1,e=parseInt(p)-1);for(var n=z;n<=e;n++){var v=a.pages[n],l=v==a.currentPage?f:null;if(null==l){var l=a.createTemporaryGraph(f.getStylesheet()),p=
!0,z=!1,y=null,C=null;null==v.viewState&&null==v.root&&a.updatePageRoot(v);null!=v.viewState&&(p=v.viewState.pageVisible,z=v.viewState.mathEnabled,y=v.viewState.background,C=v.viewState.backgroundImage);l.background=y;l.backgroundImage=null!=C?new mxImage(C.src,C.width,C.height):null;l.pageVisible=p;l.mathEnabled=z;var D=l.getGlobalVariable;l.getGlobalVariable=function(b){return"page"==b?v.getName():"pagenumber"==b?n+1:"pagecount"==b?null!=a.pages?a.pages.length:1:D.apply(this,arguments)};document.body.appendChild(l.container);
-a.updatePageRoot(v);l.model.setRoot(v.root)}k=c(l,k,n!=e);l!=d&&l.container.parentNode.removeChild(l.container)}}else k=c(d);null==k?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(k.mathEnabled&&(e=k.wnd.document,e.writeln('<script type="text/x-mathjax-config">'),e.writeln("MathJax.Hub.Config({"),e.writeln("showMathMenu: false,"),e.writeln('messageStyle: "none",'),e.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),e.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),
+a.updatePageRoot(v);l.model.setRoot(v.root)}k=c(l,k,n!=e);l!=f&&l.container.parentNode.removeChild(l.container)}}else k=c(f);null==k?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(k.mathEnabled&&(e=k.wnd.document,e.writeln('<script type="text/x-mathjax-config">'),e.writeln("MathJax.Hub.Config({"),e.writeln("showMathMenu: false,"),e.writeln('messageStyle: "none",'),e.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),e.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),
e.writeln('"HTML-CSS": {'),e.writeln("imageFont: null"),e.writeln("},"),e.writeln("TeX: {"),e.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),e.writeln("},"),e.writeln("tex2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("},"),e.writeln("asciimath2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("}"),e.writeln("});"),b&&(e.writeln("MathJax.Hub.Queue(function () {"),e.writeln("window.print();"),e.writeln("});")),e.writeln("\x3c/script>"),
-e.writeln('<script type="text/javascript" src="'+DRAW_MATH_URL+'/MathJax.js">\x3c/script>')),k.closeDocument(),!k.mathEnabled&&b&&PrintDialog.printPreview(k))}var d=a.editor.graph,l=document.createElement("div"),p=document.createElement("h3");p.style.width="100%";p.style.textAlign="center";p.style.marginTop="0px";mxUtils.write(p,b||mxResources.get("print"));l.appendChild(p);var e=1,g=1,k=document.createElement("div");k.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");k.appendChild(q);p=document.createElement("span");mxUtils.write(p,mxResources.get("printAllPages"));k.appendChild(p);mxUtils.br(k);var z=q.cloneNode(!0);q.setAttribute("checked","checked");z.setAttribute("value","range");k.appendChild(z);p=document.createElement("span");mxUtils.write(p,mxResources.get("pages")+
+e.writeln('<script type="text/javascript" src="'+DRAW_MATH_URL+'/MathJax.js">\x3c/script>')),k.closeDocument(),!k.mathEnabled&&b&&PrintDialog.printPreview(k))}var f=a.editor.graph,l=document.createElement("div"),p=document.createElement("h3");p.style.width="100%";p.style.textAlign="center";p.style.marginTop="0px";mxUtils.write(p,b||mxResources.get("print"));l.appendChild(p);var e=1,g=1,k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";
+var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","all");t.setAttribute("type","radio");t.setAttribute("name","pages-printdialog");k.appendChild(t);p=document.createElement("span");mxUtils.write(p,mxResources.get("printAllPages"));k.appendChild(p);mxUtils.br(k);var z=t.cloneNode(!0);t.setAttribute("checked","checked");z.setAttribute("value","range");k.appendChild(z);p=document.createElement("span");mxUtils.write(p,mxResources.get("pages")+
":");k.appendChild(p);var u=document.createElement("input");u.style.cssText="margin:0 8px 0 8px;";u.setAttribute("value","1");u.setAttribute("type","number");u.setAttribute("min","1");u.style.width="50px";k.appendChild(u);p=document.createElement("span");mxUtils.write(p,mxResources.get("to"));k.appendChild(p);var m=u.cloneNode(!0);k.appendChild(m);mxEvent.addListener(u,"focus",function(){z.checked=!0});mxEvent.addListener(m,"focus",function(){z.checked=!0});mxEvent.addListener(u,"change",c);mxEvent.addListener(m,
"change",c);if(null!=a.pages&&(e=a.pages.length,null!=a.currentPage))for(p=0;p<a.pages.length;p++)if(a.currentPage==a.pages[p]){g=p+1;u.value=g;m.value=g;break}u.setAttribute("max",e);m.setAttribute("max",e);1<e&&l.appendChild(k);var n=document.createElement("div");n.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type","radio");v.setAttribute("name","printZoom");n.appendChild(v);p=document.createElement("span");
mxUtils.write(p,mxResources.get("adjustTo"));n.appendChild(p);var B=document.createElement("input");B.style.cssText="margin:0 8px 0 8px;";B.setAttribute("value","100 %");B.style.width="50px";n.appendChild(B);mxEvent.addListener(B,"focus",function(){v.checked=!0});l.appendChild(n);var k=k.cloneNode(!1),x=v.cloneNode(!0);x.setAttribute("value","fit");v.setAttribute("checked","checked");p=document.createElement("div");p.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";
-p.appendChild(x);k.appendChild(p);n=document.createElement("table");n.style.display="inline-block";var y=document.createElement("tbody"),C=document.createElement("tr"),D=C.cloneNode(!0),t=document.createElement("td"),A=t.cloneNode(!0),I=t.cloneNode(!0),G=t.cloneNode(!0),da=t.cloneNode(!0),W=t.cloneNode(!0);t.style.textAlign="right";G.style.textAlign="right";mxUtils.write(t,mxResources.get("fitTo"));var S=document.createElement("input");S.style.cssText="margin:0 8px 0 8px;";S.setAttribute("value",
+p.appendChild(x);k.appendChild(p);n=document.createElement("table");n.style.display="inline-block";var y=document.createElement("tbody"),C=document.createElement("tr"),D=C.cloneNode(!0),q=document.createElement("td"),A=q.cloneNode(!0),I=q.cloneNode(!0),G=q.cloneNode(!0),da=q.cloneNode(!0),W=q.cloneNode(!0);q.style.textAlign="right";G.style.textAlign="right";mxUtils.write(q,mxResources.get("fitTo"));var S=document.createElement("input");S.style.cssText="margin:0 8px 0 8px;";S.setAttribute("value",
"1");S.setAttribute("min","1");S.setAttribute("type","number");S.style.width="40px";A.appendChild(S);p=document.createElement("span");mxUtils.write(p,mxResources.get("fitToSheetsAcross"));I.appendChild(p);mxUtils.write(G,mxResources.get("fitToBy"));var ia=S.cloneNode(!0);da.appendChild(ia);mxEvent.addListener(S,"focus",function(){x.checked=!0});mxEvent.addListener(ia,"focus",function(){x.checked=!0});p=document.createElement("span");mxUtils.write(p,mxResources.get("fitToSheetsDown"));W.appendChild(p);
-C.appendChild(t);C.appendChild(A);C.appendChild(I);D.appendChild(G);D.appendChild(da);D.appendChild(W);y.appendChild(C);y.appendChild(D);n.appendChild(y);k.appendChild(n);l.appendChild(k);k=document.createElement("div");p=document.createElement("div");p.style.fontWeight="bold";p.style.marginBottom="12px";mxUtils.write(p,mxResources.get("paperSize"));k.appendChild(p);p=document.createElement("div");p.style.marginBottom="12px";var ma=PageSetupDialog.addPageFormatPanel(p,"printdialog",a.editor.graph.pageFormat||
+C.appendChild(q);C.appendChild(A);C.appendChild(I);D.appendChild(G);D.appendChild(da);D.appendChild(W);y.appendChild(C);y.appendChild(D);n.appendChild(y);k.appendChild(n);l.appendChild(k);k=document.createElement("div");p=document.createElement("div");p.style.fontWeight="bold";p.style.marginBottom="12px";mxUtils.write(p,mxResources.get("paperSize"));k.appendChild(p);p=document.createElement("div");p.style.marginBottom="12px";var ma=PageSetupDialog.addPageFormatPanel(p,"printdialog",a.editor.graph.pageFormat||
mxConstants.PAGE_FORMAT_A4_PORTRAIT);k.appendChild(p);p=document.createElement("span");mxUtils.write(p,mxResources.get("pageScale"));k.appendChild(p);var M=document.createElement("input");M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","100 %");M.style.width="60px";k.appendChild(M);l.appendChild(k);p=document.createElement("div");p.style.cssText="text-align:right;margin:48px 0 0 0;";k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&
-p.appendChild(k);a.isOffline()||(n=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),n.className="geBtn",p.appendChild(n));PrintDialog.previewEnabled&&(n=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),n.className="geBtn",p.appendChild(n));n=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});n.className="geBtn gePrimaryBtn";p.appendChild(n);
+p.appendChild(k);a.isOffline()||(n=mxUtils.button(mxResources.get("help"),function(){f.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),n.className="geBtn",p.appendChild(n));PrintDialog.previewEnabled&&(n=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),n.className="geBtn",p.appendChild(n));n=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});n.className="geBtn gePrimaryBtn";p.appendChild(n);
a.editor.cancelFirst||p.appendChild(k);l.appendChild(p);this.container=l};var z=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=
this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(z.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 B=
document.createElement("canvas"),C=new Image;C.onload=function(){try{B.getContext("2d").drawImage(C,0,0);var a=B.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(G){}};C.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(A){}})();
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,d,b){b.ui=a.ui;return d};a.afterDecode=function(a,d,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="12.3.2";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";
-EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":"https://rt.draw.io/cache";Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.logError=function(a,b,c,d,e){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,
-c,d,e);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var f=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",l=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";e=null!=e?e:Error(a);(new Image).src=l+"/log?severity="+f+"&v="+encodeURIComponent(EditorUi.VERSION)+
-"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=e&&null!=e.stack?"&stack="+encodeURIComponent(e.stack):"")}}catch(y){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=
-a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(p){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(p){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=
-[(new Date).toISOString()],b=0;b<arguments.length;b++)a.push(arguments[b]);console.log.apply(console,a)}}catch(p){}};EditorUi.parsePng=function(a,b,c){function f(a,b){var c=l;l+=b;return a.substring(c,l)}function d(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var l=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(f(a,4),"IHDR"!=f(a,4))null!=c&&c();else{f(a,17);do{c=d(a);var p=f(a,4);if(null!=b&&
-b(l-8,p,c))break;value=f(a,c);f(a,4);if("IEND"==p)break}while(c)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle=
-"shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";EditorUi.prototype.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"/>');
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,d,b){b.ui=a.ui;return d};a.afterDecode=function(a,d,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="12.3.3";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";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.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.logError=
+function(a,b,c,d,e){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,d,e);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var f=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",l=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";
+e=null!=e?e:Error(a);(new Image).src=l+"/log?severity="+f+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=e&&null!=e.stack?"&stack="+encodeURIComponent(e.stack):"")}}catch(y){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:
+"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(p){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(p){}};
+EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)a.push(arguments[b]);console.log.apply(console,a)}}catch(p){}};EditorUi.parsePng=function(a,b,c){function d(a,b){var c=l;l+=b;return a.substring(c,l)}function f(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var l=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,
+4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=f(a);var p=d(a,4);if(null!=b&&b(l-8,p,c))break;value=d(a,c);d(a,4);if("IEND"==p)break}while(c)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;
+EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";EditorUi.prototype.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');
EditorUi.prototype.crossOriginImages=!mxClient.IS_IE;EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
-!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(v){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(q){}};c.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(v){}try{b=
+!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(v){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(t){}};c.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(v){}try{b=
document.createElement("canvas");b.width=b.height=1;var d=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==d.match("image/jpeg")}catch(v){}})();EditorUi.prototype.openLink=function(a,b,c){return this.editor.graph.openLink(a,b,c)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);null!=c&&c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);
b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(a){return this.isOfflineApp()||
-!navigator.onLine||!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,c){c=null!=c?c:24;var f=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),d=f.spin;f.spin=function(c,l){var p=!1;this.active||(d.call(this,c),this.active=!0,null!=l&&(p=document.createElement("div"),p.style.position="absolute",p.style.whiteSpace="nowrap",p.style.background="#4B4243",
+!navigator.onLine||!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=d.spin;d.spin=function(c,l){var p=!1;this.active||(f.call(this,c),this.active=!0,null!=l&&(p=document.createElement("div"),p.style.position="absolute",p.style.whiteSpace="nowrap",p.style.background="#4B4243",
p.style.color="white",p.style.fontFamily="Helvetica, Arial",p.style.fontSize="9pt",p.style.padding="6px",p.style.paddingLeft="10px",p.style.paddingRight="10px",p.style.zIndex=2E9,p.style.left=Math.max(0,a)+"px",p.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(p.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(p.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=l.substring(l.length-3,l.length)&&"!"!=
-l.charAt(l.length-1)&&(l+="..."),p.innerHTML=l,c.appendChild(p),f.status=p,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(p.style.left=Math.round(Math.max(0,a-p.offsetWidth/2))+"px",p.style.top=Math.round(Math.max(0,b+70-p.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,l)}));this.stop();return a}),p=!0);return p};var l=f.stop;f.stop=function(){l.call(this);this.active=!1;null!=
-f.status&&(f.status.parentNode.removeChild(f.status),f.status=null)};f.pause=function(){return function(){}};return f};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(u){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&
+l.charAt(l.length-1)&&(l+="..."),p.innerHTML=l,c.appendChild(p),d.status=p,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(p.style.left=Math.round(Math.max(0,a-p.offsetWidth/2))+"px",p.style.top=Math.round(Math.max(0,b+70-p.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,l)}));this.stop();return a}),p=!0);return p};var l=d.stop;d.stop=function(){l.call(this);this.active=!1;null!=
+d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};d.pause=function(){return function(){}};return d};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(u){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&
177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3)};EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;
EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=a.apply(this,arguments);if(null==c)try{var d=b.indexOf("&lt;mxfile ");if(0<=d){var f=b.lastIndexOf("&lt;/mxfile&gt;");f>d&&(c=b.substring(d,f+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var e=mxUtils.parseXml(b),g=this.editor.extractGraphModel(e.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),c=null!=g?mxUtils.getXml(g):""}catch(x){}return c};EditorUi.prototype.validateFileData=
function(a){if(null!=a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+a.slice(b+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a){b=this.editor.graph;b.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");
if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var f=d.length-1;0<=f;f--){var e=this.updatePageRoot(new DiagramPage(d[f]));null==e.getName()&&e.setName(mxResources.get("pageWithNumber",[f+1]));b.model.execute(new ChangePage(this,e,0==f?e:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),
-this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(f=0;f<c.length;f++)b.model.execute(new ChangePage(this,c[f],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,d,e,g,k,n,m,t,z){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;m=null!=m?m:!0;var f,l=null;null==
-c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?f="_blank":l=f=d;if(null==a)return"";var p=a;if("mxfile"!=p.nodeName.toLowerCase()){if(z){var q=a.ownerDocument.createElement("diagram");q.setAttribute("id",Editor.guid());q.appendChild(a)}else{q=Graph.zapGremlins(mxUtils.getXml(a));p=Graph.compress(q);if(Graph.decompress(p)!=q)return q;q=a.ownerDocument.createElement("diagram");q.setAttribute("id",Editor.guid());mxUtils.setTextContent(q,p)}p=a.ownerDocument.createElement("mxfile");p.appendChild(q)}t?
+this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(f=0;f<c.length;f++)b.model.execute(new ChangePage(this,c[f],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,d,e,g,k,n,m,q,z){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;m=null!=m?m:!0;var f,l=null;null==
+c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?f="_blank":l=f=d;if(null==a)return"";var p=a;if("mxfile"!=p.nodeName.toLowerCase()){if(z){var t=a.ownerDocument.createElement("diagram");t.setAttribute("id",Editor.guid());t.appendChild(a)}else{t=Graph.zapGremlins(mxUtils.getXml(a));p=Graph.compress(t);if(Graph.decompress(p)!=t)return t;t=a.ownerDocument.createElement("diagram");t.setAttribute("id",Editor.guid());mxUtils.setTextContent(t,p)}p=a.ownerDocument.createElement("mxfile");p.appendChild(t)}q?
(p=p.cloneNode(!0),p.removeAttribute("modified"),p.removeAttribute("host"),p.removeAttribute("agent"),p.removeAttribute("etag"),p.removeAttribute("userAgent"),p.removeAttribute("version"),p.removeAttribute("editor"),p.removeAttribute("type")):(p.removeAttribute("userAgent"),p.removeAttribute("version"),p.removeAttribute("editor"),p.removeAttribute("pages"),p.removeAttribute("type"),mxClient.IS_CHROMEAPP?p.setAttribute("host","Chrome"):EditorUi.isElectronApp?p.setAttribute("host","Electron"):p.setAttribute("host",
window.location.hostname),p.setAttribute("modified",(new Date).toISOString()),p.setAttribute("agent",navigator.userAgent),p.setAttribute("version",EditorUi.VERSION),p.setAttribute("etag",Editor.guid()),a=null!=c?c.getMode():this.mode,null!=a&&p.setAttribute("type",a),null!=this.pages&&p.setAttribute("pages",this.pages.length));z=z?mxUtils.getPrettyXml(p):mxUtils.getXml(p);if(!g&&!e&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))z=this.getHtml2(mxUtils.getXml(p),b,null!=c?c.getTitle():null,f,l);else if(g||
!e&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),z=this.getEmbeddedSvg(z,b,d,null,n,m,l);return z};EditorUi.prototype.getXmlFileData=function(a,b,c){a=null!=a?a:!0;b=null!=b?b:!1;c=null!=c?c:!Editor.compressXml;var d=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&c?(b=mxUtils.trim(mxUtils.getTextContent(a)),
a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):null==b||c?a=a.cloneNode(!0):(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));d.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(d)),d=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var f=
(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,f);EditorUi.removeChildNodes(this.pages[b].node);mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(f));delete this.pages[b].needsUpdate}a(this.pages[b].node)}return d};EditorUi.prototype.anonymizeString=function(a,b){for(var c=[],d=0;d<a.length;d++){var f=a.charAt(d);0<=EditorUi.ignoredAnonymizedChars.indexOf(f)?c.push(f):isNaN(parseInt(f))?f.toLowerCase()!=
f?c.push(String.fromCharCode(65+Math.round(25*Math.random()))):f.toUpperCase()!=f?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(f)?c.push(" "):c.push("?"):c.push(b?"0":Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var b=0;b<a[EditorUi.DIFF_INSERT].length;b++)try{var c=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][b].data).documentElement.cloneNode(!1);null!=c.getAttribute("name")&&c.setAttribute("name",
-this.anonymizeString(c.getAttribute("name")));a[EditorUi.DIFF_INSERT][b].data=mxUtils.getXml(c)}catch(q){a[EditorUi.DIFF_INSERT][b].data=q.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var f=a[EditorUi.DIFF_UPDATE][d];null!=f.name&&(f.name=this.anonymizeString(f.name));null!=f.cells&&(b=mxUtils.bind(this,function(a){var b=f.cells[a];if(null!=b){for(var c in b)null!=b[c].value&&(b[c].value="["+b[c].value.length+"]"),null!=b[c].xmlValue&&(b[c].xmlValue="["+b[c].xmlValue.length+
+this.anonymizeString(c.getAttribute("name")));a[EditorUi.DIFF_INSERT][b].data=mxUtils.getXml(c)}catch(t){a[EditorUi.DIFF_INSERT][b].data=t.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var f=a[EditorUi.DIFF_UPDATE][d];null!=f.name&&(f.name=this.anonymizeString(f.name));null!=f.cells&&(b=mxUtils.bind(this,function(a){var b=f.cells[a];if(null!=b){for(var c in b)null!=b[c].value&&(b[c].value="["+b[c].value.length+"]"),null!=b[c].xmlValue&&(b[c].xmlValue="["+b[c].xmlValue.length+
"]"),null!=b[c].style&&(b[c].style="["+b[c].style.length+"]"),0==Object.keys(b[c]).length&&delete b[c];0==Object.keys(b).length&&delete f.cells[a]}}),b(EditorUi.DIFF_INSERT),b(EditorUi.DIFF_UPDATE),0==Object.keys(f.cells).length&&delete f.cells);0==Object.keys(f).length&&delete a[EditorUi.DIFF_UPDATE][d]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var c=0;c<a.attributes.length;c++)"as"!=
a.attributes[c].name&&a.setAttribute(a.attributes[c].name,this.anonymizeString(a.attributes[c].value,b));if(null!=a.childNodes)for(c=0;c<a.childNodes.length;c++)this.anonymizeAttributes(a.childNodes[c],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var c=a.getElementsByTagName("mxCell"),d=0;d<c.length;d++)null!=c[d].getAttribute("value")&&c[d].setAttribute("value","["+c[d].getAttribute("value").length+"]"),null!=c[d].getAttribute("xmlValue")&&c[d].setAttribute("xmlValue","["+c[d].getAttribute("xmlValue").length+
"]"),null!=c[d].getAttribute("style")&&c[d].setAttribute("style","["+c[d].getAttribute("style").length+"]"),null!=c[d].parentNode&&"root"!=c[d].parentNode.nodeName&&null!=c[d].parentNode.parentNode&&(c[d].setAttribute("id",c[d].parentNode.getAttribute("id")),c[d].parentNode.parentNode.replaceChild(c[d],c[d].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var b=this.getCurrentFile();null!=b&&(b.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&b.invalidChecksum?
b.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(b.clearAutosave(),this.editor.setStatus(""),a?b.reloadFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)})):b.synchronizeFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,c,d,e,g,k,
-n,m,t){e=null!=e?e:!0;g=null!=g?g:!1;var f=this.editor.graph;if(b||!a&&null!=m&&/(\.svg)$/i.test(m.getTitle()))if(t=!1,null!=this.pages&&this.currentPage!=this.pages[0]){var l=f.getGlobalVariable,f=this.createTemporaryGraph(f.getStylesheet()),p=this.pages[0];f.getGlobalVariable=function(a){return"page"==a?p.getName():"pagenumber"==a?1:l.apply(this,arguments)};document.body.appendChild(f.container);f.model.setRoot(p.root)}k=null!=k?k:this.getXmlFileData(e,g,t);m=null!=m?m:this.getCurrentFile();a=this.createFileData(k,
-f,m,window.location.href,a,b,c,d,e,n,t);f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,e,g){g=null!=g?g:!0;var f=null,l=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var f=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),p=b.view.scale;g=Math.floor(f.x/p-b.view.translate.x);p=Math.floor(f.y/p-b.view.translate.y);f=b.background;null==e&&(b=this.getBasenames().join(";"),0<b.length&&(l=EditorUi.drawHost+
+n,m,q){e=null!=e?e:!0;g=null!=g?g:!1;var f=this.editor.graph;if(b||!a&&null!=m&&/(\.svg)$/i.test(m.getTitle()))if(q=!1,null!=this.pages&&this.currentPage!=this.pages[0]){var l=f.getGlobalVariable,f=this.createTemporaryGraph(f.getStylesheet()),p=this.pages[0];f.getGlobalVariable=function(a){return"page"==a?p.getName():"pagenumber"==a?1:l.apply(this,arguments)};document.body.appendChild(f.container);f.model.setRoot(p.root)}k=null!=k?k:this.getXmlFileData(e,g,q);m=null!=m?m:this.getCurrentFile();a=this.createFileData(k,
+f,m,window.location.href,a,b,c,d,e,n,q);f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,e,g){g=null!=g?g:!0;var f=null,l=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var f=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),p=b.view.scale;g=Math.floor(f.x/p-b.view.translate.x);p=Math.floor(f.y/p-b.view.translate.y);f=b.background;null==e&&(b=this.getBasenames().join(";"),0<b.length&&(l=EditorUi.drawHost+
"/embed.js?s="+b));a.setAttribute("x0",g);a.setAttribute("y0",p)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=d&&a.setAttribute("edit",d));null!=e&&(e=e.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";d=Graph.compress(a);Graph.decompress(d)!=a&&(d=encodeURIComponent(a));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==e?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=e?'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\n":"")+"</head>\n<body"+(null==e&&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;">'+d+
"</div>\n</div>\n"+(null==e?'<script type="text/javascript" src="'+l+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,d,e){b=EditorUi.drawHost+"/js/viewer.min.js";null!=e&&(e=e.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a),
@@ -8382,18 +8391,18 @@ toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&
this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=Editor.extractParserError(a,mxResources.get("invalidOrMissingFile"));if(b)throw Error(b);b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a&&"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<b.length||1==b.length&&b[0].hasAttribute("name"))){var c=null;this.fileNode=a;this.pages=[];for(var d=0;d<b.length;d++)null==
b[d].getAttribute("id")&&b[d].setAttribute("id",d),a=new DiagramPage(b[d]),null==a.getName()&&a.setName(mxResources.get("pageWithNumber",[d+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==urlParams["page-id"]&&(c=a);this.currentPage=null!=c?c:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),
this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var f=urlParams["layer-ids"].split(" ");a={};for(d=0;d<f.length;d++)a[f[d]]=!0;for(var e=this.editor.graph.getModel(),g=e.getChildren(e.root),d=0;d<g.length;d++){var k=g[d];e.setVisible(k,a[k.id]||!1)}}catch(D){}};EditorUi.prototype.getBaseFilename=function(a){var b=
-this.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(b)||/(\.html)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.png)$/i.test(b)||/(\.drawio)$/i.test(b))b=b.substring(0,b.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(b=b+"-"+this.currentPage.getName());return b};EditorUi.prototype.downloadFile=function(a,b,c,d,e,g,k,n,m,t){try{d=
+this.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(b)||/(\.html)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.png)$/i.test(b)||/(\.drawio)$/i.test(b))b=b.substring(0,b.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(b=b+"-"+this.currentPage.getName());return b};EditorUi.prototype.downloadFile=function(a,b,c,d,e,g,k,n,m,q){try{d=
null!=d?d:this.editor.graph.isSelectionEmpty();var f=this.getBaseFilename(!e),l=f+"."+a;if("xml"==a){var p='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,d,e,null,null,null,b);this.saveData(l,a,p,"text/xml")}else if("html"==a)p=this.getHtml2(this.getFileData(!0),this.editor.graph,f),this.saveData(l,a,p,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?l=f+".png":"jpeg"==a&&(l=f+".jpg"),this.saveRequest(l,
-a,mxUtils.bind(this,function(b,c){try{var f=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var l=this.createDownloadRequest(b,a,d,c,k,e,n,m,t);this.editor.graph.pageVisible=f;return l}catch(Q){this.handleError(Q)}}));else{var q=null,u=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(q)}))});if("svg"==
-a){var v=this.editor.graph.background;if(k||v==mxConstants.NONE)v=null;var y=this.editor.graph.getSvg(v,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(y);this.convertImages(y,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();u('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else l=f+".svg",q=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();
-u(a)}),d)}}catch(H){this.handleError(H)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d,e,g,k,n,m){var f=this.editor.graph,l=f.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==g?!1:"xmlpng"!=b);var p="",q="";if(l.width*l.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};l="0";"pdf"==b&&0==g&&(q="&allPages=1");if("xmlpng"==b&&(l="1",b="png",null!=this.pages&&null!=this.currentPage))for(g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){p=
-"&from="+g;break}g=f.background;"png"==b&&e?g=mxConstants.NONE:e||null!=g&&g!=mxConstants.NONE||(g="#ffffff");e={globalVars:f.getExportVariables()};m&&(e.grid={size:f.gridSize,steps:f.view.gridSteps,color:f.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+p+q+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+d+"&embedXml="+l+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(e))+(null!=k?"&scale="+k:"")+(null!=n?"&border="+
+a,mxUtils.bind(this,function(b,c){try{var f=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var l=this.createDownloadRequest(b,a,d,c,k,e,n,m,q);this.editor.graph.pageVisible=f;return l}catch(Q){this.handleError(Q)}}));else{var t=null,u=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(t)}))});if("svg"==
+a){var v=this.editor.graph.background;if(k||v==mxConstants.NONE)v=null;var y=this.editor.graph.getSvg(v,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(y);this.convertImages(y,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();u('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else l=f+".svg",t=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();
+u(a)}),d)}}catch(H){this.handleError(H)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d,e,g,k,n,m){var f=this.editor.graph,l=f.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==g?!1:"xmlpng"!=b);var p="",t="";if(l.width*l.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};l="0";"pdf"==b&&0==g&&(t="&allPages=1");if("xmlpng"==b&&(l="1",b="png",null!=this.pages&&null!=this.currentPage))for(g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){p=
+"&from="+g;break}g=f.background;"png"==b&&e?g=mxConstants.NONE:e||null!=g&&g!=mxConstants.NONE||(g="#ffffff");e={globalVars:f.getExportVariables()};m&&(e.grid={size:f.gridSize,steps:f.view.gridSteps,color:f.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+p+t+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+d+"&embedXml="+l+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(e))+(null!=k?"&scale="+k:"")+(null!=n?"&border="+
n:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,c){var d=window.location.hash,f=mxUtils.bind(this,function(c){var f=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<f.length&&(f+="\n"),f+=c);c=new LocalFile(this,"csv"!=a.format&&0<f.length?f:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return d};this.fileLoaded(c);"csv"==a.format&&this.importCsv(f,mxUtils.bind(this,
function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var l=null!=a.interval?parseInt(a.interval):6E4,p=null,e=mxUtils.bind(this,function(){var b=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){b===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),g()):this.handleError({message:mxResources.get("error")+
" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),g=mxUtils.bind(this,function(){window.clearTimeout(p);p=window.setTimeout(e,l)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){g();e()}));g();e()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var l=a.url;/^https?:\/\//.test(l)&&!this.editor.isCorsEnabledForUrl(l)&&(l=PROXY_URL+"?url="+encodeURIComponent(l));this.loadUrl(l,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=c&&
c(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function b(a){var b=new mxCellOverlay(a.image||f.warningImage,a.tooltip,a.align,a.valign,a.offset);b.addListener(mxEvent.CLICK,function(b,c){d.alert(a.tooltip)});return b}var c=null,d=this;if(null!=a&&0<a.length&&(c=mxUtils.parseXml(a),a=null!=c?c.documentElement:null,null!=a&&"updates"==a.nodeName)){var f=this.editor.graph,e=f.getModel();e.beginUpdate();var g=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var k=e.getCell(a.getAttribute("id"));
if(null!=k){try{var n=a.getAttribute("value");if(null!=n){var m=mxUtils.parseXml(n).documentElement;if(null!=m)if("1"==m.getAttribute("replace-value"))e.setValue(k,m);else for(var z=m.attributes,B=0;B<z.length;B++)f.setAttributeForCell(k,z[B].nodeName,0<z[B].nodeValue.length?z[B].nodeValue:null)}}catch(K){null!=window.console&&console.log("Error in value for "+k.id+": "+K)}try{var C=a.getAttribute("style");null!=C&&f.model.setStyle(k,C)}catch(K){null!=window.console&&console.log("Error in style for "+
-k.id+": "+K)}try{var t=a.getAttribute("icon");if(null!=t){var G=0<t.length?JSON.parse(t):null;null!=G&&G.append||f.removeCellOverlays(k);null!=G&&f.addCellOverlay(k,b(G))}}catch(K){null!=window.console&&console.log("Error in icon for "+k.id+": "+K)}try{var F=a.getAttribute("geometry");if(null!=F){var F=JSON.parse(F),J=f.getCellGeometry(k);if(null!=J){J=J.clone();for(key in F){var H=parseFloat(F[key]);"dx"==key?J.x+=H:"dy"==key?J.y+=H:"dw"==key?J.width+=H:"dh"==key?J.height+=H:J[key]=parseFloat(F[key])}f.model.setGeometry(k,
+k.id+": "+K)}try{var q=a.getAttribute("icon");if(null!=q){var G=0<q.length?JSON.parse(q):null;null!=G&&G.append||f.removeCellOverlays(k);null!=G&&f.addCellOverlay(k,b(G))}}catch(K){null!=window.console&&console.log("Error in icon for "+k.id+": "+K)}try{var F=a.getAttribute("geometry");if(null!=F){var F=JSON.parse(F),J=f.getCellGeometry(k);if(null!=J){J=J.clone();for(key in F){var H=parseFloat(F[key]);"dx"==key?J.x+=H:"dy"==key?J.y+=H:"dw"==key?J.width+=H:"dh"==key?J.height+=H:J[key]=parseFloat(F[key])}f.model.setGeometry(k,
J)}}}catch(K){null!=window.console&&console.log("Error in icon for "+k.id+": "+K)}}}else if("model"==a.nodeName){for(var E=a.firstChild;null!=E&&E.nodeType!=mxConstants.NODETYPE_ELEMENT;)E=E.nextSibling;null!=E&&(new mxCodec(a.firstChild)).decode(E,e)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(f.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))f.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==
a.nodeName&&(g=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{e.endUpdate()}null!=g&&this.chromelessResize&&this.chromelessResize(!0,g)}return c};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,d="",f=c.lastIndexOf(".");0<=f&&(d=c.substring(f),c=c.substring(0,f));if(b)var l=new Date,f=l.getFullYear(),e=l.getMonth()+1,g=l.getDate(),k=l.getHours(),m=l.getMinutes(),l=l.getSeconds(),c=
c+(" "+(f+"-"+e+"-"+g+"-"+k+"-"+m+"-"+l));return c=mxResources.get("copyOf",[c])+d};EditorUi.prototype.fileLoaded=function(a,b){var c=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var d=!1;this.hideDialog();null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var f=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();
@@ -8412,18 +8421,18 @@ var c=b.lastChild,d=c.previousSibling;b.insertBefore(c,a);b.insertBefore(d,c)};E
this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,l=mxUtils.bind(this,function(b,c){0==b.length&&a.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f)):this.addLibraryEntries(b,c)});null!=this.sidebar&&
null!=b&&this.sidebar.addEntries(b);c=null!=c&&0<c.length?c:a.getTitle();var e=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){l(b,a)}));this.repositionLibrary(d);var p=e.parentNode.previousSibling;c=p.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&p.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var g=document.createElement("div");g.style.position="absolute";g.style.right="0px";g.style.top="0px";g.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||
(g.style.backgroundColor="inherit");p.style.position="relative";var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.closeImage);k.setAttribute("title",mxResources.get("close"));k.setAttribute("valign","absmiddle");k.setAttribute("border","0");k.style.margin="0 3px";var z=null;if(".scratchpad"!=a.title||this.closableScratchpad)g.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});
-null!=z?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var m=this.editor.graph,n=null,t=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),e,b,a,a.getMode());mxEvent.consume(c)}),G=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=n&&null!=n.parentNode&&n.parentNode.removeChild(n),n=k.cloneNode(!1),n.setAttribute("src",Editor.spinImage),n.setAttribute("title",
+null!=z?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var m=this.editor.graph,n=null,q=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),e,b,a,a.getMode());mxEvent.consume(c)}),G=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=n&&null!=n.parentNode&&n.parentNode.removeChild(n),n=k.cloneNode(!1),n.setAttribute("src",Editor.spinImage),n.setAttribute("title",
mxResources.get("saving")),n.style.cursor="default",n.style.marginRight="2px",n.style.marginTop="-2px",g.insertBefore(n,g.firstChild),p.style.paddingRight=18*g.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=n&&null!=n.parentNode&&(n.parentNode.removeChild(n),p.style.paddingRight=18*g.childNodes.length+"px")})):null==z&&(z=k.cloneNode(!1),z.setAttribute("src",IMAGE_PATH+"/download.png"),z.setAttribute("title",mxResources.get("save")),g.insertBefore(z,g.firstChild),
mxEvent.addListener(z,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==z||a.isModified()||(p.style.paddingRight=18*g.childNodes.length+"px",z.parentNode.removeChild(z),z=null)});mxEvent.consume(c)})),p.style.paddingRight=18*g.childNodes.length+"px")}),F=mxUtils.bind(this,function(a,c,d,l){a=m.cloneCells(mxUtils.sortCells(m.model.getTopmostCells(a)));for(var p=0;p<a.length;p++){var g=m.getCellGeometry(a[p]);null!=g&&
g.translate(-c.x,-c.y)}e.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,l||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=l&&(a.title=l);b.push(a);G(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),J=mxUtils.bind(this,function(a){if(m.isSelectionEmpty())m.getRubberband().isActive()?(m.getRubberband().execute(a),m.getRubberband().reset()):this.showError(mxResources.get("error"),
mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=m.getSelectionCells(),c=m.view.getBounds(b),d=m.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=m.view.translate.x;c.y-=m.view.translate.y;F(b,c)}mxEvent.consume(a)});mxEvent.addGestureListeners(e,function(){},mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.panningManager&&null!=m.graphHandler.shape&&(m.graphHandler.shape.node.style.visibility="hidden",e.style.backgroundColor="#f1f3f4",e.style.cursor="copy",m.panningManager.stop(),
m.autoScroll=!1,null!=m.graphHandler.guide&&m.graphHandler.guide.setVisible(!1),null!=m.graphHandler.hint&&(m.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.panningManager&&null!=m.graphHandler&&(e.style.backgroundColor="",e.style.cursor="default",this.sidebar.showTooltips=!0,m.panningManager.stop(),m.graphHandler.reset(),m.isMouseDown=!1,m.autoScroll=!0,J(a),mxEvent.consume(a))}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,
function(a){m.isMouseDown&&null!=m.graphHandler.shape&&(m.graphHandler.shape.node.style.visibility="visible",e.style.backgroundColor="",e.style.cursor="",m.autoScroll=!0,null!=m.graphHandler.guide&&m.graphHandler.guide.setVisible(!0),null!=m.graphHandler.hint&&(m.graphHandler.hint.style.visibility="visible"))}));Graph.fileSupport&&(mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(a){e.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";e.style.cursor="copy";this.sidebar.hideTooltip();
-a.stopPropagation();a.preventDefault()})),mxEvent.addListener(e,"drop",mxUtils.bind(this,function(a){e.style.cursor="";e.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,p,g,k,q,z,m,n){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,k,q),c)],c[0].vertex=!0,F(c,new mxRectangle(0,
-0,k,q),a,mxEvent.isAltDown(a)?null:z.substring(0,z.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var u=!1,B=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var p=mxUtils.parseXml(c);if("mxlibrary"==p.documentElement.nodeName)try{var g=JSON.parse(mxUtils.getTextContent(p.documentElement));l(g,e);b=b.concat(g);G(a);this.spinner.stop();u=!0}catch(R){}else if("mxfile"==p.documentElement.nodeName)try{for(var k=p.documentElement.getElementsByTagName("diagram"),
-p=0;p<k.length;p++){var q=this.stringToCells(Editor.getDiagramNodeXml(k[p])),z=this.editor.graph.getBoundingBoxFromGeometry(q);F(q,new mxRectangle(0,0,z.width,z.height),a)}u=!0}catch(R){null!=window.console&&console.log("error in drop handler:",R)}}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=n&&null!=z&&(/(\.v(dx|sdx?))($|\?)/i.test(z)||/(\.vs(x|sx?))($|\?)/i.test(z))?
+a.stopPropagation();a.preventDefault()})),mxEvent.addListener(e,"drop",mxUtils.bind(this,function(a){e.style.cursor="";e.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,p,g,k,t,z,m,n){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,k,t),c)],c[0].vertex=!0,F(c,new mxRectangle(0,
+0,k,t),a,mxEvent.isAltDown(a)?null:z.substring(0,z.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var u=!1,B=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var p=mxUtils.parseXml(c);if("mxlibrary"==p.documentElement.nodeName)try{var g=JSON.parse(mxUtils.getTextContent(p.documentElement));l(g,e);b=b.concat(g);G(a);this.spinner.stop();u=!0}catch(R){}else if("mxfile"==p.documentElement.nodeName)try{for(var k=p.documentElement.getElementsByTagName("diagram"),
+p=0;p<k.length;p++){var t=this.stringToCells(Editor.getDiagramNodeXml(k[p])),z=this.editor.graph.getBoundingBoxFromGeometry(t);F(t,new mxRectangle(0,0,z.width,z.height),a)}u=!0}catch(R){null!=window.console&&console.log("error in drop handler:",R)}}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=n&&null!=z&&(/(\.v(dx|sdx?))($|\?)/i.test(z)||/(\.vs(x|sx?))($|\?)/i.test(z))?
this.importVisio(n,function(a){B(a,"text/xml")},null,z):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,z)&&null!=n?this.parseFile(n,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?B(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):B(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(e,"dragleave",
-function(a){e.style.cursor="";e.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));k=k.cloneNode(!1);k.setAttribute("src",Editor.editImage);k.setAttribute("title",mxResources.get("edit"));g.insertBefore(k,g.firstChild);mxEvent.addListener(k,"click",t);mxEvent.addListener(e,"dblclick",function(a){mxEvent.getSource(a)==e&&t(a)});c=k.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));g.insertBefore(c,g.firstChild);mxEvent.addListener(c,
+function(a){e.style.cursor="";e.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));k=k.cloneNode(!1);k.setAttribute("src",Editor.editImage);k.setAttribute("title",mxResources.get("edit"));g.insertBefore(k,g.firstChild);mxEvent.addListener(k,"click",q);mxEvent.addListener(e,"dblclick",function(a){mxEvent.getSource(a)==e&&q(a)});c=k.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));g.insertBefore(c,g.firstChild);mxEvent.addListener(c,
"click",J);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),g.insertBefore(c,g.firstChild))}p.appendChild(g);p.style.paddingRight=18*g.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=
function(a,b){for(var c=0;c<a.length;c++){var d=a[c],f=d.data;if(null!=f){var f=this.convertDataUri(f),l="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(l+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(l+"image="+f,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(f=this.stringToCells(Graph.decompress(d.xml)),0<f.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(f,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=
function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.offline||EditorUi.isElectronApp||("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.createFooter=function(){return document.getElementById("geFooter")});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?
@@ -8434,12 +8443,12 @@ Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAM
!0;this.editor.graph.model.execute(a)});var b=new BackgroundImageDialog(this,mxUtils.bind(this,function(b){a(b)}));this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,d,e){a=new LibraryDialog(this,a,b,c,d,e);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var c=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var b=
c.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&b.refresh()}));return b};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position="absolute";a.style.overflow="hidden";var b=document.createElement("a");b.className="geTitle";b.style.color="#DF6C0C";b.style.fontWeight="bold";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML=
'<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c,d,e,g){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},
-l=null!=a&&null!=a.error?a.error:a;if(null!=l||null!=b){var p=mxUtils.htmlEntities(mxResources.get("unknownError")),k=mxResources.get("ok"),q=null;b=null!=b?b:mxResources.get("error");if(null!=l){null!=l.retry&&(k=mxResources.get("cancel"),q=function(){f();l.retry()});if(404==l.code||404==l.status||403==l.code){var p=403==l.code?null!=l.message?mxUtils.htmlEntities(l.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=e?e:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
+l=null!=a&&null!=a.error?a.error:a;if(null!=l||null!=b){var p=mxUtils.htmlEntities(mxResources.get("unknownError")),k=mxResources.get("ok"),t=null;b=null!=b?b:mxResources.get("error");if(null!=l){null!=l.retry&&(k=mxResources.get("cancel"),t=function(){f();l.retry()});if(404==l.code||404==l.status||403==l.code){var p=403==l.code?null!=l.message?mxUtils.htmlEntities(l.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=e?e:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":"")),m=null!=g?g:window.location.hash;if(null!=m&&("#G"==m.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==m.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==l.code||404==l.status)){m="#U"==m.substring(0,2)?m.substring(45,
-m.lastIndexOf("%26ex")):m.substring(2);this.showError(b,p,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+m);this.handleError(a,b,c,d,e)}),q,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){f.innerHTML="";for(var a=0;a<b.length;a++){var c=document.createElement("option");mxUtils.write(c,b[a].displayName);c.value=a;f.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";
+m.lastIndexOf("%26ex")):m.substring(2);this.showError(b,p,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+m);this.handleError(a,b,c,d,e)}),t,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){f.innerHTML="";for(var a=0;a<b.length;a++){var c=document.createElement("option");mxUtils.write(c,b[a].displayName);c.value=a;f.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";
mxUtils.write(c,"<"+b[a].email+">");c.setAttribute("disabled","disabled");f.appendChild(c)}c=document.createElement("option");mxUtils.write(c,mxResources.get("addAccount"));c.value=b.length;f.appendChild(c)}var b=this.drive.getUsersList(),c=document.createElement("div"),d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+": ");c.appendChild(d);var f=document.createElement("select");f.style.width="200px";a();mxEvent.addListener(f,"change",mxUtils.bind(this,
function(){var c=f.value,d=b.length!=c;d&&this.drive.setUser(b[c]);this.drive.authorize(d,mxUtils.bind(this,function(){d||(b=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),!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,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=c&&c()}),480,150);return}}null!=l.message?
-p=mxUtils.htmlEntities(l.message):null!=l.response&&null!=l.response.error?p=mxUtils.htmlEntities(l.response.error):"undefined"!==typeof window.App&&(l.code==App.ERROR_TIMEOUT?p=mxUtils.htmlEntities(mxResources.get("timeout")):l.code==App.ERROR_BUSY&&(p=mxUtils.htmlEntities(mxResources.get("busy"))))}var n=g=null;null!=l&&null!=l.helpLink&&(g=mxResources.get("help"),n=mxUtils.bind(this,function(){return this.editor.graph.openLink(l.helpLink)}));this.showError(b,p,k,c,q,null,null,g,n,null,null,null,
+p=mxUtils.htmlEntities(l.message):null!=l.response&&null!=l.response.error?p=mxUtils.htmlEntities(l.response.error):"undefined"!==typeof window.App&&(l.code==App.ERROR_TIMEOUT?p=mxUtils.htmlEntities(mxResources.get("timeout")):l.code==App.ERROR_BUSY&&(p=mxUtils.htmlEntities(mxResources.get("busy"))))}var n=g=null;null!=l&&null!=l.helpLink&&(g=mxResources.get("help"),n=mxUtils.bind(this,function(){return this.editor.graph.openLink(l.helpLink)}));this.showError(b,p,k,c,t,null,null,g,n,null,null,null,
d?c:null)}else null!=c&&c()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,c,d,e,g){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){f();null!=b&&b()},function(){f();null!=c&&c()},d,e,null,null,null,null,l);this.showDialog(a.container,340,46+
l,!0,g);a.init()};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||(!mxClient.IS_SF||!this.editor.graph.mathEnabled)&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,
b,c,d){var f=a.toDataURL("image/"+c);if(6>=f.length||f==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(f=this.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(b)));0<d&&(f=this.writeGraphModelToPng(f,"pHYs","dpi",d));return f};EditorUi.prototype.saveCanvas=function(a,b,c,d,e){var f="jpeg"==c?"jpg":c;d=this.getBaseFilename(d)+"."+f;a=this.createImageDataUri(a,b,c,e);this.saveData(d,f,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=
@@ -8458,8 +8467,8 @@ this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.
f){return this.createEchoRequest(c,a,d,e,b,f)}),c,e,d)};EditorUi.prototype.saveRequest=function(a,b,c,d,e,g,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var f=this.getServiceCount(!1);isLocalStorage&&f++;var l=4>=f?2:6<f?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,f){if("_blank"==f||null!=a&&0<a.length){var e=c("_blank"==f?null:a,f==App.MODE_DEVICE||"download"==f||null==f||"_blank"==f?"0":"1");null!=e&&(f==App.MODE_DEVICE||"download"==f||"_blank"==f?e.simulate(document,"_blank"):
this.pickFolder(f,mxUtils.bind(this,function(c){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=d)try{this.exportFile(d,a,g,!0,f,c)}catch(A){this.handleError(A)}else this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&299>=e.getStatus())try{this.exportFile(e.getText(),a,g,!0,f,c)}catch(A){this.handleError(A)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();
this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,k,null,1<f,l,d,g,e);f=this.isServices(f)?4<f?390:270:160;this.showDialog(a.container,380,f,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,d,e,g){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=
-function(a,b,c,d,e,g,k,m,n,t){if(this.spinner.spin(document.body,mxResources.get("export")))try{var f=this.editor.graph.isSelectionEmpty();c=null!=c?c:f;var l=b?null:this.editor.graph.background;l==mxConstants.NONE&&(l=null);null==l&&0==b&&(l="#ffffff");var p=this.editor.graph.getSvg(l,a,k,m,null,c,null,null,"blank"==t?"_blank":"self"==t?"_top":null,null,!0);d&&this.editor.graph.addSvgShadow(p);var q=this.getBaseFilename()+".svg",u=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",
-this.getFileData(!0,null,null,null,c,n,null,null,null,!1));var b='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(q,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.editor.addFontCss(p);this.editor.graph.mathEnabled&&
+function(a,b,c,d,e,g,k,m,n,q){if(this.spinner.spin(document.body,mxResources.get("export")))try{var f=this.editor.graph.isSelectionEmpty();c=null!=c?c:f;var l=b?null:this.editor.graph.background;l==mxConstants.NONE&&(l=null);null==l&&0==b&&(l="#ffffff");var p=this.editor.graph.getSvg(l,a,k,m,null,c,null,null,"blank"==q?"_blank":"self"==q?"_top":null,null,!0);d&&this.editor.graph.addSvgShadow(p);var t=this.getBaseFilename()+".svg",u=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",
+this.getFileData(!0,null,null,null,c,n,null,null,null,!1));var b='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(t,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.editor.addFontCss(p);this.editor.graph.mathEnabled&&
this.editor.addMathCss(p);g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(p,u,this.thumbImageCache)):u(p)}catch(F){this.handleError(F)}};EditorUi.prototype.addRadiobox=function(a,b,c,d,e,g,k){return this.addCheckbox(a,c,d,e,g,k,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,c,d,e,g,k,m){g=null!=g?g:!0;var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type",k?"radio":"checkbox");k="geCheckbox-"+Editor.guid();f.id=
k;null!=m&&f.setAttribute("name",m);c&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);d&&f.setAttribute("disabled","disabled");g&&(a.appendChild(f),c=document.createElement("label"),mxUtils.write(c,b),c.setAttribute("for",k),a.appendChild(c),e||mxUtils.br(a));return f};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),f="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=
App.MODE_BROWSER&&(f=window.location.href);var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");e.appendChild(d);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,
@@ -8469,52 +8478,52 @@ d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.clas
(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",l=null,l=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();l.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";l.style.marginLeft="4px";l.style.height="22px";l.style.width=
"22px";l.style.position="relative";l.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";l.className="geColorBtn";a.appendChild(l);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,g,k,m){var f=this.getCurrentFile(),l=[];d&&(l.push("lightbox=1"),"auto"!=a&&l.push("target="+a),null!=b&&b!=mxConstants.NONE&&l.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),
null!=e&&0<e.length&&l.push("edit="+encodeURIComponent(e)),g&&l.push("layers=1"),this.editor.graph.foldingEnabled&&l.push("nav=1"));c&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&l.push("page-id="+this.currentPage.getId());a=!0;null!=k?c="#U"+encodeURIComponent(k):(f=this.getCurrentFile(),m||null==f||f.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
-(c="#"+f.getHash(),a=!1));a&&null!=f&&null!=f.getTitle()&&f.getTitle()!=this.defaultFilename&&l.push("title="+encodeURIComponent(f.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host+"/")+(0<l.length?"?"+l.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,g,k,m,n,t,z){this.getBasenames();var f={};""!=e&&e!=mxConstants.NONE&&(f.highlight=e);"auto"!==d&&(f.target=d);n||(f.lightbox=
-!1);f.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(f.zoom=c/100);c=[];k&&(c.push("pages"),f.resize=!0,null!=this.pages&&null!=this.currentPage&&(f.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),f.resize=!0);m&&c.push("layers");0<c.length&&(n&&c.push("lightbox"),f.toolbar=c.join(" "));null!=t&&0<t.length&&(f.edit=t);null!=a?f.url=a:f.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":
+(c="#"+f.getHash(),a=!1));a&&null!=f&&null!=f.getTitle()&&f.getTitle()!=this.defaultFilename&&l.push("title="+encodeURIComponent(f.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host+"/")+(0<l.length?"?"+l.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,g,k,m,n,q,z){this.getBasenames();var f={};""!=e&&e!=mxConstants.NONE&&(f.highlight=e);"auto"!==d&&(f.target=d);n||(f.lightbox=
+!1);f.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(f.zoom=c/100);c=[];k&&(c.push("pages"),f.resize=!0,null!=this.pages&&null!=this.currentPage&&(f.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),f.resize=!0);m&&c.push("layers");0<c.length&&(n&&c.push("lightbox"),f.toolbar=c.join(" "));null!=q&&0<q.length&&(f.edit=q);null!=a?f.url=a:f.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":
"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(f))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";z(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var f=document.createElement("div");
f.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("html"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(e);var l=document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name",
"type-embedhtmldialog");e=g.cloneNode(!0);e.setAttribute("value","copy");l.appendChild(e);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));l.appendChild(k);mxUtils.br(l);l.appendChild(g);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));l.appendChild(k);var p=this.getCurrentFile();null==c&&null!=p&&p.constructor==window.DriveFile&&(k=document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.setAttribute("href",
"javascript:void(0);"),mxUtils.write(k,mxResources.get("share")),l.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(p.getId())})));e.setAttribute("checked","checked");null==c&&g.setAttribute("disabled","disabled");f.appendChild(l);var m=this.addLinkSection(f),n=this.addCheckbox(f,mxResources.get("zoom"),!0,null,!0);mxUtils.write(f,":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";
-u.style.width="60px";u.style.marginLeft="4px";u.style.marginRight="12px";u.value="100%";f.appendChild(u);var t=this.addCheckbox(f,mxResources.get("fit"),!0),l=null!=this.pages&&1<this.pages.length,G=G=this.addCheckbox(f,mxResources.get("allPages"),l,!l),F=this.addCheckbox(f,mxResources.get("layers"),!0),J=this.addCheckbox(f,mxResources.get("lightbox"),!0),H=this.addEditButton(f,J),E=H.getEditInput();E.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?E.removeAttribute("disabled"):
-E.setAttribute("disabled","disabled");E.checked&&J.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,f,mxUtils.bind(this,function(){d(g.checked?c:null,n.checked,u.value,m.getTarget(),m.getColor(),t.checked,G.checked,F.checked,J.checked,H.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);e.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,g){var f=document.createElement("div");f.style.whiteSpace=
+u.style.width="60px";u.style.marginLeft="4px";u.style.marginRight="12px";u.value="100%";f.appendChild(u);var q=this.addCheckbox(f,mxResources.get("fit"),!0),l=null!=this.pages&&1<this.pages.length,G=G=this.addCheckbox(f,mxResources.get("allPages"),l,!l),F=this.addCheckbox(f,mxResources.get("layers"),!0),J=this.addCheckbox(f,mxResources.get("lightbox"),!0),H=this.addEditButton(f,J),E=H.getEditInput();E.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?E.removeAttribute("disabled"):
+E.setAttribute("disabled","disabled");E.checked&&J.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,f,mxUtils.bind(this,function(){d(g.checked?c:null,n.checked,u.value,m.getTarget(),m.getColor(),q.checked,G.checked,F.checked,J.checked,H.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);e.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,g){var f=document.createElement("div");f.style.whiteSpace=
"nowrap";var l=document.createElement("h3");mxUtils.write(l,a||mxResources.get("link"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var k=this.getCurrentFile(),l="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=k&&k.constructor==window.DriveFile&&!b){a=80;var l="https://desk.draw.io/support/solutions/articles/16000039384",p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
var 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(k.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.setAttribute("href","javascript:void(0);");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(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var q=null,n=null;if(null!=c||null!=d)a+=30,mxUtils.write(f,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%",f.appendChild(q),mxUtils.write(f,mxResources.get("height")+":"),n=document.createElement("input"),n.setAttribute("type","text"),n.style.width="50px",n.style.marginLeft="6px",n.style.marginBottom="10px",n.value=d+"px",f.appendChild(n),mxUtils.br(f);var u=this.addLinkSection(f,g);c=null!=this.pages&&1<this.pages.length;var v=null;
-if(null==k||k.constructor!=window.DriveFile||b)v=this.addCheckbox(f,mxResources.get("allPages"),c,!c);var t=this.addCheckbox(f,mxResources.get("lightbox"),!0),J=this.addEditButton(f,t),H=J.getEditInput(),E=this.addCheckbox(f,mxResources.get("layers"),!0);E.style.marginLeft=H.style.marginLeft;E.style.marginBottom="16px";E.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(E.removeAttribute("disabled"),H.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),H.setAttribute("disabled",
-"disabled"));H.checked&&t.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){e(u.getTarget(),u.getColor(),null==v?!0:v.checked,t.checked,J.getLink(),E.checked,null!=q?q.value:null,null!=n?n.value:null)}),null,mxResources.get("create"),l);this.showDialog(b.container,340,254+a,!0,!0);null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():
+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(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var n=null,t=null;if(null!=c||null!=d)a+=30,mxUtils.write(f,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%",f.appendChild(n),mxUtils.write(f,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=d+"px",f.appendChild(t),mxUtils.br(f);var u=this.addLinkSection(f,g);c=null!=this.pages&&1<this.pages.length;var v=null;
+if(null==k||k.constructor!=window.DriveFile||b)v=this.addCheckbox(f,mxResources.get("allPages"),c,!c);var q=this.addCheckbox(f,mxResources.get("lightbox"),!0),J=this.addEditButton(f,q),H=J.getEditInput(),E=this.addCheckbox(f,mxResources.get("layers"),!0);E.style.marginLeft=H.style.marginLeft;E.style.marginBottom="16px";E.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(E.removeAttribute("disabled"),H.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),H.setAttribute("disabled",
+"disabled"));H.checked&&q.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){e(u.getTarget(),u.getColor(),null==v?!0:v.checked,q.checked,J.getLink(),E.checked,null!=n?n.value:null,null!=t?t.value:null)}),null,mxResources.get("create"),l);this.showDialog(b.container,340,254+a,!0,!0);null!=n?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():
document.execCommand("selectAll",!1,null)):u.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d,e){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:"+(e?"10":"4")+"px";f.appendChild(l);if(e){mxUtils.write(f,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginRight=
"16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";f.appendChild(g);mxUtils.write(f,mxResources.get("borderWidth")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.value=this.lastExportBorder||"0";f.appendChild(k);mxUtils.br(f)}var p=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),m=d?null:this.addCheckbox(f,
mxResources.get("includeCopyOfMyDiagram"),!0),l=this.editor.graph,n=d?null:this.addCheckbox(f,mxResources.get("transparentBackground"),l.background==mxConstants.NONE||null==l.background);null!=n&&(n.style.marginBottom="16px");a=new CustomDialog(this,f,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,b=parseInt(k.value)||0;c(!p.checked,null!=m?m.checked:!1,null!=n?n.checked:!1,a,b)}),null,a,b);this.showDialog(a.container,300,(e?25:0)+(d?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
-function(a,b,c,d,e,g,k,m){k=null!=k?k:!0;var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=this.editor.graph,p="jpeg"==m?196:300,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";f.appendChild(n);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 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";f.appendChild(u);mxUtils.br(f);var t=this.addCheckbox(f,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=m),v=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),y=document.createElement("input");
+function(a,b,c,d,e,g,k,m){k=null!=k?k:!0;var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=this.editor.graph,p="jpeg"==m?196:300,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";f.appendChild(n);mxUtils.write(f,mxResources.get("zoom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight=
+"12px";t.value=this.lastExportZoom||"100%";f.appendChild(t);mxUtils.write(f,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";f.appendChild(u);mxUtils.br(f);var q=this.addCheckbox(f,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=m),v=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),y=document.createElement("input");
y.style.marginTop="16px";y.style.marginRight="8px";y.style.marginLeft="24px";y.setAttribute("disabled","disabled");y.setAttribute("type","checkbox");g&&(f.appendChild(y),mxUtils.write(f,mxResources.get("crop")),mxUtils.br(f),p+=26,mxEvent.addListener(v,"change",function(){v.checked?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));l.isSelectionEmpty()||(y.setAttribute("checked","checked"),y.defaultChecked=!0);var x=this.addCheckbox(f,mxResources.get("shadow"),l.shadowVisible),
E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||E.setAttribute("disabled","disabled");b&&(f.appendChild(E),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f),p+=26);var K=null;if("png"==m||"jpeg"==m)K=this.addCheckbox(f,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),p+=26;var N=this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),k,null,null,
"jpeg"!=m),Q=null!=this.pages&&1<this.pages.length,Y=this.addCheckbox(f,Q?mxResources.get("allPages"):"",Q,!Q,null,"jpeg"!=m);Y.style.marginLeft="24px";Y.style.marginBottom="16px";Q||(Y.style.display="none");mxEvent.addListener(N,"change",function(){N.checked&&Q?Y.removeAttribute("disabled"):Y.setAttribute("disabled","disabled")});k&&Q||Y.setAttribute("disabled","disabled");var T=document.createElement("select");T.style.maxWidth="260px";T.style.marginLeft="8px";T.style.marginRight="10px";T.className=
"geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));T.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));T.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));T.appendChild(a);"svg"==m&&(mxUtils.write(f,mxResources.get("links")+":"),f.appendChild(T),mxUtils.br(f),mxUtils.br(f),
-p+=26);c=new CustomDialog(this,f,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=q.value;e(q.value,t.checked,!v.checked,x.checked,N.checked,E.checked,u.value,y.checked,!Y.checked,T.value,null!=K?K.checked:null)}),null,c,d);this.showDialog(c.container,340,p,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,
-b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(g)}var k=this.addCheckbox(f,mxResources.get("fit"),!0),p=this.addCheckbox(f,mxResources.get("shadow"),l.shadowVisible&&d,!d),m=this.addCheckbox(f,c),n=this.addCheckbox(f,mxResources.get("lightbox"),!0),u=this.addEditButton(f,n),t=u.getEditInput(),
-v=1<l.model.getChildCount(l.model.getRoot()),F=this.addCheckbox(f,mxResources.get("layers"),v,!v);F.style.marginLeft=t.style.marginLeft;F.style.marginBottom="12px";F.style.marginTop="8px";mxEvent.addListener(n,"change",function(){n.checked?(v&&F.removeAttribute("disabled"),t.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"));t.checked&&n.checked?u.getEditSelect().removeAttribute("disabled"):u.getEditSelect().setAttribute("disabled","disabled")});
+p+=26);c=new CustomDialog(this,f,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=t.value;e(t.value,q.checked,!v.checked,x.checked,N.checked,E.checked,u.value,y.checked,!Y.checked,T.value,null!=K?K.checked:null)}),null,c,d);this.showDialog(c.container,340,p,!0,!0,null,null,null,null,!0);t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,
+b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(g)}var k=this.addCheckbox(f,mxResources.get("fit"),!0),p=this.addCheckbox(f,mxResources.get("shadow"),l.shadowVisible&&d,!d),m=this.addCheckbox(f,c),n=this.addCheckbox(f,mxResources.get("lightbox"),!0),u=this.addEditButton(f,n),q=u.getEditInput(),
+v=1<l.model.getChildCount(l.model.getRoot()),F=this.addCheckbox(f,mxResources.get("layers"),v,!v);F.style.marginLeft=q.style.marginLeft;F.style.marginBottom="12px";F.style.marginTop="8px";mxEvent.addListener(n,"change",function(){n.checked?(v&&F.removeAttribute("disabled"),q.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"));q.checked&&n.checked?u.getEditSelect().removeAttribute("disabled"):u.getEditSelect().setAttribute("disabled","disabled")});
b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(k.checked,p.checked,m.checked,n.checked,u.getLink(),F.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,g,k,m){function f(b){var f=" ",p="";d&&(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.drawHost+"/?client=1&lightbox=1"+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");var m="";c&&(m=' width="'+Math.round(l.width)+'" height="'+Math.round(l.height)+'"');k('<img src="'+b+'"'+m+(""!=p?' style="'+p+'"':"")+f+"/>")}var l=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");f(a)}),null,null,null,
mxUtils.bind(this,function(a){m({message:mxResources.get("unknownError")})}),null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),l.width*l.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var p="";c&&(p="&w="+Math.round(2*l.width)+"&h="+Math.round(2*l.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+p+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?f("data:image/png;base64,"+n.getText()):m({message:mxResources.get("unknownError")})}))}else m({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,g,k){var f=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!c),l=f.getElementsByTagName("a");if(null!=l)for(var p=0;p<l.length;p++){var m=l[p].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==l[p].getAttribute("target")&&l[p].removeAttribute("target")}d&&f.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(f);if(c){var n=" ",q="";d&&(n="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.drawHost+"/?client=1&lightbox=1"+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",q+="cursor:pointer;");a&&(q+="max-width:100%;");this.convertImages(f,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=q?' style="'+q+'"':"")+n+"/>")}))}else q="",d&&(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.drawHost+"/?client=1&lightbox=1"+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),a&&(a=parseInt(f.getAttribute("width")),b=parseInt(f.getAttribute("height")),f.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),q+="max-width:100%;max-height:"+b+"px;",f.removeAttribute("height")),""!=q&&f.setAttribute("style",q),this.editor.addFontCss(f),this.editor.graph.mathEnabled&&this.editor.addMathCss(f),k(mxUtils.getXml(f))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-
+EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,g,k){var f=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!c),l=f.getElementsByTagName("a");if(null!=l)for(var p=0;p<l.length;p++){var m=l[p].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==l[p].getAttribute("target")&&l[p].removeAttribute("target")}d&&f.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(f);if(c){var n=" ",t="";d&&(n="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.drawHost+"/?client=1&lightbox=1"+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",t+="cursor:pointer;");a&&(t+="max-width:100%;");this.convertImages(f,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=t?' style="'+t+'"':"")+n+"/>")}))}else t="",d&&(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.drawHost+"/?client=1&lightbox=1"+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),a&&(a=parseInt(f.getAttribute("width")),b=parseInt(f.getAttribute("height")),f.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),t+="max-width:100%;max-height:"+b+"px;",f.removeAttribute("height")),""!=t&&f.setAttribute("style",t),this.editor.addFontCss(f),this.editor.graph.mathEnabled&&this.editor.addMathCss(f),k(mxUtils.getXml(f))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-
a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==
-a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],f=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:f.apply(this,arguments)}}}null!=c&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(q){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){try{var d=this.editor.graph,f=null;if(null!=
+a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],f=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:f.apply(this,arguments)}}}null!=c&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(t){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){try{var d=this.editor.graph,f=null;if(null!=
c&&0<c.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,!0),d),f=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),e=d.getGlobalVariable,l=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(d.container);
d.model.setRoot(l.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==f&&(f=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var e=c.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"tEXt","mxfile",encodeURIComponent(f));a(e.substring(e.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(I){null!=b&&b(I)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)}catch(y){null!=
b&&b(y)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,g,k){k=b.background;k==mxConstants.NONE&&(k=null);g=b.getSvg(k,null,null,null,null,g);b.shadowVisible&&b.addSvgShadow(g);null!=a&&g.setAttribute("content",a);null!=c&&g.setAttribute("resource",c);if(null!=e)this.convertImages(g,mxUtils.bind(this,function(a){e((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(a))}));else return(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(g)};EditorUi.prototype.exportImage=function(a,b,c,d,e,g,k,m,n,t,z){n=null!=n?n:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var f=this.editor.graph.isSelectionEmpty();c=null!=c?c:f;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,
-e?this.getFileData(!0,null,null,null,c,m):null,n,null==this.pages||0==this.pages.length,z)}catch(A){"Invalid image"==A.message?this.downloadFile(n):this.handleError(A)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,g,k,t)}catch(C){this.spinner.stop(),this.handleError(C)}}};EditorUi.prototype.embedCssFonts=function(a,b){function c(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","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(g)};EditorUi.prototype.exportImage=function(a,b,c,d,e,g,k,m,n,q,z){n=null!=n?n:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var f=this.editor.graph.isSelectionEmpty();c=null!=c?c:f;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,
+e?this.getFileData(!0,null,null,null,c,m):null,n,null==this.pages||0==this.pages.length,z)}catch(A){"Invalid image"==A.message?this.downloadFile(n):this.handleError(A)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,g,k,q)}catch(C){this.spinner.stop(),this.handleError(C)}}};EditorUi.prototype.embedCssFonts=function(a,b){function c(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")}
var d=a.split("url("),f=0;null==this.cachedFonts&&(this.cachedFonts={});var e=mxUtils.bind(this,function(){if(0==f){for(var a=[d[0]],e=1;e<d.length;e++){var g=d[e].indexOf(")");a.push('url("');a.push(this.cachedFonts[c(d[e].substring(0,g))]);a.push('"'+d[e].substring(g))}b(a.join(""))}});if(0<d.length){for(var g=1;g<d.length;g++){var l=d[g].indexOf(")"),k=null,m=d[g].indexOf("format(",l);0<m&&(k=c(d[g].substring(m+7,d[g].indexOf(")",m))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]=
a;f++;var b="application/x-font-ttf";if("svg"==k||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==k||"embedded-opentype"==k||/(\.otf)($|\?)/i.test(a))b="application/x-font-opentype";else if("woff"==k||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==k||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==k||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==k||/(\.sfnt)($|\?)/i.test(a))b="application/font-sfnt";var c=a;/^https?:\/\//.test(c)&&
!this.editor.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){this.cachedFonts[a]=b;f--;e()}),mxUtils.bind(this,function(a){f--;e()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(c(d[g].substring(0,l)),k)}e()}else b(a)};EditorUi.prototype.loadFonts=function(a){null!=this.editor.fontCss&&null==this.editor.resolvedFontCss?this.embedCssFonts(this.editor.fontCss,mxUtils.bind(this,function(b){this.editor.resolvedFontCss=b;a()})):a()};EditorUi.prototype.embedExtFonts=
function(a){var b=this.editor.graph.extFonts;if(null!=b&&0<b.length){var c="",d=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var f=mxUtils.bind(this,function(){0==d&&this.embedCssFonts(c,a)}),e=0;e<b.length;e++){var g=b[e].name,k=b[e].url;0==k.indexOf(Editor.GOOGLE_FONTS)?null==this.cachedGoogleFonts[k]?(d++,this.loadUrl(k,mxUtils.bind(this,function(a){this.cachedGoogleFonts[k]=a;c+=a;d--;f()}),mxUtils.bind(this,function(a){d--;c+="@import url("+k+");";f()}))):c+=this.cachedGoogleFonts[k]:
-c+='@font-face {font-family: "'+g+'";src: url("'+k+'");}'}f()}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,g,k,m,n,t,z,B,C,A,G){try{g=null!=g?g:!0;k=null!=k?k:!0;B=null!=B?B:this.editor.graph;C=null!=C?C:0;var f=n?null:B.background;f==mxConstants.NONE&&(f=null);null==f&&(f=d);null==f&&0==n&&(f="#ffffff");this.convertImages(B.getSvg(null,null,null,A,null,k,null,null,null,t),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){try{var l=function(){mxClient.IS_SF?
-window.setTimeout(function(){q.drawImage(d,C/m,C/m);a(k)},0):(q.drawImage(d,C/m,C/m),a(k))},k=document.createElement("canvas"),p=parseInt(c.getAttribute("width")),n=parseInt(c.getAttribute("height"));m=null!=m?m:1;null!=b&&(m=g?Math.min(1,Math.min(3*b/(4*n),b/p)):b/p);p=Math.ceil(m*p)+2*C;n=Math.ceil(m*n)+2*C;k.setAttribute("width",p);k.setAttribute("height",n);var q=k.getContext("2d");null!=f&&(q.beginPath(),q.rect(0,0,p,n),q.fillStyle=f,q.fill());q.scale(m,m);if(G){var z=B.view,u=btoa(unescape(encodeURIComponent(z.createSvgGrid(z.gridColor)))),
-u="data:image/svg+xml;base64,"+u,t=B.gridSize*z.gridSteps*m,v=B.getGraphBounds(),y=v.x*m,x=v.y*m,A=new Image;A.src=u;A.onload=function(){for(var a=-Math.round(t-mxUtils.mod(z.translate.x*m-y,t)),b=-Math.round(t-mxUtils.mod(z.translate.y*m-x,t));a<p;a+=t)for(var c=b;c<n;c+=t)q.drawImage(A,a/m,c/m);l()}}else l()}catch(P){null!=e&&e(P)}});d.onerror=function(a){null!=e&&e(a)};try{t&&this.editor.graph.addSvgShadow(c);var l=function(a){var b=document.createElement("style");b.setAttribute("type","text/css");
+c+='@font-face {font-family: "'+g+'";src: url("'+k+'");}'}f()}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,g,k,m,n,q,z,B,C,A,G){try{g=null!=g?g:!0;k=null!=k?k:!0;B=null!=B?B:this.editor.graph;C=null!=C?C:0;var f=n?null:B.background;f==mxConstants.NONE&&(f=null);null==f&&(f=d);null==f&&0==n&&(f="#ffffff");this.convertImages(B.getSvg(null,null,null,A,null,k,null,null,null,q),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){try{var l=function(){mxClient.IS_SF?
+window.setTimeout(function(){t.drawImage(d,C/m,C/m);a(k)},0):(t.drawImage(d,C/m,C/m),a(k))},k=document.createElement("canvas"),p=parseInt(c.getAttribute("width")),n=parseInt(c.getAttribute("height"));m=null!=m?m:1;null!=b&&(m=g?Math.min(1,Math.min(3*b/(4*n),b/p)):b/p);p=Math.ceil(m*p)+2*C;n=Math.ceil(m*n)+2*C;k.setAttribute("width",p);k.setAttribute("height",n);var t=k.getContext("2d");null!=f&&(t.beginPath(),t.rect(0,0,p,n),t.fillStyle=f,t.fill());t.scale(m,m);if(G){var z=B.view,u=btoa(unescape(encodeURIComponent(z.createSvgGrid(z.gridColor)))),
+u="data:image/svg+xml;base64,"+u,q=B.gridSize*z.gridSteps*m,v=B.getGraphBounds(),y=v.x*m,x=v.y*m,A=new Image;A.src=u;A.onload=function(){for(var a=-Math.round(q-mxUtils.mod(z.translate.x*m-y,q)),b=-Math.round(q-mxUtils.mod(z.translate.y*m-x,q));a<p;a+=q)for(var c=b;c<n;c+=q)t.drawImage(A,a/m,c/m);l()}}else l()}catch(P){null!=e&&e(P)}});d.onerror=function(a){null!=e&&e(a)};try{q&&this.editor.graph.addSvgShadow(c);var l=function(a){var b=document.createElement("style");b.setAttribute("type","text/css");
b.innerHTML=a;a=c.getElementsByTagName("defs");0==a.length?(a=null!=svgDoc.createElementNS?svgDoc.createElementNS(mxConstants.NS_SVG,"defs"):svgDoc.createElement("defs"),null!=c.firstChild?c.insertBefore(a,c.firstChild):c.appendChild(a)):a=a[0];a.appendChild(b)},k=mxUtils.bind(this,function(){null!=this.editor.resolvedFontCss&&l(this.editor.resolvedFontCss);d.src=this.createSvgDataUri(mxUtils.getXml(c))});this.embedExtFonts(mxUtils.bind(this,function(a){null!=a&&l(a);this.loadFonts(k)}))}catch(N){null!=
e&&e(N)}}),c,z)}catch(J){null!=e&&e(J)}};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var f="http://"==d.substring(0,7)||"https://"==d.substring(0,8);f&&!navigator.onLine?d=c.svgBrokenImage.src:!f||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.editor.isCorsEnabledForUrl(d)?"chrome-extension://"==d.substring(0,19)||mxClient.IS_CHROMEAPP||(d=b.apply(this,arguments)):d=PROXY_URL+
"?url="+encodeURIComponent(d)}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var f=0,e=c||{};c=mxUtils.bind(this,function(c,g){for(var l=a.getElementsByTagName(c),k=0;k<l.length;k++)mxUtils.bind(this,function(c){try{if(null!=c){var l=d.convert(c.getAttribute(g));if(null!=l&&"data:"!=l.substring(0,5)){var k=e[l];null==k?(f++,this.convertImageToDataUri(l,function(d){null!=d&&(e[l]=d,c.setAttribute(g,d));f--;0==f&&b(a)})):c.setAttribute(g,
@@ -8523,7 +8532,7 @@ typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBod
c(I)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){try{var c=!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b(this.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(d);c&&b(this.createSvgDataUri(a.getText()))}),function(){window.clearTimeout(d);c&&b(this.svgBrokenImage.src)});else{var f=new Image,e=this;this.crossOriginImages&&
(f.crossOrigin="anonymous");f.onload=function(){window.clearTimeout(d);if(c)try{var a=document.createElement("canvas"),g=a.getContext("2d");a.height=f.height;a.width=f.width;g.drawImage(f,0,0);b(a.toDataURL())}catch(D){b(e.svgBrokenImage.src)}};f.onerror=function(){window.clearTimeout(d);c&&b(e.svgBrokenImage.src)};f.src=a}}catch(x){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){g.model.beginUpdate();
try{var l=mxUtils.parseXml(a),k=this.editor.extractGraphModel(l.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var p=k.getElementsByTagName("diagram");if(1==p.length)k=Editor.parseDiagramNode(p[0]);else if(1<p.length){a={};var l=[],m=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(k=Editor.parseDiagramNode(p[0]),d=!1,m=1);for(;m<p.length;m++){var n=p[m].getAttribute("id");p[m].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(p[m]));
-a[n]=p[m].getAttribute("id");var t=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[t+1]));g.model.execute(new ChangePage(this,u,u,t,!0));l.push(u)}this.updatePageLinks(a,l)}}null!=k&&"mxGraphModel"===k.nodeName&&(f=g.importGraphModel(k,b,c,d))}finally{g.model.endUpdate()}}}catch(G){if(e)throw G;this.handleError(G)}return f};EditorUi.prototype.updatePageLinks=function(a,b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=
+a[n]=p[m].getAttribute("id");var q=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[q+1]));g.model.execute(new ChangePage(this,u,u,q,!0));l.push(u)}this.updatePageLinks(a,l)}}null!=k&&"mxGraphModel"===k.nodeName&&(f=g.importGraphModel(k,b,c,d))}finally{g.model.endUpdate()}}}catch(G){if(e)throw G;this.handleError(G)}return f};EditorUi.prototype.updatePageLinks=function(a,b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=
function(a,b){var c=document.createElement("div"),d=this.editor.graph,f=d.getLinkForCell(b);null!=f&&d.setLinkForCell(b,this.updatePageLink(a,f));if(d.isHtmlLabel(b)){c.innerHTML=d.getLabel(b);for(var e=c.getElementsByTagName("a"),g=!1,l=0;l<e.length;l++)f=e[l].getAttribute("href"),null!=f&&(e[l].setAttribute("href",this.updatePageLink(a,f)),g=!0);g&&d.labelChanged(b,c.innerHTML)}for(l=0;l<d.model.getChildCount(b);l++)this.updatePageLinksForCell(a,d.model.getChildAt(b,l))};EditorUi.prototype.updatePageLink=
function(a,b){if("data:page/id,"==b.substring(0,13)){var c=a[b.substring(b.indexOf(",")+1)];b=null!=c?"data:page/id,"+c:null}else if("data:action/json,"==b.substring(0,17))try{var d=JSON.parse(b.substring(17));if(null!=d.actions){for(var f=0;f<d.actions.length;f++){var e=d.actions[f];null!=e.open&&"data:page/id,"==e.open.substring(0,13)&&(c=a[e.open.substring(e.open.indexOf(",")+1)],null!=c?e.open="data:page/id,"+c:delete e.open)}b="data:action/json,"+JSON.stringify(d)}}catch(x){}return b};EditorUi.prototype.isRemoteVisioFormat=
function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,c,d){d=null!=d?d:a.name;c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var f=this.isRemoteVisioFormat(d);try{var e="UNKNOWN-VISIO",g=d.lastIndexOf(".");0<=g&&g<d.length&&(e=d.substring(g+1).toUpperCase());EditorUi.logEvent({category:e+"-MS-IMPORT-FILE",action:"filename_"+d,label:f?
@@ -8546,24 +8555,24 @@ function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)
null,null,this.maxImageSize),c.type="",c.type="file",c.value="")}));c.style.display="none";document.body.appendChild(c);this.importFileInputElt=c}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";if(!b){var d=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){if(null!=b&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(b)){var c=new Blob([a],
{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,b)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var f=this.dialog,e=f.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;e.apply(f,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=
function(a,b,c){var d=this,f=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(f){if(0==Object.keys(f.files).length)c();else{var e=0,g,k=!1;f.forEach(function(a,d){var f=d.name.toLowerCase();"diagram/diagram.xml"==f?(k=!0,d.async("string").then(function(a){0==a.indexOf("<mxfile ")?b(a):c()})):0==f.indexOf("versions/")&&(f=parseInt(f.substr(9)),f>e&&(e=f,g=d))});0<e?g.async("string").then(function(f){!d.isOffline()&&(new XMLHttpRequest).upload&&
-d.isRemoteFileFormat(f,a.name)?d.parseFile(new Blob([f],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):c())}),a.name):c()}):k||c()}},function(a){c(a)}):c()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importFile=function(a,b,c,d,e,g,k,m,n,t,z){t=null!=t?t:!0;var f=!1,l=null,p=mxUtils.bind(this,function(a){var b=
-null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,k)):b=this.importXml(a,c,d,t);null!=m&&m(b)});"image"==b.substring(0,5)?(n=!1,"image/png"==b.substring(0,9)&&(b=z?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(l=this.importXml(b,c,d,t),n=!0)),n||(b=this.editor.graph,z=a.indexOf(";"),0<z&&(a=a.substring(0,z)+a.substring(a.indexOf(",",z+1))),t&&b.isGridEnabled()&&(c=b.snap(c),d=b.snap(d)),l=[b.insertVertex(null,null,"",c,d,e,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+d.isRemoteFileFormat(f,a.name)?d.parseFile(new Blob([f],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):c())}),a.name):c()}):k||c()}},function(a){c(a)}):c()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importFile=function(a,b,c,d,e,g,k,m,n,q,z){q=null!=q?q:!0;var f=!1,l=null,p=mxUtils.bind(this,function(a){var b=
+null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,k)):b=this.importXml(a,c,d,q);null!=m&&m(b)});"image"==b.substring(0,5)?(n=!1,"image/png"==b.substring(0,9)&&(b=z?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(l=this.importXml(b,c,d,q),n=!0)),n||(b=this.editor.graph,z=a.indexOf(";"),0<z&&(a=a.substring(0,z)+a.substring(a.indexOf(",",z+1))),q&&b.isGridEnabled()&&(c=b.snap(c),d=b.snap(d)),l=[b.insertVertex(null,null,"",c,d,e,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
a+";")])):/(\.*<graphml )/.test(a)?(f=!0,this.importGraphML(a,p)):null!=n&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||/(\.vs(x|sx?))($|\?)/i.test(k))?(f=!0,this.importVisio(n,p)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(f=!0,this.parseFile(null!=n?n:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?p(a.responseText):null!=m&&m(null))}),k)):0==a.indexOf("PK")&&null!=n?(f=!0,this.importZipFile(n,
-p,mxUtils.bind(this,function(){l=this.insertTextAt(this.validateFileData(a),c,d,!0,null,t);m(l)}))):/(\.v(sd|dx))($|\?)/i.test(k)||/(\.vs(s|x))($|\?)/i.test(k)||(l=this.insertTextAt(this.validateFileData(a),c,d,!0,null,t));f||null==m||m(l);return l};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,f,e,g;c<d;){f=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&
+p,mxUtils.bind(this,function(){l=this.insertTextAt(this.validateFileData(a),c,d,!0,null,q);m(l)}))):/(\.v(sd|dx))($|\?)/i.test(k)||/(\.vs(s|x))($|\?)/i.test(k)||(l=this.insertTextAt(this.validateFileData(a),c,d,!0,null,q));f||null==m||m(l);return l};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,f,e,g;c<d;){f=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&
3)<<4);b+="==";break}e=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(e&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2);b+="=";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&
-3)<<4|(e&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,g,k,m,n,t,z,B){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;t=null!=t?t:this.maxImageBytes;var f=null!=b&&null!=c,l=!0,p=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var q=z||this.resampleThreshold,u=0;u<a.length;u++)if("image/"==a[u].type.substring(0,
-6)&&a[u].size>q){p=!0;break}var v=mxUtils.bind(this,function(){var p=this.editor.graph,n=p.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,g,k,l,p){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,c,d,e,g,k,l,p,f,B)});g=null!=g?g:mxUtils.bind(this,function(a){p.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,u=q,C=[],v=mxUtils.bind(this,function(a,
-b){C[a]=b;if(0==--u){this.spinner.stop();if(null!=m)m(C);else{var c=[];p.getModel().beginUpdate();try{for(var d=0;d<C.length;d++){var f=C[d]();null!=f&&(c=c.concat(f))}}finally{p.getModel().endUpdate()}}g(c)}}),x=0;x<q;x++)mxUtils.bind(this,function(f){var g=a[f];if(null!=g){var m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==k||k(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var m=a.target.result,q=m.indexOf(","),u=decodeURIComponent(escape(atob(m.substring(q+
-1)))),C=mxUtils.parseXml(u),u=C.getElementsByTagName("svg");if(0<u.length){var u=u[0],x=B?null:u.getAttribute("content");null!=x&&"<"!=x.charAt(0)&&"%"!=x.charAt(0)&&(x=unescape(window.atob?atob(x):Base64.decode(x,!0)));null!=x&&"%"==x.charAt(0)&&(x=decodeURIComponent(x));null==x||"<mxfile "!==x.substring(0,8)&&"<mxGraphModel "!==x.substring(0,14)?v(f,mxUtils.bind(this,function(){try{if(m.substring(0,q+1),null!=C){var a=C.getElementsByTagName("svg");if(0<a.length){var k=a[0],l=k.getAttribute("width"),
-z=k.getAttribute("height"),l=null!=l&&"%"!=l.charAt(l.length-1)?parseFloat(l):NaN,z=null!=z&&"%"!=z.charAt(z.length-1)?parseFloat(z):NaN,u=k.getAttribute("viewBox");if(null==u||0==u.length)k.setAttribute("viewBox","0 0 "+l+" "+z);else if(isNaN(l)||isNaN(z)){var t=u.split(" ");3<t.length&&(l=parseFloat(t[2]),z=parseFloat(t[3]))}m=this.createSvgDataUri(mxUtils.getXml(k));var B=Math.min(1,Math.min(d/Math.max(1,l)),d/Math.max(1,z)),v=e(m,g.type,b+f*n,c+f*n,Math.max(1,Math.round(l*B)),Math.max(1,Math.round(z*
+3)<<4|(e&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,g,k,m,n,q,z,B){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;q=null!=q?q:this.maxImageBytes;var f=null!=b&&null!=c,l=!0,p=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var t=z||this.resampleThreshold,u=0;u<a.length;u++)if("image/"==a[u].type.substring(0,
+6)&&a[u].size>t){p=!0;break}var v=mxUtils.bind(this,function(){var p=this.editor.graph,n=p.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,g,k,l,p){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,c,d,e,g,k,l,p,f,B)});g=null!=g?g:mxUtils.bind(this,function(a){p.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=a.length,u=t,C=[],v=mxUtils.bind(this,function(a,
+b){C[a]=b;if(0==--u){this.spinner.stop();if(null!=m)m(C);else{var c=[];p.getModel().beginUpdate();try{for(var d=0;d<C.length;d++){var f=C[d]();null!=f&&(c=c.concat(f))}}finally{p.getModel().endUpdate()}}g(c)}}),x=0;x<t;x++)mxUtils.bind(this,function(f){var g=a[f];if(null!=g){var m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==k||k(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var m=a.target.result,t=m.indexOf(","),u=decodeURIComponent(escape(atob(m.substring(t+
+1)))),C=mxUtils.parseXml(u),u=C.getElementsByTagName("svg");if(0<u.length){var u=u[0],x=B?null:u.getAttribute("content");null!=x&&"<"!=x.charAt(0)&&"%"!=x.charAt(0)&&(x=unescape(window.atob?atob(x):Base64.decode(x,!0)));null!=x&&"%"==x.charAt(0)&&(x=decodeURIComponent(x));null==x||"<mxfile "!==x.substring(0,8)&&"<mxGraphModel "!==x.substring(0,14)?v(f,mxUtils.bind(this,function(){try{if(m.substring(0,t+1),null!=C){var a=C.getElementsByTagName("svg");if(0<a.length){var k=a[0],l=k.getAttribute("width"),
+z=k.getAttribute("height"),l=null!=l&&"%"!=l.charAt(l.length-1)?parseFloat(l):NaN,z=null!=z&&"%"!=z.charAt(z.length-1)?parseFloat(z):NaN,q=k.getAttribute("viewBox");if(null==q||0==q.length)k.setAttribute("viewBox","0 0 "+l+" "+z);else if(isNaN(l)||isNaN(z)){var u=q.split(" ");3<u.length&&(l=parseFloat(u[2]),z=parseFloat(u[3]))}m=this.createSvgDataUri(mxUtils.getXml(k));var B=Math.min(1,Math.min(d/Math.max(1,l)),d/Math.max(1,z)),v=e(m,g.type,b+f*n,c+f*n,Math.max(1,Math.round(l*B)),Math.max(1,Math.round(z*
B)),g.name);if(isNaN(l)||isNaN(z)){var x=new Image;x.onload=mxUtils.bind(this,function(){l=Math.max(1,x.width);z=Math.max(1,x.height);v[0].geometry.width=l;v[0].geometry.height=z;k.setAttribute("viewBox","0 0 "+l+" "+z);m=this.createSvgDataUri(mxUtils.getXml(k));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));p.setCellStyles("image",m,[v[0]])});x.src=this.createSvgDataUri(mxUtils.getXml(k))}return v}}}catch(ha){}return null})):v(f,mxUtils.bind(this,function(){return e(x,
"text/xml",b+f*n,c+f*n,0,0,g.name)}))}else v(f,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==g.type){var A=B?null:this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var y=new Image;y.src=a.target.result;v(f,mxUtils.bind(this,function(){return e(A,"text/xml",b+f*n,c+f*n,y.width,y.height,g.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
-mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,a.target.result,mxUtils.bind(this,function(k,p,m){v(f,mxUtils.bind(this,function(){if(null!=k&&k.length<t){var q=l&&this.isResampleImage(a.target.result,z)?Math.min(1,Math.min(d/p,d/m)):1;return e(k,g.type,b+f*n,c+f*n,Math.round(p*q),Math.round(m*q),g.name)}this.handleError({message:mxResources.get("imageTooBig")});
+mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,a.target.result,mxUtils.bind(this,function(k,p,m){v(f,mxUtils.bind(this,function(){if(null!=k&&k.length<q){var t=l&&this.isResampleImage(a.target.result,z)?Math.min(1,Math.min(d/p,d/m)):1;return e(k,g.type,b+f*n,c+f*n,Math.round(p*t),Math.round(m*t),g.name)}this.handleError({message:mxResources.get("imageTooBig")});
return null}))}),l,d,z)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else e(a.target.result,g.type,b+f*n,c+f*n,240,160,g.name,function(a){v(f,function(){return a})},g)});/(\.v(dx|sdx?))($|\?)/i.test(g.name)||/(\.vs(x|sx?))($|\?)/i.test(g.name)?e(null,g.type,b+f*n,c+f*n,240,160,g.name,function(a){v(f,function(){return a})},g):"image"==g.type.substring(0,5)?m.readAsDataURL(g):m.readAsText(g)}})(x)});if(p){p=[];for(u=0;u<a.length;u++)p.push(a[u]);
a=p;this.confirmImageResize(function(a){l=a;v()},n)}else v()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(d,f){if(d||b)mxSettings.setResizeImages(d?f:null),mxSettings.save();c();a(f)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){f(a,!0)},function(a){f(a,
!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,d)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};
-f.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(q){}};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,g){e=null!=e?e:this.maxImageSize;var f=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,g))try{var l=Math.max(f/e,k/e);if(1<l){var p=Math.round(f/l),m=Math.round(k/l),n=document.createElement("canvas");n.width=p;n.height=m;n.getContext("2d").drawImage(a,
-0,0,p,m);var q=n.toDataURL();if(q.length<b.length){var t=document.createElement("canvas");t.width=p;t.height=m;var u=t.toDataURL();q!==u&&(b=q,f=p,k=m)}}}catch(F){}c(b,f,k)};EditorUi.prototype.crcTable=[];for(var b=0;256>b;b++)for(var g=b,e=0;8>e;e++)g=1==(g&1)?3988292384^g>>>1:g>>>1,EditorUi.prototype.crcTable[b]=g;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var f=0;f<d;f++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(c+f))&255]^a>>>8;return a};EditorUi.prototype.crc32=function(a){this.crcTable=
+f.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(t){}};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,g){e=null!=e?e:this.maxImageSize;var f=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,g))try{var l=Math.max(f/e,k/e);if(1<l){var p=Math.round(f/l),m=Math.round(k/l),n=document.createElement("canvas");n.width=p;n.height=m;n.getContext("2d").drawImage(a,
+0,0,p,m);var t=n.toDataURL();if(t.length<b.length){var q=document.createElement("canvas");q.width=p;q.height=m;var u=q.toDataURL();t!==u&&(b=t,f=p,k=m)}}}catch(F){}c(b,f,k)};EditorUi.prototype.crcTable=[];for(var b=0;256>b;b++)for(var g=b,e=0;8>e;e++)g=1==(g&1)?3988292384^g>>>1:g>>>1,EditorUi.prototype.crcTable[b]=g;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var f=0;f<d;f++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(c+f))&255]^a>>>8;return a};EditorUi.prototype.crc32=function(a){this.crcTable=
this.crcTable||this.createCrcTable();for(var b=-1,c=0;c<a.length;c++)b=b>>>8^this.crcTable[(b^a.charCodeAt(c))&255];return(b^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=l;l+=b;return a.substring(c,l)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function k(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,
!0);var l=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,l);do{var p=g(a);if("IDAT"==f(a,4)){e=a.substring(0,l-8);"pHYs"==b&&"dpi"==c?(c=Math.round(d/.0254),c=k(c)+k(c)+String.fromCharCode(1)):c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d;d=4294967295;d=this.updateCRC(d,b,0,4);d=this.updateCRC(d,c,0,c.length);e+=k(c.length)+b+c+k(d^4294967295);e+=a.substring(l-8,
a.length);break}e+=a.substring(l-8,l-4+p);f(a,p);f(a,4)}while(p);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,c){try{var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a}catch(v){if(null!=c)c(v);else throw v;}};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&
@@ -8572,8 +8581,8 @@ b.getModel().beginUpdate();try{if("txt"==g.format)b.labelChanged(d,"<pre>"+f+"</
b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(G){a.handleError(G)}return c};var d=this.clearDefaultStyle;this.clearDefaultStyle=function(){d.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var e=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=
a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0<c&&(b+=(0<b.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return e.apply(this,arguments)};var g=b.addClickHandler;b.addClickHandler=function(a,c,d){var f=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&
mxEvent.consume(a);null!=f&&f(a,c)};g.call(this,a,c,d)};k.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var m=b.getExportVariables;b.getExportVariables=function(){var b=m.apply(this,arguments);b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=
-a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var n=b.getGlobalVariable;b.getGlobalVariable=function(b){return"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages?a.pages.length:1:n.apply(this,arguments)};var t=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var f=c.getAttribute("href");
-if(null==f||!b.isCustomLink(f)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))t.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(f),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var I=this.actions.get("print");I.setEnabled(!mxClient.IS_IOS||!navigator.standalone);I.visible=I.isEnabled();if(!this.editor.chromeless||
+a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var n=b.getGlobalVariable;b.getGlobalVariable=function(b){return"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages?a.pages.length:1:n.apply(this,arguments)};var q=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var f=c.getAttribute("href");
+if(null==f||!b.isCustomLink(f)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))q.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(f),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var 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,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize"),this.installImagePasteHandler(),this.installNativeClipboardHandler();
this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==
d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,f,e,g){b.insertImage(a,e,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=
@@ -8600,17 +8609,17 @@ mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSetti
mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor("dark"==uiTheme);this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){console.log("gridColorChanged",this.editor.graph.view.gridColor);mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==uiTheme);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),
this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML=
"";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),f=mxUtils.getXml(c.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(f));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=f,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b,c){if(!mxEvent.isConsumed(a)){var d=b;c&&null!=a.clipboardData&&(d=document.createElement("div"),d.innerHTML=a.clipboardData.getData("text/html"));var f=d.getElementsByTagName("span");
-if(null!=f&&0<f.length&&"application/vnd.lucid.chart.objects"===f[0].getAttribute("data-lucid-type")){var e=f[0].getAttribute("data-lucid-content");null!=e&&0<e.length&&(this.convertLucidChart(e,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var c=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,c,c));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a))}else{var e=
-mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(d):d.textContent),g=!1;try{var k=e.lastIndexOf("%3E");0<=k&&k<e.length-3&&(e=e.substring(0,k+3))}catch(I){}try{var f=d.getElementsByTagName("span"),l=null!=f&&0<f.length?mxUtils.trim(decodeURIComponent(f[0].textContent)):decodeURIComponent(e);this.isCompatibleString(l)&&(g=!0,e=l)}catch(I){}d=this.editor.graph;if(null!=e&&0<e.length){if(d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=e,d.pasteCounter=0),c=d.pasteCounter*
-d.gridSize,g||this.isCompatibleString(e)?d.setSelectionCells(this.importXml(e,c,c)):(g=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==e&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(e,g.x+c,g.y+c,!0))),!d.isSelectionEmpty()){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(I){}}}else c||(d.lastPasteXml=null,d.pasteCounter=0)}}b.innerHTML="&nbsp;"};
-EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),
-mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:
-a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.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(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.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)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,f;if(null==a){f=document.body;var e=document.documentElement;d=(f.clientWidth||e.clientWidth)-3;f=Math.max(f.clientHeight||0,e.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,f=a.clientHeight;e=document.createElement("div");e.style.zIndex=mxPopupMenu.prototype.zIndex+
-2;e.style.border="3px dotted rgb(254, 137, 12)";e.style.pointerEvents="none";e.style.position="absolute";e.style.top=b+"px";e.style.left=c+"px";e.style.width=Math.max(0,d-3)+"px";e.style.height=Math.max(0,f-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(e):document.body.appendChild(e);return e};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),
-d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{var d=c.target.result,f=a.name;if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");
-var e=mxUtils.bind(this,function(a){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,f))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,f,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(a,
+if(null!=f&&0<f.length&&"application/vnd.lucid.chart.objects"===f[0].getAttribute("data-lucid-type"))c=f[0].getAttribute("data-lucid-content"),null!=c&&0<c.length&&(this.convertLucidChart(c,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var c=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,c,c));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));
+else{var e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(d):d.textContent),g=!1;try{var k=e.lastIndexOf("%3E");0<=k&&k<e.length-3&&(e=e.substring(0,k+3))}catch(C){}try{var f=d.getElementsByTagName("span"),l=null!=f&&0<f.length?mxUtils.trim(decodeURIComponent(f[0].textContent)):decodeURIComponent(e);this.isCompatibleString(l)&&(g=!0,e=l)}catch(C){}try{var p=this.editor.graph;if(null!=e&&0<e.length){p.lastPasteXml==e?p.pasteCounter++:(p.lastPasteXml=e,p.pasteCounter=
+0);var m=p.pasteCounter*p.gridSize;if(g||this.isCompatibleString(e))p.setSelectionCells(this.importXml(e,m,m));else{var n=p.getInsertPoint();p.isMouseInsertPoint()&&(m=0,p.lastPasteXml==e&&0<p.pasteCounter&&p.pasteCounter--);p.setSelectionCells(this.insertTextAt(e,n.x+m,n.y+m,!0))}if(!p.isSelectionEmpty()){p.scrollCellToVisible(p.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(p.view.getState(p.getSelectionCell()));try{mxEvent.consume(a)}catch(C){}}}else c||(p.lastPasteXml=null,
+p.pasteCounter=0)}catch(C){this.handleError(C)}}}b.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&
+(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(a);
+if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=
+d.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(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.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)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,f;if(null==a){f=document.body;var e=document.documentElement;d=(f.clientWidth||e.clientWidth)-3;f=Math.max(f.clientHeight||0,e.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,f=a.clientHeight;e=document.createElement("div");
+e.style.zIndex=mxPopupMenu.prototype.zIndex+2;e.style.border="3px dotted rgb(254, 137, 12)";e.style.pointerEvents="none";e.style.position="absolute";e.style.top=b+"px";e.style.left=c+"px";e.style.width=Math.max(0,d-3)+"px";e.style.height=Math.max(0,f-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(e):document.body.appendChild(e);return e};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);
+a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{var d=c.target.result,f=a.name;if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)&&
+(f=f.substring(0,f.length-4)+".drawio");var e=mxUtils.bind(this,function(a){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,f))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,f,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(a,
mxUtils.bind(this,function(a){this.spinner.stop();e(a)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?e(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},
mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,f,b)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);
try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}}else 0==d.indexOf("PK")?this.importZipFile(a,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,b)})):("image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,f,b))}}catch(I){this.handleError(I)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();
@@ -8627,8 +8636,8 @@ e);mxEvent.addListener(window,"message",mxUtils.bind(this,function(e){if(e.sourc
(a=Graph.decompress(a)))}catch(P){}return a});if("json"==urlParams.proto){try{k=JSON.parse(k)}catch(Z){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("prompt"==k.action){this.spinner.stop();var m=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?
mxResources.get(k.okKey):null,function(a){null!=a&&g.postMessage(JSON.stringify({event:"prompt",value:a,message:k}),"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==k.action){var p=l(k.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),p,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),
mxUtils.bind(this,function(){this.hideDialog();g.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();g.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(Z){g.postMessage(JSON.stringify({event:"draft",
-error:Z.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();var n=1==k.enableRecent,q=1==k.enableSearch,t=1==k.enableCustomTemp,m=new NewDialog(this,!1,null!=k.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=k.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,e,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,n?mxUtils.bind(this,
-function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,q?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,c){g.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")}),null,null,t?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(m.container,620,440,
+error:Z.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();var n=1==k.enableRecent,t=1==k.enableSearch,q=1==k.enableCustomTemp,m=new NewDialog(this,!1,null!=k.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=k.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,e,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,n?mxUtils.bind(this,
+function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,t?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,c){g.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")}),null,null,q?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(m.container,620,440,
!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("textContent"==k.action){var u=this.getDiagramTextContent();g.postMessage(JSON.stringify({event:"textContent",data:u,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 v=
null!=k.messageKey?mxResources.get(k.messageKey):k.message;null==k.show||k.show?this.spinner.spin(document.body,v):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 x=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var E=this.editor.graph,y=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();
var b=this.createLoadMessage("export");b.format=k.format;b.message=k;b.data=a;b.xml=encodeURIComponent(x);g.postMessage(JSON.stringify(b),"*")}),N=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==k.format&&(a=this.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(x)));E!=this.editor.graph&&E.container.parentNode.removeChild(E.container);y(a)}),Q=k.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=
@@ -8648,25 +8657,25 @@ mxUtils.bind(this,function(a){U(a)}),mxUtils.bind(this,function(a){this.handleEr
a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className=
"geBigButton geBigStandardButton";b.style.marginLeft="6px";b.style.marginRight="20px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,
function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://about.draw.io/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),f=0;f<a.length;f++){var e=new window[a[f].layout](c);if(null!=a[f].config)for(var k in a[f].config)e[k]=a[f].config[k];this.executeLayout(function(){e.execute(c.getDefaultParent(),
-0==d.length?null:d)},f==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],f=[],e={};if(0<c.length){var k={},g=null,l=null,m=null,n=null,t=null,C=null,A=null,G=null,F="",J="auto",H="auto",E=null,K=null,N=40,Q=40,Y=100,T=0,L=this.editor.graph;L.getGraphBounds();for(var V=function(){null!=b?b(la):(L.setSelectionCells(la),L.scrollCellToVisible(L.getSelectionCell()))},X=L.getFreeInsertPoint(),ga=X.x,ca=X.y,X=ca,ea=null,U="auto",G=null,Z=[],P=null,ba=null,aa=0;aa<c.length&&
-"#"==c[aa].charAt(0);){a=c[aa];for(aa++;aa<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[aa].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[aa].substring(1)),aa++;if("#"!=a.charAt(1)){var fa=a.indexOf(":");if(0<fa){var R=mxUtils.trim(a.substring(1,fa)),O=mxUtils.trim(a.substring(fa+1));"label"==R?ea=L.sanitizeHtml(O):"labelname"==R&&0<O.length&&"-"!=O?n=O:"labels"==R&&0<O.length&&"-"!=O?t=JSON.parse(O):"style"==R?g=O:"parentstyle"==R?C=O:"stylename"==R&&0<O.length&&"-"!=O?m=O:"styles"==R&&0<
+0==d.length?null:d)},f==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],e=[],f={};if(0<c.length){var k={},g=null,l=null,m=null,n=null,q=null,C=null,A=null,G=null,F="",J="auto",H="auto",E=null,K=null,N=40,Q=40,Y=100,T=0,L=this.editor.graph;L.getGraphBounds();for(var V=function(){null!=b?b(la):(L.setSelectionCells(la),L.scrollCellToVisible(L.getSelectionCell()))},X=L.getFreeInsertPoint(),ga=X.x,ca=X.y,X=ca,ea=null,U="auto",G=null,Z=[],P=null,ba=null,aa=0;aa<c.length&&
+"#"==c[aa].charAt(0);){a=c[aa];for(aa++;aa<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[aa].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[aa].substring(1)),aa++;if("#"!=a.charAt(1)){var fa=a.indexOf(":");if(0<fa){var R=mxUtils.trim(a.substring(1,fa)),O=mxUtils.trim(a.substring(fa+1));"label"==R?ea=L.sanitizeHtml(O):"labelname"==R&&0<O.length&&"-"!=O?n=O:"labels"==R&&0<O.length&&"-"!=O?q=JSON.parse(O):"style"==R?g=O:"parentstyle"==R?C=O:"stylename"==R&&0<O.length&&"-"!=O?m=O:"styles"==R&&0<
O.length&&"-"!=O?l=JSON.parse(O):"identity"==R&&0<O.length&&"-"!=O?A=O:"parent"==R&&0<O.length&&"-"!=O?G=O:"namespace"==R&&0<O.length&&"-"!=O?F=O:"width"==R?J=O:"height"==R?H=O:"left"==R&&0<O.length?E=O:"top"==R&&0<O.length?K=O:"ignore"==R?ba=O.split(","):"connect"==R?Z.push(JSON.parse(O)):"link"==R?P=O:"padding"==R?T=parseFloat(O):"edgespacing"==R?N=parseFloat(O):"nodespacing"==R?Q=parseFloat(O):"levelspacing"==R?Y=parseFloat(O):"layout"==R&&(U=O)}}}if(null==c[aa])throw Error(mxResources.get("invalidOrMissingFile"));
var da=this.editor.csvToArray(c[aa]),R=fa=null;if(null!=A||null!=G)for(var W=0;W<da.length;W++)A==da[W]&&(fa=W),G==da[W]&&(R=W);null==ea&&(ea="%"+da[0]+"%");if(null!=Z)for(var S=0;S<Z.length;S++)null==k[Z[S].to]&&(k[Z[S].to]={});L.model.beginUpdate();try{for(W=aa+1;W<c.length;W++){var ia=this.editor.csvToArray(c[W]);if(null==ia){var ma=40<c[W].length?c[W].substring(0,40)+"...":c[W];throw Error(W+" ("+ma+") "+mxResources.get("containsValidationErrors"));}if(ia.length==da.length){var M=null,ka=null!=
-fa?F+ia[fa]:null;null!=ka&&(M=L.model.getCell(ka));var A=null!=M,ha=new mxCell(ea,new mxGeometry(ga,X,0,0),g||"whiteSpace=wrap;html=1;");ha.vertex=!0;ha.id=ka;for(var ja=0;ja<ia.length;ja++)L.setAttributeForCell(ha,da[ja],ia[ja]);if(null!=n&&null!=t){var ua=t[ha.getAttribute(n)];null!=ua&&L.labelChanged(ha,ua)}if(null!=m&&null!=l){var va=l[ha.getAttribute(m)];null!=va&&(ha.style=va)}L.setAttributeForCell(ha,"placeholders","1");ha.style=L.replacePlaceholders(ha,ha.style);A&&(L.model.setGeometry(M,
-ha.geometry),L.model.setStyle(M,ha.style),0>mxUtils.indexOf(f,M)&&f.push(M));M=ha;if(!A)for(S=0;S<Z.length;S++)k[Z[S].to][M.getAttribute(Z[S].to)]=M;null!=P&&"link"!=P&&(L.setLinkForCell(M,M.getAttribute(P)),L.setAttributeForCell(M,P,null));L.fireEvent(new mxEventObject("cellsInserted","cells",[M]));var wa=this.editor.graph.getPreferredSizeForCell(M);M.vertex&&(null!=E&&null!=M.getAttribute(E)&&(M.geometry.x=ga+parseFloat(M.getAttribute(E))),null!=K&&null!=M.getAttribute(K)&&(M.geometry.y=ca+parseFloat(M.getAttribute(K))),
-"@"==J.charAt(0)&&null!=M.getAttribute(J.substring(1))?M.geometry.width=parseFloat(M.getAttribute(J.substring(1))):M.geometry.width="auto"==J?wa.width+T:parseFloat(J),"@"==H.charAt(0)&&null!=M.getAttribute(H.substring(1))?M.geometry.height=parseFloat(M.getAttribute(H.substring(1))):M.geometry.height="auto"==H?wa.height+T:parseFloat(H),X+=M.geometry.height+Q);A?(null==e[ka]&&(e[ka]=[]),e[ka].push(M)):(G=null!=R?L.model.getCell(F+ia[R]):null,d.push(M),null!=G?(G.style=L.replacePlaceholders(G,C),L.addCell(M,
-G)):f.push(L.addCell(M)))}}for(var na=f.slice(),la=f.slice(),S=0;S<Z.length;S++)for(var xa=Z[S],W=0;W<f.length;W++){var M=f[W],ya=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d){L.setAttributeForCell(b,c.from,null);for(var d=d.split(","),f=0;f<d.length;f++){var e=k[c.to][d[f]];if(null!=e){var g=c.label;null!=c.fromlabel&&(g=(b.getAttribute(c.fromlabel)||"")+(g||""));null!=c.tolabel&&(g=(g||"")+(e.getAttribute(c.tolabel)||""));la.push(L.insertEdge(null,null,g||"",c.invert?
-e:a,c.invert?a:e,c.style||L.createCurrentEdgeStyle()));mxUtils.remove(c.invert?a:e,na)}}}});ya(M,M,xa);if(null!=e[M.id])for(ja=0;ja<e[M.id].length;ja++)ya(M,e[M.id][ja],xa)}if(null!=ba)for(W=0;W<d.length;W++)for(M=d[W],ja=0;ja<ba.length;ja++)L.setAttributeForCell(M,mxUtils.trim(ba[ja]),null);if(0<f.length){var oa=new mxParallelEdgeLayout(L);oa.spacing=N;var ta=function(){0<oa.spacing&&oa.execute(L.getDefaultParent());for(var a=0;a<f.length;a++){var b=L.getCellGeometry(f[a]);b.x=Math.round(L.snap(b.x));
-b.y=Math.round(L.snap(b.y));"auto"==J&&(b.width=Math.round(L.snap(b.width)));"auto"==H&&(b.height=Math.round(L.snap(b.height)))}};if("["==U.charAt(0)){var za=V;L.view.validate();this.executeLayoutList(JSON.parse(U),function(){ta();za()});V=null}else if("circle"==U){var ra=new mxCircleLayout(L);ra.resetEdges=!1;var Aa=ra.isVertexIgnored;ra.isVertexIgnored=function(a){return Aa.apply(this,arguments)||0>mxUtils.indexOf(f,a)};this.executeLayout(function(){ra.execute(L.getDefaultParent());ta()},!0,V);
-V=null}else if("horizontaltree"==U||"verticaltree"==U||"auto"==U&&la.length==2*f.length-1&&1==na.length){L.view.validate();var sa=new mxCompactTreeLayout(L,"horizontaltree"==U);sa.levelDistance=Q;sa.edgeRouting=!1;sa.resetEdges=!1;this.executeLayout(function(){sa.execute(L.getDefaultParent(),0<na.length?na[0]:null)},!0,V);V=null}else if("horizontalflow"==U||"verticalflow"==U||"auto"==U&&1==na.length){L.view.validate();var pa=new mxHierarchicalLayout(L,"horizontalflow"==U?mxConstants.DIRECTION_WEST:
-mxConstants.DIRECTION_NORTH);pa.intraCellSpacing=Q;pa.parallelEdgeSpacing=N;pa.interRankCellSpacing=Y;pa.disableEdgeStyle=!1;this.executeLayout(function(){pa.execute(L.getDefaultParent(),la);L.moveCells(la,ga,ca)},!0,V);V=null}else if("organic"==U||"auto"==U&&la.length>f.length){L.view.validate();var qa=new mxFastOrganicLayout(L);qa.forceConstant=3*Q;qa.resetEdges=!1;var Ba=qa.isVertexIgnored;qa.isVertexIgnored=function(a){return Ba.apply(this,arguments)||0>mxUtils.indexOf(f,a)};oa=new mxParallelEdgeLayout(L);
+fa?F+ia[fa]:null;null!=ka&&(M=L.model.getCell(ka));var A=null!=M,ha=new mxCell(ea,new mxGeometry(ga,X,0,0),g||"whiteSpace=wrap;html=1;");ha.vertex=!0;ha.id=ka;for(var ja=0;ja<ia.length;ja++)L.setAttributeForCell(ha,da[ja],ia[ja]);if(null!=n&&null!=q){var ua=q[ha.getAttribute(n)];null!=ua&&L.labelChanged(ha,ua)}if(null!=m&&null!=l){var va=l[ha.getAttribute(m)];null!=va&&(ha.style=va)}L.setAttributeForCell(ha,"placeholders","1");ha.style=L.replacePlaceholders(ha,ha.style);A&&(L.model.setGeometry(M,
+ha.geometry),L.model.setStyle(M,ha.style),0>mxUtils.indexOf(e,M)&&e.push(M));M=ha;if(!A)for(S=0;S<Z.length;S++)k[Z[S].to][M.getAttribute(Z[S].to)]=M;null!=P&&"link"!=P&&(L.setLinkForCell(M,M.getAttribute(P)),L.setAttributeForCell(M,P,null));L.fireEvent(new mxEventObject("cellsInserted","cells",[M]));var wa=this.editor.graph.getPreferredSizeForCell(M);M.vertex&&(null!=E&&null!=M.getAttribute(E)&&(M.geometry.x=ga+parseFloat(M.getAttribute(E))),null!=K&&null!=M.getAttribute(K)&&(M.geometry.y=ca+parseFloat(M.getAttribute(K))),
+"@"==J.charAt(0)&&null!=M.getAttribute(J.substring(1))?M.geometry.width=parseFloat(M.getAttribute(J.substring(1))):M.geometry.width="auto"==J?wa.width+T:parseFloat(J),"@"==H.charAt(0)&&null!=M.getAttribute(H.substring(1))?M.geometry.height=parseFloat(M.getAttribute(H.substring(1))):M.geometry.height="auto"==H?wa.height+T:parseFloat(H),X+=M.geometry.height+Q);A?(null==f[ka]&&(f[ka]=[]),f[ka].push(M)):(G=null!=R?L.model.getCell(F+ia[R]):null,d.push(M),null!=G?(G.style=L.replacePlaceholders(G,C),L.addCell(M,
+G)):e.push(L.addCell(M)))}}for(var na=e.slice(),la=e.slice(),S=0;S<Z.length;S++)for(var xa=Z[S],W=0;W<e.length;W++){var M=e[W],ya=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d){L.setAttributeForCell(b,c.from,null);for(var d=d.split(","),e=0;e<d.length;e++){var f=k[c.to][d[e]];if(null!=f){var g=c.label;null!=c.fromlabel&&(g=(b.getAttribute(c.fromlabel)||"")+(g||""));null!=c.tolabel&&(g=(g||"")+(f.getAttribute(c.tolabel)||""));la.push(L.insertEdge(null,null,g||"",c.invert?
+f:a,c.invert?a:f,c.style||L.createCurrentEdgeStyle()));mxUtils.remove(c.invert?a:f,na)}}}});ya(M,M,xa);if(null!=f[M.id])for(ja=0;ja<f[M.id].length;ja++)ya(M,f[M.id][ja],xa)}if(null!=ba)for(W=0;W<d.length;W++)for(M=d[W],ja=0;ja<ba.length;ja++)L.setAttributeForCell(M,mxUtils.trim(ba[ja]),null);if(0<e.length){var oa=new mxParallelEdgeLayout(L);oa.spacing=N;var ta=function(){0<oa.spacing&&oa.execute(L.getDefaultParent());for(var a=0;a<e.length;a++){var b=L.getCellGeometry(e[a]);b.x=Math.round(L.snap(b.x));
+b.y=Math.round(L.snap(b.y));"auto"==J&&(b.width=Math.round(L.snap(b.width)));"auto"==H&&(b.height=Math.round(L.snap(b.height)))}};if("["==U.charAt(0)){var za=V;L.view.validate();this.executeLayoutList(JSON.parse(U),function(){ta();za()});V=null}else if("circle"==U){var ra=new mxCircleLayout(L);ra.resetEdges=!1;var Aa=ra.isVertexIgnored;ra.isVertexIgnored=function(a){return Aa.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){ra.execute(L.getDefaultParent());ta()},!0,V);
+V=null}else if("horizontaltree"==U||"verticaltree"==U||"auto"==U&&la.length==2*e.length-1&&1==na.length){L.view.validate();var sa=new mxCompactTreeLayout(L,"horizontaltree"==U);sa.levelDistance=Q;sa.edgeRouting=!1;sa.resetEdges=!1;this.executeLayout(function(){sa.execute(L.getDefaultParent(),0<na.length?na[0]:null)},!0,V);V=null}else if("horizontalflow"==U||"verticalflow"==U||"auto"==U&&1==na.length){L.view.validate();var pa=new mxHierarchicalLayout(L,"horizontalflow"==U?mxConstants.DIRECTION_WEST:
+mxConstants.DIRECTION_NORTH);pa.intraCellSpacing=Q;pa.parallelEdgeSpacing=N;pa.interRankCellSpacing=Y;pa.disableEdgeStyle=!1;this.executeLayout(function(){pa.execute(L.getDefaultParent(),la);L.moveCells(la,ga,ca)},!0,V);V=null}else if("organic"==U||"auto"==U&&la.length>e.length){L.view.validate();var qa=new mxFastOrganicLayout(L);qa.forceConstant=3*Q;qa.resetEdges=!1;var Ba=qa.isVertexIgnored;qa.isVertexIgnored=function(a){return Ba.apply(this,arguments)||0>mxUtils.indexOf(e,a)};oa=new mxParallelEdgeLayout(L);
oa.spacing=N;this.executeLayout(function(){qa.execute(L.getDefaultParent());ta()},!0,V);V=null}}this.hideDialog()}finally{L.model.endUpdate()}null!=V&&V()}}catch(Ca){this.handleError(Ca)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=
function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var n=
EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=n.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};
-var f=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return f.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();
-return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var e=b.init;b.init=function(){e.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+
-a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),f=b.source,e=b.outline;e.pageScale=f.pageScale;e.pageFormat=f.pageFormat;e.background=f.background;e.pageVisible=f.pageVisible;e.background=f.background;var k=mxUtils.getCurrentStyle(f.container);e.container.style.backgroundColor=k.backgroundColor;null!=f.view.backgroundPageShape&&null!=e.view.backgroundPageShape&&
-(e.view.backgroundPageShape.fill=f.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=1;null==this.drive&&"function"!==typeof window.DriveClient||c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.gitLab||c++;b&&a&&isLocalStorage&&"1"==urlParams.browser&&
+var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();
+return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+
+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var k=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=k.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&
+(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=1;null==this.drive&&"function"!==typeof window.DriveClient||c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.gitLab||c++;b&&a&&isLocalStorage&&"1"==urlParams.browser&&
c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c);this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);
c="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(c);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(c),this.menus.get("newLibrary").setEnabled(c));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&
a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isAppCache()){var d=applicationCache;if(null!=d&&null==this.offlineStatus){this.offlineStatus=document.createElement("div");
@@ -8677,63 +8686,63 @@ break;case d.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("
"1"==urlParams.embed&&this.editor.graph.isEnabled()};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);
this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=
c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);
-this.actions.get("rename").setEnabled(null!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var 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(a,b,c,d,e,k,g){var f=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(f.getSvg(d,e,k)),"image/svg+xml");else{var l=a.getFileData(!0,null,null,null,null,!0),m=f.getGraphBounds(),n=Math.floor(m.width*e/f.view.scale),p=Math.floor(m.height*
-e/f.view.scale);if(l.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),"png"!=c&&"jpg"!=c&&"jpeg"!=c||!a.isExportToCanvas()){var q={globalVars:f.getExportVariables()};a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<g?"&dpi="+g:"")+"&bg="+(null!=d?d:"none")+"&w="+n+"&h="+p+"&border="+k+"&xml="+encodeURIComponent(l))})}else"png"==c?a.exportImage(e,
+this.actions.get("rename").setEnabled(null!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=
+null);q.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,k,g){var f=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(f.getSvg(d,e,k)),"image/svg+xml");else{var l=a.getFileData(!0,null,null,null,null,!0),m=f.getGraphBounds(),n=Math.floor(m.width*e/f.view.scale),p=Math.floor(m.height*
+e/f.view.scale);if(l.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),"png"!=c&&"jpg"!=c&&"jpeg"!=c||!a.isExportToCanvas()){var t={globalVars:f.getExportVariables()};a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(t))+(0<g?"&dpi="+g:"")+"&bg="+(null!=d?d:"none")+"&w="+n+"&h="+p+"&border="+k+"&xml="+encodeURIComponent(l))})}else"png"==c?a.exportImage(e,
null==d||"none"==d,!0,!1,!1,k,!0,!1,null,null,g):a.exportImage(e,!1,!0,!1,!1,k,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var c=0;c<this.pages.length;c++){var d=a;this.currentPage!=this.pages[c]&&(d=this.createTemporaryGraph(a.getStylesheet()),d.model.setRoot(this.pages[c].root));b+=this.pages[c].getName()+" "+d.getIndexableText()+" "}else b=
-a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var f=document.createElement("div");f.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";f.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';
-var e={};try{var k=mxSettings.getCustomLibraries();for(a=0;a<k.length;a++){var g=k[a];if("R"==g.substring(0,1)){var m=JSON.parse(decodeURIComponent(g.substring(1)));e[m[0]]={id:m[0],title:m[1],downloadUrl:m[2]}}}}catch(I){}this.remoteInvoke("getCustomLibraries",null,null,function(a){f.innerHTML="";if(0==a.length)f.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];e[d.id]&&
-(b[d.id]=d);var k=this.addCheckbox(f,d.title,e[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,k)}},mxUtils.bind(this,function(a){f.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));f.appendChild(b)}));c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,
-function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==e[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(A){this.handleError(A,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));
-for(c in e)b[c]||this.closeLibrary(new RemoteLibrary(this,null,e[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],
+a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var e=document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';
+var f={};try{var k=mxSettings.getCustomLibraries();for(a=0;a<k.length;a++){var g=k[a];if("R"==g.substring(0,1)){var m=JSON.parse(decodeURIComponent(g.substring(1)));f[m[0]]={id:m[0],title:m[1],downloadUrl:m[2]}}}}catch(I){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML="";if(0==a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];f[d.id]&&
+(b[d.id]=d);var k=this.addCheckbox(e,d.title,f[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,k)}},mxUtils.bind(this,function(a){e.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(b)}));c.appendChild(e);c=new CustomDialog(this,c,mxUtils.bind(this,
+function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==f[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(A){this.handleError(A,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));
+for(c in f)b[c]||this.closeLibrary(new RemoteLibrary(this,null,f[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],
"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,c,d,e){var f=!0,k=window.setTimeout(mxUtils.bind(this,function(){f=!1;e({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
this.timeout),g=mxUtils.bind(this,function(){window.clearTimeout(k);f&&d.apply(this,arguments)});c=c||{};c.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:g,error:e});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:c});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a){var b=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};
-null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var c=a.funtionName,d=this.remoteInvokableFns[c];if(null!=d&&"function"===typeof this[c]){var f=a.functionArgs;Array.isArray(f)||(f=[]);if(d.isAsync)f.push(function(){b(Array.prototype.slice.apply(arguments))}),f.push(function(a){b(null,a||"Unkown Error")}),this[c].apply(this,f);else{var e=this[c].apply(this,f);b([e])}}else b(null,"Invalid Call: "+c+" is not found.")}catch(x){b(null,"Invalid Call: An error occured, "+
+null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var c=a.funtionName,d=this.remoteInvokableFns[c];if(null!=d&&"function"===typeof this[c]){var e=a.functionArgs;Array.isArray(e)||(e=[]);if(d.isAsync)e.push(function(){b(Array.prototype.slice.apply(arguments))}),e.push(function(a){b(null,a||"Unkown Error")}),this[c].apply(this,e);else{var f=this[c].apply(this,e);b([f])}}else b(null,"Invalid Call: "+c+" is not found.")}catch(x){b(null,"Invalid Call: An error occured, "+
x.message)}};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=
function(a,b,c){var d=this.getCurrentFile();null!=d?d.addComment(a,b,c):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=
function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=
function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")}})();
-var CommentsWindow=function(a,c,d,b,g,e){function k(){for(var a=D.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==D&&b++;I.style.display=0==b?"block":"none"}function n(a,b,c,d){function e(){b.removeChild(m);b.removeChild(l);g.style.display="block";f.style.display="block"}q={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),m=document.createElement("textarea");m.className=
-"geCommentEditTxtArea";m.style.minHeight=f.offsetHeight+"px";m.value=a.content;b.insertBefore(m,f);var l=document.createElement("div");l.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),k()):e();q=null});n.className="geCommentEditBtn";l.appendChild(n);var p=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=m.value;mxUtils.write(f,a.content);e();c(a);q=null});mxEvent.addListener(m,"keydown",mxUtils.bind(this,
+var CommentsWindow=function(a,c,d,b,g,e){function k(){for(var a=D.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==D&&b++;I.style.display=0==b?"block":"none"}function n(a,b,c,d){function e(){b.removeChild(m);b.removeChild(l);g.style.display="block";f.style.display="block"}t={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),m=document.createElement("textarea");m.className=
+"geCommentEditTxtArea";m.style.minHeight=f.offsetHeight+"px";m.value=a.content;b.insertBefore(m,f);var l=document.createElement("div");l.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),k()):e();t=null});n.className="geCommentEditBtn";l.appendChild(n);var p=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=m.value;mxUtils.write(f,a.content);e();c(a);t=null});mxEvent.addListener(m,"keydown",mxUtils.bind(this,
function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(p.click(),mxEvent.consume(a)):27==a.keyCode&&(n.click(),mxEvent.consume(a)))}));p.focus();p.className="geCommentEditBtn gePrimaryBtn";l.appendChild(p);b.insertBefore(l,f);g.style.display="none";f.style.display="none";m.focus()}function m(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
-[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function t(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function f(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function l(a){a.style.border="";a.removeChild(a.busyImg)}function p(b,c,d,e,g){function z(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
-"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});G.appendChild(e);d&&(e.style.display="none")}function B(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=E;a(b);return{pdiv:d,replies:c}}function A(c,d,k,g,m){function z(){t(v);b.addReply(C,function(a){C.id=a;b.replies.push(C);l(v);k&&k()},function(b){q();f(v);a.handleError(b,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},g,m)}function q(){n(C,v,function(a){z()},!0)}var u=B().pdiv,C=a.newComment(c,a.getCurrentUser());C.pCommentId=b.id;null==b.replies&&(b.replies=[]);var v=p(C,b.replies,u,e+1);d?q():z()}if(g||!b.isResolved){I.style.display="none";var E=document.createElement("div");E.className="geCommentContainer";E.setAttribute("data-commentId",b.id);E.style.marginLeft=20*e+5+"px";b.isResolved&&"dark"!=uiTheme&&(E.style.backgroundColor="ghostWhite");
+[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function q(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function f(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function l(a){a.style.border="";a.removeChild(a.busyImg)}function p(b,c,d,e,g){function z(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
+"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});G.appendChild(e);d&&(e.style.display="none")}function B(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=E;a(b);return{pdiv:d,replies:c}}function A(c,d,k,g,m){function z(){q(v);b.addReply(C,function(a){C.id=a;b.replies.push(C);l(v);k&&k()},function(b){t();f(v);a.handleError(b,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},g,m)}function t(){n(C,v,function(a){z()},!0)}var u=B().pdiv,C=a.newComment(c,a.getCurrentUser());C.pCommentId=b.id;null==b.replies&&(b.replies=[]);var v=p(C,b.replies,u,e+1);d?t():z()}if(g||!b.isResolved){I.style.display="none";var E=document.createElement("div");E.className="geCommentContainer";E.setAttribute("data-commentId",b.id);E.style.marginLeft=20*e+5+"px";b.isResolved&&"dark"!=uiTheme&&(E.style.backgroundColor="ghostWhite");
var x=document.createElement("div");x.className="geCommentHeader";var y=document.createElement("img");y.className="geCommentUserImg";y.src=b.user.pictureUrl||Editor.userImage;x.appendChild(y);y=document.createElement("div");y.className="geCommentHeaderTxt";x.appendChild(y);var F=document.createElement("div");F.className="geCommentUsername";mxUtils.write(F,b.user.displayName||"");y.appendChild(F);F=document.createElement("div");F.className="geCommentDate";F.setAttribute("data-commentId",b.id);m(b,
-F);y.appendChild(F);E.appendChild(x);x=document.createElement("div");x.className="geCommentTxt";mxUtils.write(x,b.content||"");E.appendChild(x);x=document.createElement("div");x.className="geCommentActions";var G=document.createElement("ul");G.className="geCommentActionsList";x.appendChild(G);u||0!=e&&!v||z(mxResources.get("reply"),function(){A("",!0)},b.isResolved);y=a.getCurrentUser();null==y||y.id!=b.user.id||u||(z(mxResources.get("edit"),function(){function c(){n(b,E,function(){t(E);b.editComment(b.content,
-function(){l(E)},function(b){f(E);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),z(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){t(E);b.deleteComment(function(){for(var a=B(b).replies,d=0;d<a.length;d++)D.removeChild(a[d]);for(d=0;d<c.length;d++)if(c[d]==b){c.splice(d,1);break}I.style.display=0==D.getElementsByTagName("div").length?"block":"none"},function(b){f(E);a.handleError(b,null,null,
+F);y.appendChild(F);E.appendChild(x);x=document.createElement("div");x.className="geCommentTxt";mxUtils.write(x,b.content||"");E.appendChild(x);x=document.createElement("div");x.className="geCommentActions";var G=document.createElement("ul");G.className="geCommentActionsList";x.appendChild(G);u||0!=e&&!v||z(mxResources.get("reply"),function(){A("",!0)},b.isResolved);y=a.getCurrentUser();null==y||y.id!=b.user.id||u||(z(mxResources.get("edit"),function(){function c(){n(b,E,function(){q(E);b.editComment(b.content,
+function(){l(E)},function(b){f(E);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),z(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){q(E);b.deleteComment(function(){for(var a=B(b).replies,d=0;d<a.length;d++)D.removeChild(a[d]);for(d=0;d<c.length;d++)if(c[d]==b){c.splice(d,1);break}I.style.display=0==D.getElementsByTagName("div").length?"block":"none"},function(b){f(E);a.handleError(b,null,null,
null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));u||0!=e||z(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=B(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var m=e[g].querySelectorAll(".geCommentAction"),
-l=0;l<m.length;l++)m[l]!=c.parentNode&&(m[l].style.display=d);C||(e[g].style.display="none")}k()}b.isResolved?A(mxResources.get("reOpened")+": ",!0,c,!1,!0):A(mxResources.get("markedAsResolved"),!1,c,!0)});E.appendChild(x);null!=d?D.insertBefore(E,d.nextSibling):D.appendChild(E);for(d=0;null!=b.replies&&d<b.replies.length;d++)x=b.replies[d],x.isResolved=b.isResolved,p(x,b.replies,null,e+1,g);null!=q&&(q.comment.id==b.id?(g=b.content,b.content=q.comment.content,n(b,E,q.saveCallback,q.deleteOnCancel),
-b.content=g):null==q.comment.id&&q.comment.pCommentId==b.id&&(D.appendChild(q.div),n(q.comment,q.div,q.saveCallback,q.deleteOnCancel)));return E}}var u=!a.canComment(),v=a.canReplyToReplies(),q=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var y=EditorUi.compactUi?"26px":"30px",D=document.createElement("div");D.className="geCommentsList";D.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":
+l=0;l<m.length;l++)m[l]!=c.parentNode&&(m[l].style.display=d);C||(e[g].style.display="none")}k()}b.isResolved?A(mxResources.get("reOpened")+": ",!0,c,!1,!0):A(mxResources.get("markedAsResolved"),!1,c,!0)});E.appendChild(x);null!=d?D.insertBefore(E,d.nextSibling):D.appendChild(E);for(d=0;null!=b.replies&&d<b.replies.length;d++)x=b.replies[d],x.isResolved=b.isResolved,p(x,b.replies,null,e+1,g);null!=t&&(t.comment.id==b.id?(g=b.content,b.content=t.comment.content,n(b,E,t.saveCallback,t.deleteOnCancel),
+b.content=g):null==t.comment.id&&t.comment.pCommentId==b.id&&(D.appendChild(t.div),n(t.comment,t.div,t.saveCallback,t.deleteOnCancel)));return E}}var u=!a.canComment(),v=a.canReplyToReplies(),t=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var y=EditorUi.compactUi?"26px":"30px",D=document.createElement("div");D.className="geCommentsList";D.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":
Dialog.backdropColor;D.style.bottom=parseInt(y)+7+"px";x.appendChild(D);var I=document.createElement("span");I.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(I,mxResources.get("noCommentsFound"));var z=document.createElement("div");z.className="geToolbarContainer geCommentsToolbar";z.style.height=y;z.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";z.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(z.style.filter=
-"none");y=document.createElement("a");y.className="geButton";mxClient.IS_QUIRKS&&(y.style.filter="none");if(!u){var B=y.cloneNode();B.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';B.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(B,"click",function(b){function c(){n(d,e,function(b){t(e);a.addComment(b,function(a){b.id=a;A.push(b);l(e)},function(b){f(e);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},
+"none");y=document.createElement("a");y.className="geButton";mxClient.IS_QUIRKS&&(y.style.filter="none");if(!u){var B=y.cloneNode();B.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';B.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(B,"click",function(b){function c(){n(d,e,function(b){q(e);a.addComment(b,function(a){b.id=a;A.push(b);l(e)},function(b){f(e);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},
!0)}var d=a.newComment("",a.getCurrentUser()),e=p(d,A,null,0);c();b.preventDefault();mxEvent.consume(b)});z.appendChild(B)}B=y.cloneNode();B.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';B.setAttribute("title",mxResources.get("showResolved"));var C=!1;"dark"==uiTheme&&(B.style.filter="invert(100%)");mxEvent.addListener(B,"click",function(a){this.className=(C=!C)?"geButton geCheckedBtn":"geButton";G();a.preventDefault();mxEvent.consume(a)});z.appendChild(B);a.commentsRefreshNeeded()&&
(B=y.cloneNode(),B.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',B.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(B.style.filter="invert(100%)"),mxEvent.addListener(B,"click",function(a){G();a.preventDefault();mxEvent.consume(a)}),z.appendChild(B));a.commentsSaveNeeded()&&(y=y.cloneNode(),y.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',y.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&
-(y.style.filter="invert(100%)"),mxEvent.addListener(y,"click",function(a){e();a.preventDefault();mxEvent.consume(a)}),z.appendChild(y));x.appendChild(z);var A=[],G=mxUtils.bind(this,function(){this.hasError=!1;if(null!=q)try{q.div=q.div.cloneNode(!0);var b=q.div.querySelector(".geCommentEditTxtArea"),c=q.div.querySelector(".geCommentEditBtns");q.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}catch(E){a.handleError(E)}D.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
+(y.style.filter="invert(100%)"),mxEvent.addListener(y,"click",function(a){e();a.preventDefault();mxEvent.consume(a)}),z.appendChild(y));x.appendChild(z);var A=[],G=mxUtils.bind(this,function(){this.hasError=!1;if(null!=t)try{t.div=t.div.cloneNode(!0);var b=t.div.querySelector(".geCommentEditTxtArea"),c=t.div.querySelector(".geCommentEditBtns");t.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}catch(E){a.handleError(E)}D.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";v=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});D.innerHTML="";D.appendChild(I);I.style.display="block";A=a;for(a=0;a<A.length;a++)b(A[a].replies),
-p(A[a],A,null,0,C);null!=q&&null==q.comment.id&&null==q.comment.pCommentId&&(D.appendChild(q.div),n(q.comment,q.div,q.saveCallback,q.deleteOnCancel))},mxUtils.bind(this,function(a){D.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=!0})):D.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});G();this.refreshComments=G;z=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(m(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}
+p(A[a],A,null,0,C);null!=t&&null==t.comment.id&&null==t.comment.pCommentId&&(D.appendChild(t.div),n(t.comment,t.div,t.saveCallback,t.deleteOnCancel))},mxUtils.bind(this,function(a){D.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=!0})):D.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});G();this.refreshComments=G;z=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(m(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}
if(this.window.isVisible()){for(var b=D.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<A.length;d++)a(A[d])}});setInterval(z,6E4);this.refreshCommentsTime=z;this.window=new mxWindow(mxResources.get("comments"),x,c,d,b,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(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var 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()}},ConfirmDialog=function(a,c,d,b,g,e,k,n,m,t,f){var l=document.createElement("div");l.style.textAlign="center";f=null!=f?f:44;var p=document.createElement("div");p.style.padding="6px";p.style.overflow="auto";p.style.maxHeight=f+"px";p.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(p.style.height="60px");mxUtils.write(p,c);
-l.appendChild(p);null!=t&&(p=document.createElement("div"),p.style.padding="6px 0 6px 0",c=document.createElement("img"),c.setAttribute("src",t),p.appendChild(c),l.appendChild(p));t=document.createElement("div");t.style.textAlign="center";t.style.whiteSpace="nowrap";var u=document.createElement("input");u.setAttribute("type","checkbox");e=mxUtils.button(e||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b(u.checked)});e.className="geBtn";null!=n&&(e.innerHTML=n+"<br>"+e.innerHTML,e.style.paddingBottom=
-"8px",e.style.paddingTop="8px",e.style.height="auto",e.style.width="40%");a.editor.cancelFirst&&t.appendChild(e);var v=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(u.checked)});t.appendChild(v);null!=k?(v.innerHTML=k+"<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";a.editor.cancelFirst||t.appendChild(e);l.appendChild(t);m?(t.style.marginTop=
-"10px",p=document.createElement("p"),p.style.marginTop="20px",p.appendChild(u),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),p.appendChild(g),l.appendChild(p),mxEvent.addListener(g,"click",function(a){u.checked=!u.checked;mxEvent.consume(a)})):t.style.marginTop="12px";this.init=function(){v.focus()};this.container=l};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
-EditorUi.prototype.patchPages=function(a,c,d,b,g){var e={},k=[],n={},m={},t={},f={};if(null!=b&&null!=b[EditorUi.DIFF_UPDATE])for(var l in b[EditorUi.DIFF_UPDATE])e[l]=b[EditorUi.DIFF_UPDATE][l];if(null!=c[EditorUi.DIFF_REMOVE])for(b=0;b<c[EditorUi.DIFF_REMOVE].length;b++)m[c[EditorUi.DIFF_REMOVE][b]]=!0;if(null!=c[EditorUi.DIFF_INSERT])for(b=0;b<c[EditorUi.DIFF_INSERT].length;b++)n[c[EditorUi.DIFF_INSERT][b].previous]=c[EditorUi.DIFF_INSERT][b];if(null!=c[EditorUi.DIFF_UPDATE])for(l in c[EditorUi.DIFF_UPDATE])b=
-c[EditorUi.DIFF_UPDATE][l],null!=b.previous&&(f[b.previous]=l);if(null!=a){var p="";for(b=0;b<a.length;b++){var u=a[b].getId();t[u]=a[b];null!=f[p]||m[u]||null!=c[EditorUi.DIFF_UPDATE]&&null!=c[EditorUi.DIFF_UPDATE][u]&&null!=c[EditorUi.DIFF_UPDATE][u].previous||(f[p]=u);p=u}}var v={},q=mxUtils.bind(this,function(a){var b=null!=a?a.getId():"";if(null!=a&&!v[b]){v[b]=!0;k.push(a);var m=null!=c[EditorUi.DIFF_UPDATE]?c[EditorUi.DIFF_UPDATE][b]:null;null!=m&&(this.updatePageRoot(a),null!=m.name&&a.setName(m.name),
-null!=m.view&&this.patchViewState(a,m.view),null!=m.cells&&this.patchPage(a,m.cells,e[a.getId()],g),!d||null==m.cells&&null==m.view||(a.needsUpdate=!0))}a=f[b];null!=a&&(delete f[b],q(t[a]));a=n[b];null!=a&&(delete n[b],x(a))}),x=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var b=t[a.getId()];null==b?q(a):(b.root=a.root,this.currentPage==b?this.editor.graph.model.setRoot(b.root):d&&(b.needsUpdate=!0))});q();for(l in f)q(t[f[l]]),
+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()}},ConfirmDialog=function(a,c,d,b,g,e,k,n,m,q,f){var l=document.createElement("div");l.style.textAlign="center";f=null!=f?f:44;var p=document.createElement("div");p.style.padding="6px";p.style.overflow="auto";p.style.maxHeight=f+"px";p.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(p.style.height="60px");mxUtils.write(p,c);
+l.appendChild(p);null!=q&&(p=document.createElement("div"),p.style.padding="6px 0 6px 0",c=document.createElement("img"),c.setAttribute("src",q),p.appendChild(c),l.appendChild(p));q=document.createElement("div");q.style.textAlign="center";q.style.whiteSpace="nowrap";var u=document.createElement("input");u.setAttribute("type","checkbox");e=mxUtils.button(e||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b(u.checked)});e.className="geBtn";null!=n&&(e.innerHTML=n+"<br>"+e.innerHTML,e.style.paddingBottom=
+"8px",e.style.paddingTop="8px",e.style.height="auto",e.style.width="40%");a.editor.cancelFirst&&q.appendChild(e);var v=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(u.checked)});q.appendChild(v);null!=k?(v.innerHTML=k+"<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";a.editor.cancelFirst||q.appendChild(e);l.appendChild(q);m?(q.style.marginTop=
+"10px",p=document.createElement("p"),p.style.marginTop="20px",p.appendChild(u),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),p.appendChild(g),l.appendChild(p),mxEvent.addListener(g,"click",function(a){u.checked=!u.checked;mxEvent.consume(a)})):q.style.marginTop="12px";this.init=function(){v.focus()};this.container=l};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
+EditorUi.prototype.patchPages=function(a,c,d,b,g){var e={},k=[],n={},m={},q={},f={};if(null!=b&&null!=b[EditorUi.DIFF_UPDATE])for(var l in b[EditorUi.DIFF_UPDATE])e[l]=b[EditorUi.DIFF_UPDATE][l];if(null!=c[EditorUi.DIFF_REMOVE])for(b=0;b<c[EditorUi.DIFF_REMOVE].length;b++)m[c[EditorUi.DIFF_REMOVE][b]]=!0;if(null!=c[EditorUi.DIFF_INSERT])for(b=0;b<c[EditorUi.DIFF_INSERT].length;b++)n[c[EditorUi.DIFF_INSERT][b].previous]=c[EditorUi.DIFF_INSERT][b];if(null!=c[EditorUi.DIFF_UPDATE])for(l in c[EditorUi.DIFF_UPDATE])b=
+c[EditorUi.DIFF_UPDATE][l],null!=b.previous&&(f[b.previous]=l);if(null!=a){var p="";for(b=0;b<a.length;b++){var u=a[b].getId();q[u]=a[b];null!=f[p]||m[u]||null!=c[EditorUi.DIFF_UPDATE]&&null!=c[EditorUi.DIFF_UPDATE][u]&&null!=c[EditorUi.DIFF_UPDATE][u].previous||(f[p]=u);p=u}}var v={},t=mxUtils.bind(this,function(a){var b=null!=a?a.getId():"";if(null!=a&&!v[b]){v[b]=!0;k.push(a);var m=null!=c[EditorUi.DIFF_UPDATE]?c[EditorUi.DIFF_UPDATE][b]:null;null!=m&&(this.updatePageRoot(a),null!=m.name&&a.setName(m.name),
+null!=m.view&&this.patchViewState(a,m.view),null!=m.cells&&this.patchPage(a,m.cells,e[a.getId()],g),!d||null==m.cells&&null==m.view||(a.needsUpdate=!0))}a=f[b];null!=a&&(delete f[b],t(q[a]));a=n[b];null!=a&&(delete n[b],x(a))}),x=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var b=q[a.getId()];null==b?t(a):(b.root=a.root,this.currentPage==b?this.editor.graph.model.setRoot(b.root):d&&(b.needsUpdate=!0))});t();for(l in f)t(q[f[l]]),
delete f[l];for(l in n)x(n[l]),delete n[l];return k};EditorUi.prototype.patchViewState=function(a,c){if(null!=a.viewState&&null!=c){a==this.currentPage&&(a.viewState=this.editor.graph.getViewState());for(var d in c)a.viewState[d]=JSON.parse(c[d]);a==this.currentPage&&this.editor.graph.setViewState(a.viewState)}};
EditorUi.prototype.createParentLookup=function(a,c){function d(a){var c=b[a];null==c&&(c={inserted:[],moved:{}},b[a]=c);return c}var b={};if(null!=c[EditorUi.DIFF_INSERT])for(var g=0;g<c[EditorUi.DIFF_INSERT].length;g++){var e=c[EditorUi.DIFF_INSERT][g],k=null!=e.parent?e.parent:"",n=null!=e.previous?e.previous:"";d(k).inserted[n]=e}if(null!=c[EditorUi.DIFF_UPDATE])for(var m in c[EditorUi.DIFF_UPDATE])e=c[EditorUi.DIFF_UPDATE][m],null!=e.previous&&(k=e.parent,null==k&&(g=a.getCell(m),null!=g&&(g=
a.getParent(g),null!=g&&(k=g.getId()))),null!=k&&(d(k).moved[e.previous]=m));return b};
-EditorUi.prototype.patchPage=function(a,c,d,b){var g=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),e=this.createParentLookup(g,c);g.beginUpdate();try{var k=g.updateEdgeParent,n=new mxDictionary,m=[];g.updateEdgeParent=function(a,c){!n.get(a)&&b&&(n.put(a,!0),m.push(a))};var t=e[""],f=null!=t&&null!=t.inserted?t.inserted[""]:null,l=null;null!=f&&(l=this.getCellForJson(f));if(null==l){var p=null!=t&&null!=t.moved?t.moved[""]:null;null!=p&&(l=g.getCell(p))}null!=l&&(g.setRoot(l),
-a.root=l);this.patchCellRecursive(a,g,g.root,e,c);if(null!=c[EditorUi.DIFF_REMOVE])for(var u=0;u<c[EditorUi.DIFF_REMOVE].length;u++){var v=g.getCell(c[EditorUi.DIFF_REMOVE][u]);null!=v&&g.remove(v)}if(null!=c[EditorUi.DIFF_UPDATE]){var q=null!=d&&null!=d.cells?d.cells[EditorUi.DIFF_UPDATE]:null;for(p in c[EditorUi.DIFF_UPDATE])this.patchCell(g,g.getCell(p),c[EditorUi.DIFF_UPDATE][p],null!=q?q[p]:null)}if(null!=c[EditorUi.DIFF_INSERT])for(u=0;u<c[EditorUi.DIFF_INSERT].length;u++)f=c[EditorUi.DIFF_INSERT][u],
+EditorUi.prototype.patchPage=function(a,c,d,b){var g=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),e=this.createParentLookup(g,c);g.beginUpdate();try{var k=g.updateEdgeParent,n=new mxDictionary,m=[];g.updateEdgeParent=function(a,c){!n.get(a)&&b&&(n.put(a,!0),m.push(a))};var q=e[""],f=null!=q&&null!=q.inserted?q.inserted[""]:null,l=null;null!=f&&(l=this.getCellForJson(f));if(null==l){var p=null!=q&&null!=q.moved?q.moved[""]:null;null!=p&&(l=g.getCell(p))}null!=l&&(g.setRoot(l),
+a.root=l);this.patchCellRecursive(a,g,g.root,e,c);if(null!=c[EditorUi.DIFF_REMOVE])for(var u=0;u<c[EditorUi.DIFF_REMOVE].length;u++){var v=g.getCell(c[EditorUi.DIFF_REMOVE][u]);null!=v&&g.remove(v)}if(null!=c[EditorUi.DIFF_UPDATE]){var t=null!=d&&null!=d.cells?d.cells[EditorUi.DIFF_UPDATE]:null;for(p in c[EditorUi.DIFF_UPDATE])this.patchCell(g,g.getCell(p),c[EditorUi.DIFF_UPDATE][p],null!=t?t[p]:null)}if(null!=c[EditorUi.DIFF_INSERT])for(u=0;u<c[EditorUi.DIFF_INSERT].length;u++)f=c[EditorUi.DIFF_INSERT][u],
v=g.getCell(f.id),null!=v&&(g.setTerminal(v,g.getCell(f.source),!0),g.setTerminal(v,g.getCell(f.target),!1));g.updateEdgeParent=k;if(b&&0<m.length)for(u=0;u<m.length;u++)g.contains(m[u])&&g.updateEdgeParent(m[u])}finally{g.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(a,c,d,b,g){if(null!=d){for(var e=b[d.getId()],k=null!=e&&null!=e.inserted?e.inserted:{},e=null!=e&&null!=e.moved?e.moved:{},n=0,m=c.getChildCount(d),t="",f=0;f<m;f++){var l=c.getChildAt(d,f).getId();null==e[t]&&(null==g[EditorUi.DIFF_UPDATE]||null==g[EditorUi.DIFF_UPDATE][l]||null==g[EditorUi.DIFF_UPDATE][l].previous&&null==g[EditorUi.DIFF_UPDATE][l].parent)&&(e[t]=l);t=l}m=mxUtils.bind(this,function(e,f){var k=null!=e?e.getId():"";if(null!=e&&f){var m=
-c.getCell(k);null!=m&&m!=e&&(e=null)}null!=e&&(c.getChildAt(d,n)!=e&&c.add(d,e,n),this.patchCellRecursive(a,c,e,b,g),n++);return k});for(t=[null];0<t.length;)if(f=t.shift(),f=m(null!=f?f.child:null,null!=f?f.insert:!1),l=e[f],null!=l&&(delete e[f],t.push({child:c.getCell(l)})),l=k[f],null!=l&&(delete k[f],t.push({child:this.getCellForJson(l),insert:!0})),0==t.length){for(f in e)t.push({child:c.getCell(e[f])}),delete e[f];for(f in k)t.push({child:this.getCellForJson(k[f]),insert:!0}),delete k[f]}}};
+EditorUi.prototype.patchCellRecursive=function(a,c,d,b,g){if(null!=d){for(var e=b[d.getId()],k=null!=e&&null!=e.inserted?e.inserted:{},e=null!=e&&null!=e.moved?e.moved:{},n=0,m=c.getChildCount(d),q="",f=0;f<m;f++){var l=c.getChildAt(d,f).getId();null==e[q]&&(null==g[EditorUi.DIFF_UPDATE]||null==g[EditorUi.DIFF_UPDATE][l]||null==g[EditorUi.DIFF_UPDATE][l].previous&&null==g[EditorUi.DIFF_UPDATE][l].parent)&&(e[q]=l);q=l}m=mxUtils.bind(this,function(e,f){var k=null!=e?e.getId():"";if(null!=e&&f){var m=
+c.getCell(k);null!=m&&m!=e&&(e=null)}null!=e&&(c.getChildAt(d,n)!=e&&c.add(d,e,n),this.patchCellRecursive(a,c,e,b,g),n++);return k});for(q=[null];0<q.length;)if(f=q.shift(),f=m(null!=f?f.child:null,null!=f?f.insert:!1),l=e[f],null!=l&&(delete e[f],q.push({child:c.getCell(l)})),l=k[f],null!=l&&(delete k[f],q.push({child:this.getCellForJson(l),insert:!0})),0==q.length){for(f in e)q.push({child:c.getCell(e[f])}),delete e[f];for(f in k)q.push({child:this.getCellForJson(k[f]),insert:!0}),delete k[f]}}};
EditorUi.prototype.patchCell=function(a,c,d,b){if(null!=c&&null!=d){if(null==b||null==b.xmlValue&&(null==b.value||""==b.value))"value"in d?a.setValue(c,d.value):null!=d.xmlValue&&a.setValue(c,mxUtils.parseXml(d.xmlValue).documentElement);null!=b&&null!=b.style||null==d.style||a.setStyle(c,d.style);null!=d.visible&&a.setVisible(c,1==d.visible);null!=d.collapsed&&a.setCollapsed(c,1==d.collapsed);null!=d.vertex&&(c.vertex=1==d.vertex);null!=d.edge&&(c.edge=1==d.edge);null!=d.connectable&&(c.connectable=
1==d.connectable);null!=d.geometry&&a.setGeometry(c,this.codec.decode(mxUtils.parseXml(d.geometry).documentElement));null!=d.source&&a.setTerminal(c,a.getCell(d.source),!0);null!=d.target&&a.setTerminal(c,a.getCell(d.target),!1);for(var g in d)this.cellProperties[g]||(c[g]=d[g])}};
EditorUi.prototype.getPagesForNode=function(a,c){var d=this.editor.extractGraphModel(a,!0);null!=d&&(a=d);var d=a.getElementsByTagName(c||"diagram"),b=[];if(0<d.length)for(var g=0;g<d.length;g++){var e=new DiagramPage(d[g]);this.updatePageRoot(e);b.push(e)}else"mxGraphModel"==a.nodeName&&(e=new DiagramPage(a.ownerDocument.createElement("diagram")),e.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(e.node,Graph.compressNode(a)),b.push(e));return b};
-EditorUi.prototype.diffPages=function(a,c){for(var d=[],b=[],g={},e={},k={},n=null,m=0;m<c.length;m++)e[c[m].getId()]={page:c[m],prev:n},n=c[m];n=null;for(m=0;m<a.length;m++){var t=a[m].getId(),f=e[t];if(null==f)b.push(t);else{var l=this.diffPage(a[m],f.page),p={};0<Object.keys(l).length&&(p.cells=l);l=this.diffViewState(a[m],f.page);0<Object.keys(l).length&&(p.view=l);if((null!=f.prev?null==n:null!=n)||null!=n&&null!=f.prev&&n.getId()!=f.prev.getId())p.previous=null!=f.prev?f.prev.getId():"";null!=
-f.page.getName()&&a[m].getName()!=f.page.getName()&&(p.name=f.page.getName());0<Object.keys(p).length&&(k[t]=p)}delete e[a[m].getId()];n=a[m]}for(t in e)f=e[t],d.push({data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});0<Object.keys(k).length&&(g[EditorUi.DIFF_UPDATE]=k);0<b.length&&(g[EditorUi.DIFF_REMOVE]=b);0<d.length&&(g[EditorUi.DIFF_INSERT]=d);return g};
+EditorUi.prototype.diffPages=function(a,c){for(var d=[],b=[],g={},e={},k={},n=null,m=0;m<c.length;m++)e[c[m].getId()]={page:c[m],prev:n},n=c[m];n=null;for(m=0;m<a.length;m++){var q=a[m].getId(),f=e[q];if(null==f)b.push(q);else{var l=this.diffPage(a[m],f.page),p={};0<Object.keys(l).length&&(p.cells=l);l=this.diffViewState(a[m],f.page);0<Object.keys(l).length&&(p.view=l);if((null!=f.prev?null==n:null!=n)||null!=n&&null!=f.prev&&n.getId()!=f.prev.getId())p.previous=null!=f.prev?f.prev.getId():"";null!=
+f.page.getName()&&a[m].getName()!=f.page.getName()&&(p.name=f.page.getName());0<Object.keys(p).length&&(k[q]=p)}delete e[a[m].getId()];n=a[m]}for(q in e)f=e[q],d.push({data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});0<Object.keys(k).length&&(g[EditorUi.DIFF_UPDATE]=k);0<b.length&&(g[EditorUi.DIFF_REMOVE]=b);0<d.length&&(g[EditorUi.DIFF_INSERT]=d);return g};
EditorUi.prototype.createCellLookup=function(a,c,d){d=null!=d?d:{};d[a.getId()]={cell:a,prev:c};var b=a.getChildCount();c=null;for(var g=0;g<b;g++){var e=a.getChildAt(g);this.createCellLookup(e,c,d);c=e}return d};
EditorUi.prototype.diffCellRecursive=function(a,c,d,b,g){b=null!=b?b:{};var e=d[a.getId()];delete d[a.getId()];if(null==e)g.push(a.getId());else{var k=this.diffCell(a,e.cell);if(null!=k.parent||(null!=e.prev?null==c:null!=c)||null!=c&&null!=e.prev&&c.getId()!=e.prev.getId())k.previous=null!=e.prev?e.prev.getId():"";0<Object.keys(k).length&&(b[a.getId()]=k)}e=a.getChildCount();c=null;for(k=0;k<e;k++){var n=a.getChildAt(k);this.diffCellRecursive(n,c,d,b,g);c=n}return b};
EditorUi.prototype.diffPage=function(a,c){var d=[],b=[],g={};this.updatePageRoot(a);this.updatePageRoot(c);var e=this.createCellLookup(c.root),k=this.diffCellRecursive(a.root,null,e,k,b),n;for(n in e){var m=e[n];d.push(this.getJsonForCell(m.cell,m.prev))}0<Object.keys(k).length&&(g[EditorUi.DIFF_UPDATE]=k);0<b.length&&(g[EditorUi.DIFF_REMOVE]=b);0<d.length&&(g[EditorUi.DIFF_INSERT]=d);return g};
@@ -8778,14 +8787,14 @@ DrawioFileSync.prototype.fileChangedNotify=function(){if(this.isValidState())if(
DrawioFileSync.prototype.fileChanged=function(a,c,d){var b=window.setTimeout(mxUtils.bind(this,function(){null!=d&&d()||(this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(b){null!=d&&d()||(this.isValidState()?this.catchup(b,a,c,d):null!=c&&c())}),c):null!=c&&c())}),0);return this.notifyThread=b};
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(a){null!=a?(this.file.setDescriptorRevisionId(a,this.file.getCurrentRevisionId()),this.updateDescriptor(a),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(a){this.file.inConflictState=!0;this.file.handleFileError(a)}))};
DrawioFileSync.prototype.updateDescriptor=function(a){this.file.setDescriptor(a);this.file.descriptorChanged();this.start()};
-DrawioFileSync.prototype.catchup=function(a,c,d,b){if(null!=a&&(null==b||!b())){var g=this.file.getDescriptorRevisionId(a),e=this.file.getCurrentRevisionId();if(e==g)this.file.patchDescriptor(this.file.getDescriptor(),a),null!=c&&c();else if(this.isValidState()){var k=this.file.getDescriptorSecret(a),n=0,m=!1,t=mxUtils.bind(this,function(){if(null==b||!b())if(e!=this.file.getCurrentRevisionId())null!=c&&c();else if(this.isValidState()){var f=!0,l=window.setTimeout(mxUtils.bind(this,function(){f=!1;
-this.reload(c,d,b)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(e)+"&to="+encodeURIComponent(g)+(null!=k?"&secret="+encodeURIComponent(k):""),mxUtils.bind(this,function(g){this.file.stats.bytesReceived+=g.getText().length;window.clearTimeout(l);if(f&&(null==b||!b()))if(e!=this.file.getCurrentRevisionId())null!=c&&c();else if(this.isValidState()){var k=null,p=[];if(200<=g.getStatus()&&299>=g.getStatus()&&0<g.getText().length)try{var q=
-JSON.parse(g.getText());if(null!=q&&0<q.length)for(var x=0;x<q.length;x++){var y=this.stringToObject(q[x]);if(y.v>DrawioFileSync.PROTOCOL){m=!0;p=[];break}else if(y.v===DrawioFileSync.PROTOCOL&&null!=y.d)k=y.d.checksum,p.push(y.d.patch);else{m=!0;p=[];break}}}catch(D){p=[],null!=window.console&&"1"==urlParams.test&&console.log(D)}try{0<p.length?(this.file.stats.cacheHits++,this.merge(p,k,a,c,d,b)):n<=this.maxCacheReadyRetries&&!m&&401!=g.getStatus()?(n++,this.file.stats.cacheMiss++,window.setTimeout(t,
-(n+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(c,d,b))}catch(D){null!=d&&d(D)}}else null!=d&&d()}))}else null!=d&&d()});window.setTimeout(t,this.cacheReadyDelay)}else null!=d&&d()}};DrawioFileSync.prototype.reload=function(a,c,d,b){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=a&&a()}),mxUtils.bind(this,function(a){null!=c&&c(a)}),d,b)};
+DrawioFileSync.prototype.catchup=function(a,c,d,b){if(null!=a&&(null==b||!b())){var g=this.file.getDescriptorRevisionId(a),e=this.file.getCurrentRevisionId();if(e==g)this.file.patchDescriptor(this.file.getDescriptor(),a),null!=c&&c();else if(this.isValidState()){var k=this.file.getDescriptorSecret(a),n=0,m=!1,q=mxUtils.bind(this,function(){if(null==b||!b())if(e!=this.file.getCurrentRevisionId())null!=c&&c();else if(this.isValidState()){var f=!0,l=window.setTimeout(mxUtils.bind(this,function(){f=!1;
+this.reload(c,d,b)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(e)+"&to="+encodeURIComponent(g)+(null!=k?"&secret="+encodeURIComponent(k):""),mxUtils.bind(this,function(k){this.file.stats.bytesReceived+=k.getText().length;window.clearTimeout(l);if(f&&(null==b||!b()))if(e!=this.file.getCurrentRevisionId())null!=c&&c();else if(this.isValidState()){var g=null,p=[];if(200<=k.getStatus()&&299>=k.getStatus()&&0<k.getText().length)try{var t=
+JSON.parse(k.getText());if(null!=t&&0<t.length)for(var x=0;x<t.length;x++){var y=this.stringToObject(t[x]);if(y.v>DrawioFileSync.PROTOCOL){m=!0;p=[];break}else if(y.v===DrawioFileSync.PROTOCOL&&null!=y.d)g=y.d.checksum,p.push(y.d.patch);else{m=!0;p=[];break}}}catch(D){p=[],null!=window.console&&"1"==urlParams.test&&console.log(D)}try{0<p.length?(this.file.stats.cacheHits++,this.merge(p,g,a,c,d,b)):n<=this.maxCacheReadyRetries&&!m&&401!=k.getStatus()?(n++,this.file.stats.cacheMiss++,window.setTimeout(q,
+(n+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(c,d,b))}catch(D){null!=d&&d(D)}}else null!=d&&d()}))}else null!=d&&d()});window.setTimeout(q,this.cacheReadyDelay)}else null!=d&&d()}};DrawioFileSync.prototype.reload=function(a,c,d,b){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=a&&a()}),mxUtils.bind(this,function(a){null!=c&&c(a)}),d,b)};
DrawioFileSync.prototype.merge=function(a,c,d,b,g,e){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 k=this.file.ignorePatches(a),n=this.file.getDescriptorRevisionId(d);if(!k){for(e=0;e<a.length;e++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,
-a[e]);var m=null!=c?this.ui.getHashValueForPages(this.file.shadowPages):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentRevisionId(),"to",n,"etag",this.file.getDescriptorEtag(d),"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"patches",a,"checksum",c==m,c);if(null!=c&&c!=m){var t=this.ui.hashValue(this.file.getCurrentRevisionId()),f=this.ui.hashValue(n);this.file.checksumError(g,a,"From: "+t+"\nTo: "+f+"\nChecksum: "+c+"\nCurrent: "+m,n,"merge");
-return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),d);this.file.backupPatch=null;null!=b&&b()}catch(u){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=g&&g(u);try{if(this.file.errorReportsEnabled)t=this.ui.hashValue(this.file.getCurrentRevisionId()),f=this.ui.hashValue(n),this.file.sendErrorReport("Error in merge",
-"From: "+t+"\nTo: "+f+"\nChecksum: "+c+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(a,null,2)),u);else{var l=this.file.getCurrentUser(),p=null!=l?l.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),p,u)}}catch(v){}}};
+a[e]);var m=null!=c?this.ui.getHashValueForPages(this.file.shadowPages):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentRevisionId(),"to",n,"etag",this.file.getDescriptorEtag(d),"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"patches",a,"checksum",c==m,c);if(null!=c&&c!=m){var q=this.ui.hashValue(this.file.getCurrentRevisionId()),f=this.ui.hashValue(n);this.file.checksumError(g,a,"From: "+q+"\nTo: "+f+"\nChecksum: "+c+"\nCurrent: "+m,n,"merge");
+return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),d);this.file.backupPatch=null;null!=b&&b()}catch(u){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=g&&g(u);try{if(this.file.errorReportsEnabled)q=this.ui.hashValue(this.file.getCurrentRevisionId()),f=this.ui.hashValue(n),this.file.sendErrorReport("Error in merge",
+"From: "+q+"\nTo: "+f+"\nChecksum: "+c+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(a,null,2)),u);else{var l=this.file.getCurrentUser(),p=null!=l?l.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),p,u)}}catch(v){}}};
DrawioFileSync.prototype.descriptorChanged=function(a){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var c=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),d=this.file.getCurrentRevisionId(),b=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(a)+"&to="+encodeURIComponent(d)+"&msg="+encodeURIComponent(c)+"&data="+encodeURIComponent(b));this.file.stats.bytesSent+=b.length;this.file.stats.msgSent++}this.updateStatus()};
DrawioFileSync.prototype.objectToString=function(a){a=Graph.compress(JSON.stringify(a));null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.encrypt(a,this.key).toString());return a};DrawioFileSync.prototype.stringToObject=function(a){null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.decrypt(a,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(a))};
DrawioFileSync.prototype.fileSaved=function(a,c,d,b){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline()&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var g=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);b=this.ui.getHashValueForPages(a);g=this.ui.diffPages(g,a);c=this.file.getDescriptorRevisionId(c);
@@ -8801,7 +8810,7 @@ mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.wai
mxAsyncCanvas.prototype.setAlpha=function(a){this.state.alpha=a};mxAsyncCanvas.prototype.setFontColor=function(a){this.state.fontColor=a};mxAsyncCanvas.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxAsyncCanvas.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxAsyncCanvas.prototype.setFontSize=function(a){this.state.fontSize=a};
mxAsyncCanvas.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxAsyncCanvas.prototype.setFontStyle=function(a){this.state.fontStyle=a};mxAsyncCanvas.prototype.rect=function(a,c,d,b){};mxAsyncCanvas.prototype.roundrect=function(a,c,d,b,g,e){};mxAsyncCanvas.prototype.ellipse=function(a,c,d,b){};mxAsyncCanvas.prototype.rewriteImageSource=function(a){if("http://"==a.substring(0,7)||"https://"==a.substring(0,8))a="/proxy?url="+encodeURIComponent(a);return a};
mxAsyncCanvas.prototype.image=function(a,c,d,b,g,e,k,n){g=this.rewriteImageSource(g);a=this.htmlCanvas.images[g];null==a&&(a=new Image,a.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),a.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[g]=a,a.src=g)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
-mxAsyncCanvas.prototype.text=function(a,c,d,b,g,e,k,n,m,t,f,l){if(null!=g&&0!=g.length&&(a=this.state.scale,"html"==m&&"function"===typeof html2canvas)){this.incWaitCounter();var p=this.canvasIndex++;html2canvas(g,{onrendered:mxUtils.bind(this,function(a){this.htmlCanvas.subCanvas[p]=a;this.decWaitCounter()}),scale:a,logging:!0})}};mxAsyncCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};function mxJsCanvas(a){mxAbstractCanvas2D.call(this);this.ctx=a.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
+mxAsyncCanvas.prototype.text=function(a,c,d,b,g,e,k,n,m,q,f,l){if(null!=g&&0!=g.length&&(a=this.state.scale,"html"==m&&"function"===typeof html2canvas)){this.incWaitCounter();var p=this.canvasIndex++;html2canvas(g,{onrendered:mxUtils.bind(this,function(a){this.htmlCanvas.subCanvas[p]=a;this.decWaitCounter()}),scale:a,logging:!0})}};mxAsyncCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};function mxJsCanvas(a){mxAbstractCanvas2D.call(this);this.ctx=a.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
mxJsCanvas.prototype.subCanvas=null;mxJsCanvas.prototype.canvasIndex=0;mxJsCanvas.prototype.hexToRgb=function(a){a=a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,d,b,g){return d+d+b+b+g+g});return(a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a))?{r:parseInt(a[1],16),g:parseInt(a[2],16),b:parseInt(a[3],16)}:null};mxJsCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
mxJsCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxJsCanvas.prototype.updateFont=function(){var a="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a+="italic ");this.ctx.font=a+this.state.fontSize+"px "+this.state.fontFamily};
mxJsCanvas.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state);this.ctx.save()};mxJsCanvas.prototype.restore=function(){this.state=this.states.pop();this.ctx.restore()};mxJsCanvas.prototype.scale=function(a){this.state.scale*=a;this.state.strokeWidth*=a;this.ctx.scale(a,a)};mxJsCanvas.prototype.translate=function(a,c){this.state.dx+=a;this.state.dy+=c;this.ctx.translate(a,c)};
@@ -8816,9 +8825,9 @@ mxJsCanvas.prototype.setShadowOffset=function(a,c){this.state.shadowDx=a;this.st
mxJsCanvas.prototype.arcTo=function(a,c,d,b,g,e,k){a=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,a,c,d,b,g,e,k);if(null!=a)for(c=0;c<a.length;c+=6)this.curveTo(a[c],a[c+1],a[c+2],a[c+3],a[c+4],a[c+5])};mxJsCanvas.prototype.curveTo=function(a,c,d,b,g,e){this.ctx.bezierCurveTo(a,c,d,b,g,e);this.lastMoveX=g;this.lastMoveY=e};mxJsCanvas.prototype.rect=function(a,c,d,b){this.begin();this.moveTo(a,c);this.lineTo(a+d,c);this.lineTo(a+d,c+b);this.lineTo(a,c+b);this.close()};
mxJsCanvas.prototype.roundrect=function(a,c,d,b,g,e){this.begin();this.moveTo(a+g,c);this.lineTo(a+d-g,c);this.quadTo(a+d,c,a+d,c+e);this.lineTo(a+d,c+b-e);this.quadTo(a+d,c+b,a+d-g,c+b);this.lineTo(a+g,c+b);this.quadTo(a,c+b,a,c+b-e);this.lineTo(a,c+e);this.quadTo(a,c,a+g,c)};mxJsCanvas.prototype.ellipse=function(a,c,d,b){this.ctx.save();this.ctx.translate(a+d/2,c+b/2);this.ctx.scale(d/2,b/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};
mxJsCanvas.prototype.rewriteImageSource=function(a){if("http://"==a.substring(0,7)||"https://"==a.substring(0,8))a="/proxy?url="+encodeURIComponent(a);return a};
-mxJsCanvas.prototype.image=function(a,c,d,b,g,e,k,n){g=this.rewriteImageSource(g);g=this.images[g];if(null!=g&&0<g.height&&0<g.width){var m=this.ctx;m.save();if(e){e=g.width;var t=g.height,f=Math.min(d/e,b/t);a+=(d-e*f)/2;c+=(b-t*f)/2;d=e*f;b=t*f}k&&(m.translate(2*a+d,0),m.scale(-1,1));n&&(m.translate(0,2*c+b),m.scale(1,-1));m.drawImage(g,a,c,d,b);m.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
+mxJsCanvas.prototype.image=function(a,c,d,b,g,e,k,n){g=this.rewriteImageSource(g);g=this.images[g];if(null!=g&&0<g.height&&0<g.width){var m=this.ctx;m.save();if(e){e=g.width;var q=g.height,f=Math.min(d/e,b/q);a+=(d-e*f)/2;c+=(b-q*f)/2;d=e*f;b=q*f}k&&(m.translate(2*a+d,0),m.scale(-1,1));n&&(m.translate(0,2*c+b),m.scale(1,-1));m.drawImage(g,a,c,d,b);m.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 a=this.ctx.shadowColor,c=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=a;this.ctx.shadowOffsetX=c;this.ctx.shadowOffsetY=d}else this.ctx.fill(),this.ctx.stroke()};
-mxJsCanvas.prototype.text=function(a,c,d,b,g,e,k,n,m,t,f,l){if(null!=g&&0!=g.length){d=this.state.scale;0!=l&&(this.ctx.translate(Math.round(a),Math.round(c)),this.ctx.rotate(l*Math.PI/180),this.ctx.translate(Math.round(-a),Math.round(-c)));if("html"==m){g=this.subCanvas[this.canvasIndex++];m=g.height;l=g.width;switch(k){case mxConstants.ALIGN_MIDDLE:c-=m/2/d;break;case mxConstants.ALIGN_BOTTOM:c-=m/d}switch(e){case mxConstants.ALIGN_CENTER:a-=l/2/d;break;case mxConstants.ALIGN_RIGHT:a-=l/d}this.ctx.save();
+mxJsCanvas.prototype.text=function(a,c,d,b,g,e,k,n,m,q,f,l){if(null!=g&&0!=g.length){d=this.state.scale;0!=l&&(this.ctx.translate(Math.round(a),Math.round(c)),this.ctx.rotate(l*Math.PI/180),this.ctx.translate(Math.round(-a),Math.round(-c)));if("html"==m){g=this.subCanvas[this.canvasIndex++];m=g.height;l=g.width;switch(k){case mxConstants.ALIGN_MIDDLE:c-=m/2/d;break;case mxConstants.ALIGN_BOTTOM:c-=m/d}switch(e){case mxConstants.ALIGN_CENTER:a-=l/2/d;break;case mxConstants.ALIGN_RIGHT:a-=l/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(a)-.5,Math.round(c)-.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(a)-.5,Math.round(c)-.5,Math.round(g.width/d),Math.round(g.height/d)));this.ctx.scale(1/d,1/d);this.ctx.drawImage(g,
Math.round(a*d),Math.round(c*d))}else{this.ctx.save();this.updateFont();l=document.createElement("div");l.innerHTML=g;l.style.position="absolute";l.style.top="-9999px";l.style.left="-9999px";l.style.fontFamily=this.state.fontFamily;l.style.fontWeight="bold";l.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(l);m=[l.offsetWidth,l.offsetHeight];document.body.removeChild(l);g=g.split("\n");l=m[1];this.ctx.textBaseline="top";m=c;switch(k){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
"middle";c-=(g.length-1)*l/2;m=c-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",c-=l*(g.length-1),m=c-this.state.fontSize}k=[];l=[];for(d=0;d<g.length;d++)l[d]=a,k[d]=this.ctx.measureText(g[d]).width,null!=e&&e!=mxConstants.ALIGN_LEFT&&(l[d]-=k[d],e==mxConstants.ALIGN_CENTER&&(l[d]+=k[d]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){a=l[0];e=k[0];for(d=1;d<g.length;d++)a=Math.min(a,l[d]),e=Math.max(e,k[d]);this.ctx.save();
@@ -8826,7 +8835,7 @@ a=Math.round(a)-.5;m=Math.round(m)-.5;null!=this.state.fontBackgroundColor&&(thi
mxJsCanvas.prototype.getCanvas=function(){return canvas};mxJsCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};DrawioClient=function(a,c){mxEventSource.call(this);this.ui=a;this.cookieName=c;this.token=this.getPersistentToken()};mxUtils.extend(DrawioClient,mxEventSource);DrawioClient.prototype.token=null;DrawioClient.prototype.user=null;DrawioClient.prototype.setUser=function(a){this.user=a;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 a=new Date;a.setYear(a.getFullYear()-1);document.cookie=this.cookieName+"=; expires="+a.toUTCString()}};
DrawioClient.prototype.getPersistentToken=function(a){var c=null;isLocalStorage&&(c=localStorage.getItem("."+this.cookieName),null==c&&a&&(c=sessionStorage.getItem("."+this.cookieName)));if(null==c&&"undefined"!=typeof Storage){var d=document.cookie;a=this.cookieName+"=";var b=d.indexOf(a);0<=b&&(b+=a.length,c=d.indexOf(";",b),0>c?c=d.length:postCookie=d.substring(c),c=d.substring(b,c),c=0<c.length?c:null,null!=c&&isLocalStorage&&(d=new Date,d.setYear(d.getFullYear()-1),document.cookie=a+"; expires="+
-d.toUTCString(),localStorage.setItem("."+this.cookieName,c)))}return c};DrawioClient.prototype.setPersistentToken=function(a,c){if(null!=a)if(isLocalStorage)c?sessionStorage.setItem("."+this.cookieName,a):localStorage.setItem("."+this.cookieName,a);else{if("undefined"!=typeof Storage){var d=new Date;d.setYear(d.getFullYear()+10);d=this.cookieName+"="+a+"; path=/"+(c?"":"; expires="+d.toUTCString());"https"==document.location.protocol.toLowerCase()&&(d+=";secure");document.cookie=d}}else this.clearPersistentToken()};DrawioUser=function(a,c,d,b,g){this.id=a;this.email=c;this.displayName=d;this.pictureUrl=b;this.locale=g};DriveFile=function(a,c,d){DrawioFile.call(this,a,c);this.desc=d};mxUtils.extend(DriveFile,DrawioFile);DriveFile.prototype.autosaveDelay=2500;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,c)))}return c};DrawioClient.prototype.setPersistentToken=function(a,c){try{if(null!=a)if(isLocalStorage)c?sessionStorage.setItem("."+this.cookieName,a):localStorage.setItem("."+this.cookieName,a);else{if("undefined"!=typeof Storage){var d=new Date;d.setYear(d.getFullYear()+10);var b=this.cookieName+"="+a+"; path=/"+(c?"":"; expires="+d.toUTCString());"https"==document.location.protocol.toLowerCase()&&(b+=";secure");document.cookie=b}}else this.clearPersistentToken()}catch(g){this.ui.handleError(g)}};DrawioUser=function(a,c,d,b,g){this.id=a;this.email=c;this.displayName=d;this.pictureUrl=b;this.locale=g};DriveFile=function(a,c,d){DrawioFile.call(this,a,c);this.desc=d};mxUtils.extend(DriveFile,DrawioFile);DriveFile.prototype.autosaveDelay=2500;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(a){return null!=a&&null!=a.error&&412==a.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(a){this.ui.drive.executeRequest({url:"/files/"+this.desc.id+"/permissions?supportsTeamDrives=true"},mxUtils.bind(this,function(c){if(null!=c&&null!=c.items)for(var d=0;d<c.items.length;d++)if("anyoneWithLink"===c.items[d].id||"anyone"===c.items[d].id){a(this.desc.webContentLink);return}a(null)}),mxUtils.bind(this,function(){a(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(a,c,d,b,g){DrawioFile.prototype.save.apply(this,[a,mxUtils.bind(this,function(){this.saveFile(null,a,c,d,b,g)}),d,b,g])};
@@ -8857,9 +8866,9 @@ DriveClient.prototype.getUsersList=function(){var a=[],c=JSON.parse(this.getPers
DriveClient.prototype.execute=function(a){var c=mxUtils.bind(this,function(c){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(b,c){this.authorize(!1,mxUtils.bind(this,function(){null!=c&&c();a()}),mxUtils.bind(this,function(a){var b=mxResources.get("cannotLogin");null!=a&&null!=a.error&&403==a.error.code&&null!=a.error.data&&0<a.error.data.length&&"domainPolicy"==a.error.data[0].reason&&(b=a.error.message);this.logout();this.ui.showError(mxResources.get("error"),b,mxResources.get("help"),
mxUtils.bind(this,function(){this.ui.openLink("https://desk.draw.io/support/solutions/articles/16000074659")}),null,mxResources.get("ok"))}),b)}))});this.authorize(!0,a,c)};
DriveClient.prototype.executeRequest=function(a,c,d){try{var b=!0,g=null,e=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var k=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=a;null!=g&&window.clearTimeout(g);g=window.setTimeout(mxUtils.bind(this,function(){b=!1;null!=d&&d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:k})}),this.ui.timeout);var n=null,m=!1;"string"===typeof a.params?n=a.params:null!=a.params&&(n=JSON.stringify(a.params),
-m=!0);var t=a.fullUrl||this.GDriveBaseUrl+a.url;m&&(t+=(0<t.indexOf("?")?"&":"?")+"alt=json");var f=new mxXmlRequest(t,n,a.method||"GET");f.setRequestHeaders=mxUtils.bind(this,function(b,c){if(null!=a.headers)for(var d in a.headers)b.setRequestHeader(d,a.headers[d]);else null!=a.contentType?b.setRequestHeader("Content-Type",a.contentType):m&&b.setRequestHeader("Content-Type","application/json");b.setRequestHeader("Authorization","Bearer "+this.token)});f.send(mxUtils.bind(this,function(f){try{if(window.clearTimeout(g),
-b){var m;try{m=JSON.parse(f.getText())}catch(q){m=null}if(200<=f.getStatus()&&299>=f.getStatus())null!=c&&c(m);else{var l=null!=m&&null!=m.error?null!=m.error.data?m.error.data:m.error.errors:null,n=null!=l&&0<l.length?l[0].reason:null;null==d||null==m||null==m.error||-1!=m.error.code&&(403!=m.error.code||"domainPolicy"!=n&&"The requested mime type change is forbidden."!=m.error.message)?null!=m&&null!=m.error&&(401==m.error.code||403==m.error.code&&"rateLimitExceeded"!=n)?403==m.error.code&&this.retryAuth||
-401==m.error.code&&this.retryAuth&&"authError"==n?(null!=d&&d(m),this.retryAuth=!1):(this.retryAuth=!0,this.execute(k)):null!=m&&null!=m.error&&412!=m.error.code&&404!=m.error.code&&400!=m.error.code&&this.currentRequest==a&&e<this.maxRetries?(e++,this.requestThread=window.setTimeout(k,Math.round(Math.pow(2,e)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=d&&d(m):d(m)}}}catch(q){if(null!=d)d(q);else throw q;}}))}catch(l){if(null!=d)d(l);else throw l;}});null!=this.token&&this.authCalled?k():this.execute(k)}catch(n){if(null!=
+m=!0);var q=a.fullUrl||this.GDriveBaseUrl+a.url;m&&(q+=(0<q.indexOf("?")?"&":"?")+"alt=json");var f=new mxXmlRequest(q,n,a.method||"GET");f.setRequestHeaders=mxUtils.bind(this,function(b,c){if(null!=a.headers)for(var d in a.headers)b.setRequestHeader(d,a.headers[d]);else null!=a.contentType?b.setRequestHeader("Content-Type",a.contentType):m&&b.setRequestHeader("Content-Type","application/json");b.setRequestHeader("Authorization","Bearer "+this.token)});f.send(mxUtils.bind(this,function(f){try{if(window.clearTimeout(g),
+b){var m;try{m=JSON.parse(f.getText())}catch(t){m=null}if(200<=f.getStatus()&&299>=f.getStatus())null!=c&&c(m);else{var l=null!=m&&null!=m.error?null!=m.error.data?m.error.data:m.error.errors:null,n=null!=l&&0<l.length?l[0].reason:null;null==d||null==m||null==m.error||-1!=m.error.code&&(403!=m.error.code||"domainPolicy"!=n&&"The requested mime type change is forbidden."!=m.error.message)?null!=m&&null!=m.error&&(401==m.error.code||403==m.error.code&&"rateLimitExceeded"!=n)?403==m.error.code&&this.retryAuth||
+401==m.error.code&&this.retryAuth&&"authError"==n?(null!=d&&d(m),this.retryAuth=!1):(this.retryAuth=!0,this.execute(k)):null!=m&&null!=m.error&&412!=m.error.code&&404!=m.error.code&&400!=m.error.code&&this.currentRequest==a&&e<this.maxRetries?(e++,this.requestThread=window.setTimeout(k,Math.round(Math.pow(2,e)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=d&&d(m):d(m)}}}catch(t){if(null!=d)d(t);else throw t;}}))}catch(l){if(null!=d)d(l);else throw l;}});null!=this.token&&this.authCalled?k():this.execute(k)}catch(n){if(null!=
d)d(n);else throw n;}};DriveClient.prototype.createAuthWin=function(a){return window.open(a?a:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};
DriveClient.prototype.authorize=function(a,c,d,b,g){var e=mxUtils.bind(this,function(a,b,e){this.token=a.access_token;a.expires=Date.now()+1E3*parseInt(a.expires_in);a.remember=b;this.resetTokenRefresh(a);this.authCalled=!0;if(e||null==this.user){var f=JSON.stringify(a);this.updateUser(mxUtils.bind(this,function(){var a=JSON.parse(f);this.setPersistentToken(a,!b);null!=c&&c()}),d)}else null!=c&&(this.setPersistentToken(a,!b),c())});try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=
this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));var k=JSON.parse(this.getPersistentToken(!0));null!=k&&(null==this.userId?null!=k.current?(this.userId=k.current.userId,k=k[this.userId]):k=null:k=k[this.userId]);if(!a||null!=k&&null!=k.refresh_token)if(a)(new mxXmlRequest(this.redirectUri+"?state=appIndex%3D"+this.appIndex+"&refresh_token="+k.refresh_token,null,"GET")).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?(a=JSON.parse(a.getText()),
@@ -8873,25 +8882,25 @@ DriveClient.prototype.moveFile=function(a,c,d,b){null!=a&&null!=c&&this.executeR
DriveClient.prototype.loadDescriptor=function(a,c,d,b){this.executeRequest({url:"/files/"+a+"?supportsTeamDrives=true&fields="+(null!=b?b:this.allFields)},c,d)};DriveClient.prototype.getCustomProperty=function(a,c){var d=a.properties,b=null;if(null!=d)for(var g=0;g<d.length;g++)if(d[g].key==c){b=d[g].value;break}return b};
DriveClient.prototype.getFile=function(a,c,d,b,g){b=null!=b?b:!1;g=null!=g?g:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+a+"/revisions/"+urlParams.rev+"?supportsTeamDrives=true"},mxUtils.bind(this,function(b){b.title=b.originalFilename;b.headRevisionId=b.id;b.id=a;this.getXmlFile(b,c,d)}),d):this.loadDescriptor(a,mxUtils.bind(this,function(a){try{if(null!=this.user){var e=/\.png$/i.test(a.title);/\.v(dx|sdx?)$/i.test(a.title)||/\.gliffy$/i.test(a.title)||!this.ui.useCanvasForExport&&
e?this.ui.convertFile(a.downloadUrl+"&access_token="+this.token,a.title,a.mimeType,this.extension,c,d):b||g||a.mimeType==this.libraryMimeType||a.mimeType==this.xmlMimeType?this.getXmlFile(a,c,d,!0,g):this.getXmlFile(a,c,d)}else d({message:mxResources.get("loggedOut")})}catch(n){if(null!=d)d(n);else throw n;}}),d)};DriveClient.prototype.isGoogleRealtimeMimeType=function(a){return null!=a&&"application/vnd.jgraph.mxfile."==a.substring(0,30)};
-DriveClient.prototype.getXmlFile=function(a,c,d,b,g){try{var e=a.downloadUrl+"&access_token="+this.token;this.ui.loadUrl(e,mxUtils.bind(this,function(b){try{if(null==b)d({message:mxResources.get("invalidOrMissingFile")});else if(a.mimeType==this.libraryMimeType||g)a.mimeType!=this.libraryMimeType||g?c(new DriveLibrary(this.ui,b,a)):d({message:mxResources.get("notADiagramFile")});else{var k=!1;if(/\.png$/i.test(a.title)){var m=b.lastIndexOf(",");if(0<m){var t=this.ui.extractGraphModelFromPng(b.substring(m+
-1));if(null!=t&&0<t.length)b=t;else try{var t=b.substring(m+1),f=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(t):atob(t),l=this.ui.editor.extractGraphModel(mxUtils.parseXml(f).documentElement,!0);null==l||0<l.getElementsByTagName("parsererror").length?k=!0:b=f}catch(p){k=!0}}}else"data:image/png;base64,PG14ZmlsZS"==b.substring(0,32)&&(f=b.substring(22),b=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(b,
+DriveClient.prototype.getXmlFile=function(a,c,d,b,g){try{var e=a.downloadUrl+"&access_token="+this.token;this.ui.loadUrl(e,mxUtils.bind(this,function(b){try{if(null==b)d({message:mxResources.get("invalidOrMissingFile")});else if(a.mimeType==this.libraryMimeType||g)a.mimeType!=this.libraryMimeType||g?c(new DriveLibrary(this.ui,b,a)):d({message:mxResources.get("notADiagramFile")});else{var k=!1;if(/\.png$/i.test(a.title)){var m=b.lastIndexOf(",");if(0<m){var q=this.ui.extractGraphModelFromPng(b.substring(m+
+1));if(null!=q&&0<q.length)b=q;else try{var q=b.substring(m+1),f=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(q):atob(q),l=this.ui.editor.extractGraphModel(mxUtils.parseXml(f).documentElement,!0);null==l||0<l.getElementsByTagName("parsererror").length?k=!0:b=f}catch(p){k=!0}}}else"data:image/png;base64,PG14ZmlsZS"==b.substring(0,32)&&(f=b.substring(22),b=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(b,
e)?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,a.title+this.extension,!0)):null!=d&&d({message:mxResources.get("errorLoadingFile")}))}catch(u){if(null!=d)d(u);else throw u;}}),a.title):c(k?new LocalFile(this.ui,b,a.title,!0):new DriveFile(this.ui,b,a))}}catch(p){if(null!=d)d(p);else throw p;}}),d,null!=a.mimeType&&"image/"==a.mimeType.substring(0,6)&&"image/svg"!=
a.mimeType.substring(0,9)||/\.png$/i.test(a.title)||/\.jpe?g$/i.test(a.title))}catch(k){if(null!=d)d(k);else throw k;}};
DriveClient.prototype.saveFile=function(a,c,d,b,g,e,k,n){try{a.saveLevel=1;var m=mxUtils.bind(this,function(c){if(null!=b)b(c);else throw c;try{if(!a.isConflict(c)){var d="sl_"+a.saveLevel+"-error_"+(a.getErrorMessage(c)||"unknown");null!=c&&null!=c.error&&null!=c.error.code&&(d+="-code_"+c.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+a.getHash()+"-rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+
-(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),action:d,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}}catch(D){}}),t=mxUtils.bind(this,function(b){m(b);try{EditorUi.logError(b.message,null,null,b),EditorUi.sendReport("Critical error in DriveClient.saveFile "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+a.desc.id+"."+a.desc.headRevisionId+
-"\nUser="+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")+"\nSaveLevel="+a.saveLevel+"\nMessage="+b.message+"\n\nStack:\n"+b.stack)}catch(y){}});if(a.isEditable()&&null!=a.desc){var f=(new Date).getTime(),l=a.desc.etag,p=a.desc.modifiedDate,u=a.desc.headRevisionId,v=this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle());e=null!=e?e:!1;var q=mxUtils.bind(this,function(b,g,q){try{a.saveLevel=3;var x=null,z=!1,B={mimeType:a.desc.mimeType,title:a.getTitle()};
-this.isGoogleRealtimeMimeType(a.desc.mimeType)?(B.mimeType=this.xmlMimeType,x=a.desc,z=c=!0):"application/octet-stream"==B.mimeType&&(B.mimeType=this.xmlMimeType);a.constructor==DriveFile&&(null==n&&(n=[]),null==a.getChannelId()&&n.push({key:"channel",value:Editor.guid(32)}),null==a.getChannelKey()&&n.push({key:"key",value:Editor.guid(32)}),n.push({key:"secret",value:Editor.guid(32)}));q||(null!=b||e||(b=this.placeholderThumbnail,g=this.placeholderMimeType),null!=b&&null!=g&&(B.thumbnail={image:b,
-mimeType:g}));var C=a.getData(),A=mxUtils.bind(this,function(b){try{if(a.saveDelay=(new Date).getTime()-f,null==b)m({message:mxResources.get("errorSavingFile")+": Empty response"});else{var e=(new Date(b.modifiedDate)).getTime()-(new Date(p)).getTime();if(0>=e||l==b.etag||c&&u==b.headRevisionId){var g=[];0>=e&&g.push("invalid modified time");l==b.etag&&g.push("stale etag");c&&u==b.headRevisionId&&g.push("stale revision");var k=g.join(", ");m({message:mxResources.get("errorSavingFile")+": "+k},b);
-try{EditorUi.logError("Critical: Error saving to Google Drive "+a.desc.id,null,"from-"+u+"."+p+"-"+this.ui.hashValue(l)+"-to-"+b.headRevisionId+"."+b.modifiedDate+"-"+this.ui.hashValue(b.etag)+(0<k.length?"-errors-"+k:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync"))}catch(K){}}else if(a.saveLevel=null,d(b,C),null!=x){this.executeRequest({url:"/files/"+x.id+"/revisions/"+x.headRevisionId+"?supportsTeamDrives=true"},mxUtils.bind(this,mxUtils.bind(this,
-function(a){a.pinned=!0;this.executeRequest({url:"/files/"+x.id+"/revisions/"+x.headRevisionId,method:"PUT",params:a})})));try{EditorUi.logEvent({category:a.convertedFrom+"-CONVERT-FILE-"+a.getHash(),action:"from_"+x.id+"."+x.headRevisionId+"-to_"+a.desc.id+"."+a.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=a.sync?"-client_"+a.sync.clientId:"nosync")})}catch(K){}}}}catch(K){t(K)}}),y=mxUtils.bind(this,function(d,f){a.saveLevel=4;try{null!=n&&(B.properties=n);var e=
-k||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),g=0,l=mxUtils.bind(this,function(b){a.saveLevel=5;try{var k=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;m({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),3*this.ui.timeout);this.executeRequest(this.createUploadRequest(a.getId(),B,d,c||b||k,f,b?null:e,z),mxUtils.bind(this,
-function(a){window.clearTimeout(n);l&&A(a)}),mxUtils.bind(this,function(b){window.clearTimeout(n);if(l){a.saveLevel=6;try{a.isConflict(b)?this.executeRequest({url:"/files/"+a.getId()+"?supportsTeamDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(c){a.saveLevel=7;try{if(null!=c&&c.etag==e)if(g<this.maxRetries)g++,window.setTimeout(p,2*g*this.coolOff*(1+.1*(Math.random()-.5)));else{p(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+a.getHash(),action:"rev_"+a.desc.headRevisionId+
-"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}catch(ca){}}else"1"==urlParams.test&&c.headRevisionId==u&&EditorUi.debug("DriveClient: Remote Etag Changed","local",e,"remote",c.etag,"rev",
-a.desc.headRevisionId,"response",[c],"file",[a]),m(b,c)}catch(ca){t(ca)}}),mxUtils.bind(this,function(){m(b)})):m(b)}catch(ga){t(ga)}}}))}catch(X){t(X)}}),p=mxUtils.bind(this,function(b){a.saveLevel=9;if(b)l(b);else{var c=!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;m({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),3*this.ui.timeout);this.executeRequest({url:"/files/"+a.getId()+"?supportsTeamDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(f){window.clearTimeout(d);
-if(c){a.saveLevel=13;try{null!=f&&f.headRevisionId==u?("1"==urlParams.test&&e!=f.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",e,"to",f.etag,"rev",a.desc.headRevisionId,"response",[f],"file",[a]),e=f.etag,l(b)):m({error:{code:412}},f)}catch(X){t(X)}}}),mxUtils.bind(this,function(a){window.clearTimeout(d);c&&m(a)}))}});if(v&&null==b){a.saveLevel=8;var q=new Image;q.onload=mxUtils.bind(this,function(){try{var a=this.thumbnailWidth/q.width,b=document.createElement("canvas");b.width=
-this.thumbnailWidth;b.height=Math.floor(q.height*a);b.getContext("2d").drawImage(q,0,0,b.width,b.height);var c=b.toDataURL(),c=c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");B.thumbnail={image:c,mimeType:"image/png"};p(!1)}catch(V){p(!1)}});q.src="data:image/png;base64,"+d}else p(!1)}catch(Y){t(Y)}});v?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){y(a,!0)}),m,this.ui.getCurrentFile()!=a?C:null):y(C,!1)}catch(F){t(F)}});try{if(a.saveLevel=2,e||v||a.constructor==DriveLibrary||
-!this.enableThumbnails||"0"==urlParams.thumb||null!=a.desc.mimeType&&"application/vnd.jgraph.mxfile"!=a.desc.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(b){try{var c=a.thumbTime=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(D){c=null}q(c,"image/png")}catch(D){t(D)}})))a.thumbTime=null,q(null,null,a.constructor!=DriveLibrary)}catch(x){t(x)}}else this.ui.editor.graph.reset(),
-m({message:mxResources.get("readOnly")})}catch(x){t(x)}};DriveClient.prototype.insertFile=function(a,c,d,b,g,e,k){e=null!=e?e:this.xmlMimeType;a={mimeType:e,title:a};null!=d&&(a.parents=[{kind:"drive#fileLink",id:d}]);this.executeRequest(this.createUploadRequest(null,a,c,!1,k),mxUtils.bind(this,function(a){e==this.libraryMimeType?b(new DriveLibrary(this.ui,c,a)):0==a?null!=g&&g({message:mxResources.get("errorSavingFile")}):b(new DriveFile(this.ui,c,a))}),g)};
+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),action:d,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}}catch(D){}}),q=mxUtils.bind(this,function(b){m(b);try{EditorUi.logError(b.message,null,null,b),EditorUi.sendReport("Critical error in DriveClient.saveFile "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+a.desc.id+"."+a.desc.headRevisionId+
+"\nUser="+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")+"\nSaveLevel="+a.saveLevel+"\nMessage="+b.message+"\n\nStack:\n"+b.stack)}catch(y){}});if(a.isEditable()&&null!=a.desc){var f=(new Date).getTime(),l=a.desc.etag,p=a.desc.modifiedDate,u=a.desc.headRevisionId,v=this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle());e=null!=e?e:!1;var t=mxUtils.bind(this,function(b,g,t){try{a.saveLevel=3;var x=null,z=!1,B={mimeType:a.desc.mimeType,title:a.getTitle()};
+this.isGoogleRealtimeMimeType(a.desc.mimeType)?(B.mimeType=this.xmlMimeType,x=a.desc,z=c=!0):"application/octet-stream"==B.mimeType&&(B.mimeType=this.xmlMimeType);a.constructor==DriveFile&&(null==n&&(n=[]),null==a.getChannelId()&&n.push({key:"channel",value:Editor.guid(32)}),null==a.getChannelKey()&&n.push({key:"key",value:Editor.guid(32)}),n.push({key:"secret",value:Editor.guid(32)}));t||(null!=b||e||(b=this.placeholderThumbnail,g=this.placeholderMimeType),null!=b&&null!=g&&(B.thumbnail={image:b,
+mimeType:g}));var C=a.getData(),A=mxUtils.bind(this,function(b){try{if(a.saveDelay=(new Date).getTime()-f,null==b)m({message:mxResources.get("errorSavingFile")+": Empty response"});else{var e=(new Date(b.modifiedDate)).getTime()-(new Date(p)).getTime();if(0>=e||l==b.etag||c&&u==b.headRevisionId){var k=[];0>=e&&k.push("invalid modified time");l==b.etag&&k.push("stale etag");c&&u==b.headRevisionId&&k.push("stale revision");var g=k.join(", ");m({message:mxResources.get("errorSavingFile")+": "+g},b);
+try{EditorUi.logError("Critical: Error saving to Google Drive "+a.desc.id,null,"from-"+u+"."+p+"-"+this.ui.hashValue(l)+"-to-"+b.headRevisionId+"."+b.modifiedDate+"-"+this.ui.hashValue(b.etag)+(0<g.length?"-errors-"+g:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync"))}catch(K){}}else if(a.saveLevel=null,d(b,C),null!=x){this.executeRequest({url:"/files/"+x.id+"/revisions/"+x.headRevisionId+"?supportsTeamDrives=true"},mxUtils.bind(this,mxUtils.bind(this,
+function(a){a.pinned=!0;this.executeRequest({url:"/files/"+x.id+"/revisions/"+x.headRevisionId,method:"PUT",params:a})})));try{EditorUi.logEvent({category:a.convertedFrom+"-CONVERT-FILE-"+a.getHash(),action:"from_"+x.id+"."+x.headRevisionId+"-to_"+a.desc.id+"."+a.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=a.sync?"-client_"+a.sync.clientId:"nosync")})}catch(K){}}}}catch(K){q(K)}}),y=mxUtils.bind(this,function(d,e){a.saveLevel=4;try{null!=n&&(B.properties=n);var f=
+k||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),g=0,l=mxUtils.bind(this,function(b){a.saveLevel=5;try{var k=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;m({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),3*this.ui.timeout);this.executeRequest(this.createUploadRequest(a.getId(),B,d,c||b||k,e,b?null:f,z),mxUtils.bind(this,
+function(a){window.clearTimeout(n);l&&A(a)}),mxUtils.bind(this,function(b){window.clearTimeout(n);if(l){a.saveLevel=6;try{a.isConflict(b)?this.executeRequest({url:"/files/"+a.getId()+"?supportsTeamDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(c){a.saveLevel=7;try{if(null!=c&&c.etag==f)if(g<this.maxRetries)g++,window.setTimeout(p,2*g*this.coolOff*(1+.1*(Math.random()-.5)));else{p(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+a.getHash(),action:"rev_"+a.desc.headRevisionId+
+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}catch(ca){}}else"1"==urlParams.test&&c.headRevisionId==u&&EditorUi.debug("DriveClient: Remote Etag Changed","local",f,"remote",c.etag,"rev",
+a.desc.headRevisionId,"response",[c],"file",[a]),m(b,c)}catch(ca){q(ca)}}),mxUtils.bind(this,function(){m(b)})):m(b)}catch(ga){q(ga)}}}))}catch(X){q(X)}}),p=mxUtils.bind(this,function(b){a.saveLevel=9;if(b)l(b);else{var c=!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;m({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),3*this.ui.timeout);this.executeRequest({url:"/files/"+a.getId()+"?supportsTeamDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(e){window.clearTimeout(d);
+if(c){a.saveLevel=13;try{null!=e&&e.headRevisionId==u?("1"==urlParams.test&&f!=e.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",f,"to",e.etag,"rev",a.desc.headRevisionId,"response",[e],"file",[a]),f=e.etag,l(b)):m({error:{code:412}},e)}catch(X){q(X)}}}),mxUtils.bind(this,function(a){window.clearTimeout(d);c&&m(a)}))}});if(v&&null==b){a.saveLevel=8;var t=new Image;t.onload=mxUtils.bind(this,function(){try{var a=this.thumbnailWidth/t.width,b=document.createElement("canvas");b.width=
+this.thumbnailWidth;b.height=Math.floor(t.height*a);b.getContext("2d").drawImage(t,0,0,b.width,b.height);var c=b.toDataURL(),c=c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");B.thumbnail={image:c,mimeType:"image/png"};p(!1)}catch(V){p(!1)}});t.src="data:image/png;base64,"+d}else p(!1)}catch(Y){q(Y)}});v?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){y(a,!0)}),m,this.ui.getCurrentFile()!=a?C:null):y(C,!1)}catch(F){q(F)}});try{if(a.saveLevel=2,e||v||a.constructor==DriveLibrary||
+!this.enableThumbnails||"0"==urlParams.thumb||null!=a.desc.mimeType&&"application/vnd.jgraph.mxfile"!=a.desc.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(b){try{var c=a.thumbTime=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(D){c=null}t(c,"image/png")}catch(D){q(D)}})))a.thumbTime=null,t(null,null,a.constructor!=DriveLibrary)}catch(x){q(x)}}else this.ui.editor.graph.reset(),
+m({message:mxResources.get("readOnly")})}catch(x){q(x)}};DriveClient.prototype.insertFile=function(a,c,d,b,g,e,k){e=null!=e?e:this.xmlMimeType;a={mimeType:e,title:a};null!=d&&(a.parents=[{kind:"drive#fileLink",id:d}]);this.executeRequest(this.createUploadRequest(null,a,c,!1,k),mxUtils.bind(this,function(a){e==this.libraryMimeType?b(new DriveLibrary(this.ui,c,a)):0==a?null!=g&&g({message:mxResources.get("errorSavingFile")}):b(new DriveFile(this.ui,c,a))}),g)};
DriveClient.prototype.createUploadRequest=function(a,c,d,b,g,e,k){g=null!=g?g:!1;var n={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=e&&(n["If-Match"]=e);a={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=a?"/"+a:"")+"?uploadType=multipart&supportsTeamDrives=true&fields="+this.allFields,method:null!=a?"PUT":"POST",headers:n,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!=d?g?d:Base64.encode(d):"")+"\r\n---------314159265358979323846--"};b||(a.url+="&newRevision=false");k&&(a.url+="&pinned=true");return a};
DriveClient.prototype.pickFile=function(a,c){this.filePickerCallback=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("G"+a)});this.filePicked=mxUtils.bind(this,function(a){a.action==google.picker.Action.PICKED&&this.filePickerCallback(a.docs[0].id)});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var a=c?"genericPicker":"filePicker",b=mxUtils.bind(this,function(c){"picker modal-dialog-bg picker-dialog-bg"==
@@ -8915,9 +8924,9 @@ DropboxFile.prototype.isRenamable=function(){return!0};DropboxFile.prototype.get
DropboxFile.prototype.getRevisions=function(a,c){var d=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});d.then(mxUtils.bind(this,function(b){try{for(var d=[],e=b.entries.length-1;0<=e;e--)mxUtils.bind(this,function(a){d.push({modifiedDate:a.client_modified,fileSize:a.size,getXml:mxUtils.bind(this,function(b,c){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:a.rev},b,c)}),getUrl:mxUtils.bind(this,function(b){return this.ui.getUrl(window.location.pathname+"?rev="+
a.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=b?"&page="+b:""))+window.location.hash})})})(b.entries[e]);a(d)}catch(k){c(k)}}));d["catch"](function(a){c(a)})};DropboxFile.prototype.getLatestVersion=function(a,c){this.ui.dropbox.getFile(this.getId(),a,c)};DropboxFile.prototype.updateDescriptor=function(a){this.stat=a.stat};DropboxFile.prototype.save=function(a,c,d,b,g){this.doSave(this.getTitle(),a,c,d,b,g)};DropboxFile.prototype.saveAs=function(a,c,d){this.doSave(a,!1,c,d)};
DropboxFile.prototype.doSave=function(a,c,d,b,g,e){var k=this.stat.name;this.stat.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.stat.name=k;this.saveFile(a,c,d,b,g,e)}),b,g,e])};
-DropboxFile.prototype.saveFile=function(a,c,d,b){this.isEditable()?this.savingFile?null!=b&&b({code:App.ERROR_BUSY}):(c=mxUtils.bind(this,function(c){if(c){var e=null,g=null;try{e=this.isModified;g=this.isModified();this.savingFile=!0;this.savingFileTime=new Date;var n=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return g}});n();var m=mxUtils.bind(this,function(c){var f=this.stat.path_display.lastIndexOf("/"),f=1<f?this.stat.path_display.substring(1,f+1):null;this.ui.dropbox.saveFile(a,
-c,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.stat=a;this.contentChanged();null!=d&&d()}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(g||this.isModified());if(null!=b){if(null!=a&&null!=a.retry){var c=a.retry;a.retry=function(){n();c()}}b(a)}}),f)});this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){m(this.ui.base64ToBlob(a,"image/png"))}),b,this.ui.getCurrentFile()!=
-this?this.getData():null):m(this.getData())}catch(t){if(this.savingFile=!1,null!=e&&(this.isModified=e),null!=g&&this.setModified(g||this.isModified()),null!=b)b(t);else throw t;}}else null!=b&&b()}),this.getTitle()==a?c(!0):this.ui.dropbox.checkExists(a,c)):null!=d&&d()};
+DropboxFile.prototype.saveFile=function(a,c,d,b){this.isEditable()?this.savingFile?null!=b&&b({code:App.ERROR_BUSY}):(c=mxUtils.bind(this,function(c){if(c){var e=null,k=null;try{e=this.isModified;k=this.isModified();this.savingFile=!0;this.savingFileTime=new Date;var g=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return k}});g();var m=mxUtils.bind(this,function(c){var f=this.stat.path_display.lastIndexOf("/"),f=1<f?this.stat.path_display.substring(1,f+1):null;this.ui.dropbox.saveFile(a,
+c,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.stat=a;this.contentChanged();null!=d&&d()}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(k||this.isModified());if(null!=b){if(null!=a&&null!=a.retry){var c=a.retry;a.retry=function(){g();c()}}b(a)}}),f)});this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){m(this.ui.base64ToBlob(a,"image/png"))}),b,this.ui.getCurrentFile()!=
+this?this.getData():null):m(this.getData())}catch(q){if(this.savingFile=!1,null!=e&&(this.isModified=e),null!=k&&this.setModified(k||this.isModified()),null!=b)b(q);else throw q;}}else null!=b&&b()}),this.getTitle()==a?c(!0):this.ui.dropbox.checkExists(a,c)):null!=d&&d()};
DropboxFile.prototype.rename=function(a,c,d){this.ui.dropbox.renameFile(this,a,mxUtils.bind(this,function(b){this.hasSameExtension(a,this.getTitle())?(this.stat=b,this.descriptorChanged(),null!=c&&c()):(this.stat=b,this.descriptorChanged(),this.save(!0,c,d))}),d)};DropboxLibrary=function(a,c,d){DropboxFile.call(this,a,c,d)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(a,c,d){this.saveFile(a,!1,c,d)};DropboxLibrary.prototype.open=function(){};DropboxClient=function(a){DrawioClient.call(this,a,"dbauth");this.client=new Dropbox({clientId:App.DROPBOX_APPKEY});this.client.setAccessToken(this.token)};mxUtils.extend(DropboxClient,DrawioClient);DropboxClient.prototype.appPath="/drawio/";DropboxClient.prototype.extension=".drawio";DropboxClient.prototype.writingFile=!1;DropboxClient.prototype.maxRetries=4;
DropboxClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))};
DropboxClient.prototype.updateUser=function(a,c,d){var b=!0,g=window.setTimeout(mxUtils.bind(this,function(){b=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),e=this.client.usersGetCurrentAccount();e.then(mxUtils.bind(this,function(c){window.clearTimeout(g);b&&(this.setUser(new DrawioUser(c.account_id,c.email,c.name.display_name)),a())}));e["catch"](mxUtils.bind(this,function(e){window.clearTimeout(g);b&&(null==e||401!==e.status||d?c({message:mxResources.get("accessDenied")}):(this.setUser(null),
@@ -8928,8 +8937,8 @@ DropboxClient.prototype.executePromise=function(a,c,d){var b=mxUtils.bind(this,f
e?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){g(!0)},d)})}):this.authenticate(function(){b(!0)},d)))}))}),g=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){g(!0)},d,a):b(a)});null===this.client.getAccessToken()?this.authenticate(function(){g(!0)},d):g(!1)};DropboxClient.prototype.getLibrary=function(a,c,d){this.getFile(a,c,d,!0)};
DropboxClient.prototype.getFile=function(a,c,d,b){b=null!=b?b:!1;var g=/\.png$/i.test(a);if(/^https:\/\//i.test(a)||/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&g){var e=mxUtils.bind(this,function(){var b=a.split("/");this.ui.convertFile(a,0<b.length?b[b.length-1]:a,null,this.extension,c,d)});null!=this.token?e():this.authenticate(e,d)}else e={path:"/"+a},null!=urlParams.rev&&(e.rev=urlParams.rev),this.readFile(e,mxUtils.bind(this,function(d,e){var k=g?d.lastIndexOf(","):
-1,n=null;0<k&&(k=this.ui.extractGraphModelFromPng(d.substring(k+1)),null!=k&&0<k.length?d=k:n=new LocalFile(this,d,a,!0));c(null!=n?n:b?new DropboxLibrary(this.ui,d,e):new DropboxFile(this.ui,d,e))}),d,g)};
-DropboxClient.prototype.readFile=function(a,c,d,b){var g=mxUtils.bind(this,function(k){var n=!0,m=window.setTimeout(mxUtils.bind(this,function(){n=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),t=this.client.filesGetMetadata({path:"/"+a.path.substring(1),include_deleted:!1});t.then(mxUtils.bind(this,function(a){}));t["catch"](function(a){window.clearTimeout(m);n&&null!=a&&409==a.status&&(n=!1,d({message:mxResources.get("fileNotFound")}))});t=this.client.filesDownload(a);t.then(mxUtils.bind(this,
-function(a){window.clearTimeout(m);if(n){n=!1;try{var f=new FileReader;f.onload=mxUtils.bind(this,function(b){c(f.result,a)});b?f.readAsDataURL(a.fileBlob):f.readAsText(a.fileBlob)}catch(p){d(p)}}}));t["catch"](mxUtils.bind(this,function(a){window.clearTimeout(m);n&&(n=!1,null==a||500!=a.status&&400!=a.status&&401!=a.status?d({message:mxResources.get("error")+" "+a.status}):(this.client.setAccessToken(null),this.setUser(null),k?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){e(!0)},
+DropboxClient.prototype.readFile=function(a,c,d,b){var g=mxUtils.bind(this,function(k){var n=!0,m=window.setTimeout(mxUtils.bind(this,function(){n=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),q=this.client.filesGetMetadata({path:"/"+a.path.substring(1),include_deleted:!1});q.then(mxUtils.bind(this,function(a){}));q["catch"](function(a){window.clearTimeout(m);n&&null!=a&&409==a.status&&(n=!1,d({message:mxResources.get("fileNotFound")}))});q=this.client.filesDownload(a);q.then(mxUtils.bind(this,
+function(a){window.clearTimeout(m);if(n){n=!1;try{var e=new FileReader;e.onload=mxUtils.bind(this,function(b){c(e.result,a)});b?e.readAsDataURL(a.fileBlob):e.readAsText(a.fileBlob)}catch(p){d(p)}}}));q["catch"](mxUtils.bind(this,function(a){window.clearTimeout(m);n&&(n=!1,null==a||500!=a.status&&400!=a.status&&401!=a.status?d({message:mxResources.get("error")+" "+a.status}):(this.client.setAccessToken(null),this.setUser(null),k?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){e(!0)},
d)})}):this.authenticate(function(){g(!0)},d)))}))}),e=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){e(!0)},d,a):g(a)});null===this.client.getAccessToken()?this.authenticate(function(){e(!0)},d):e(!1)};
DropboxClient.prototype.checkExists=function(a,c,d){var b=this.client.filesGetMetadata({path:"/"+a.toLowerCase(),include_deleted:!1});this.executePromise(b,mxUtils.bind(this,function(b){d?c(!1,!0,b):this.ui.confirm(mxResources.get("replaceIt",[a]),function(){c(!0,!0,b)},function(){c(!1,!0,b)})}),function(a){c(!0,!1)})};
DropboxClient.prototype.renameFile=function(a,c,d,b){if(/[\\\/:\?\*"\|]/.test(c))b({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=a&&null!=c){var g=a.stat.path_display.substring(1),e=g.lastIndexOf("/");0<e&&(c=g.substring(0,e+1)+c)}null!=a&&null!=c&&a.stat.path_lower.substring(1)!==c.toLowerCase()?this.checkExists(c,mxUtils.bind(this,function(e,g,m){e?(e=mxUtils.bind(this,function(e){e=this.client.filesMove({from_path:a.stat.path_display,to_path:"/"+c,autorename:!1});this.executePromise(e,
@@ -8970,18 +8979,18 @@ OneDriveClient.prototype.getAccountTypeAndEndpoint=function(a,c){this.get(this.b
OneDriveClient.prototype.executeRequest=function(a,c,d){var b=mxUtils.bind(this,function(g){var e=!0,k=window.setTimeout(mxUtils.bind(this,function(){e=!1;d({code:App.ERROR_TIMEOUT,retry:b})}),this.ui.timeout);this.get(a,mxUtils.bind(this,function(a){window.clearTimeout(k);e&&(200<=a.getStatus()&&299>=a.getStatus()||404==a.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),c(a)):g||401!==a.getStatus()&&400!==a.getStatus()?d(this.parseRequestText(a)):this.authenticate(function(){b(!0)},
d,g))}),d)});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){b(!0)},d):b(!1)};OneDriveClient.prototype.checkToken=function(a){null==this.token||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(a,this.emptyFn):a()};OneDriveClient.prototype.getItemRef=function(a){var c=a.split("/");return 1<c.length?{driveId:c[0],id:c[1]}:{id:a}};
OneDriveClient.prototype.getItemURL=function(a,c){var d=a.split("/");return 1<d.length?(c?"":this.baseUrl)+"/drives/"+d[0]+"/items/"+d[1]:(c?"":this.baseUrl)+"/me/drive/items/"+a};OneDriveClient.prototype.getLibrary=function(a,c,d){this.getFile(a,c,d,!1,!0)};
-OneDriveClient.prototype.getFile=function(a,c,d,b,g){g=null!=g?g:!1;this.executeRequest(this.getItemURL(a),mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){var b=JSON.parse(a.getText()),e=/\.png$/i.test(b.name);if(/\.v(dx|sdx?)$/i.test(b.name)||/\.gliffy$/i.test(b.name)||!this.ui.useCanvasForExport&&e)this.ui.convertFile(b["@microsoft.graph.downloadUrl"],b.name,null!=b.file?b.file.mimeType:null,this.extension,c,d);else{var m=!0,t=window.setTimeout(mxUtils.bind(this,function(){m=
-!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.loadUrl(b["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){try{if(window.clearTimeout(t),m){var f=e?a.lastIndexOf(","):-1,k=null;if(0<f){var n=this.ui.extractGraphModelFromPng(a.substring(f+1));null!=n&&0<n.length?a=n:k=new LocalFile(this.ui,a,b.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==a.substring(0,32)){var v=a.substring(22);a=window.atob&&!mxClient.IS_SF?atob(v):Base64.decode(v)}Graph.fileSupport&&(new XMLHttpRequest).upload&&
-this.ui.isRemoteFileFormat(a,b["@microsoft.graph.downloadUrl"])?this.ui.parseFile(new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){try{4==a.readyState&&(200<=a.status&&299>=a.status?c(new LocalFile(this.ui,a.responseText,b.name+this.extension,!0)):null!=d&&d({message:mxResources.get("errorLoadingFile")}))}catch(x){if(null!=d)d(x);else throw x;}}),b.name):null!=k?c(k):g?c(new OneDriveLibrary(this.ui,a,b)):c(new OneDriveFile(this.ui,a,b))}}catch(q){if(null!=d)d(q);else throw q;
-}}),mxUtils.bind(this,function(a){window.clearTimeout(t);m&&d(this.parseRequestText(a))}),e||null!=b.file&&null!=b.file.mimeType&&"image/"==b.file.mimeType.substring(0,6))}}else d(this.parseRequestText(a))}),d)};
+OneDriveClient.prototype.getFile=function(a,c,d,b,g){g=null!=g?g:!1;this.executeRequest(this.getItemURL(a),mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){var b=JSON.parse(a.getText()),e=/\.png$/i.test(b.name);if(/\.v(dx|sdx?)$/i.test(b.name)||/\.gliffy$/i.test(b.name)||!this.ui.useCanvasForExport&&e)this.ui.convertFile(b["@microsoft.graph.downloadUrl"],b.name,null!=b.file?b.file.mimeType:null,this.extension,c,d);else{var m=!0,q=window.setTimeout(mxUtils.bind(this,function(){m=
+!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.loadUrl(b["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){try{if(window.clearTimeout(q),m){var f=e?a.lastIndexOf(","):-1,k=null;if(0<f){var n=this.ui.extractGraphModelFromPng(a.substring(f+1));null!=n&&0<n.length?a=n:k=new LocalFile(this.ui,a,b.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==a.substring(0,32)){var v=a.substring(22);a=window.atob&&!mxClient.IS_SF?atob(v):Base64.decode(v)}Graph.fileSupport&&(new XMLHttpRequest).upload&&
+this.ui.isRemoteFileFormat(a,b["@microsoft.graph.downloadUrl"])?this.ui.parseFile(new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){try{4==a.readyState&&(200<=a.status&&299>=a.status?c(new LocalFile(this.ui,a.responseText,b.name+this.extension,!0)):null!=d&&d({message:mxResources.get("errorLoadingFile")}))}catch(x){if(null!=d)d(x);else throw x;}}),b.name):null!=k?c(k):g?c(new OneDriveLibrary(this.ui,a,b)):c(new OneDriveFile(this.ui,a,b))}}catch(t){if(null!=d)d(t);else throw t;
+}}),mxUtils.bind(this,function(a){window.clearTimeout(q);m&&d(this.parseRequestText(a))}),e||null!=b.file&&null!=b.file.mimeType&&"image/"==b.file.mimeType.substring(0,6))}}else d(this.parseRequestText(a))}),d)};
OneDriveClient.prototype.renameFile=function(a,c,d,b){null!=a&&null!=c&&(this.isValidFilename(c)?this.checkExists(a.getParentId(),c,!1,mxUtils.bind(this,function(g){g?this.writeFile(this.getItemURL(a.getId()),JSON.stringify({name:c}),"PATCH","application/json",d,b):b()})):b({message:this.invalidFilenameRegExs[0].test(c)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};
OneDriveClient.prototype.moveFile=function(a,c,d,b){c=this.getItemRef(c);var g=this.getItemRef(a);c.driveId!=g.driveId?b({message:mxResources.get("cannotMoveOneDrive",null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(a),JSON.stringify({parentReference:c}),"PATCH","application/json",d,b)};OneDriveClient.prototype.insertLibrary=function(a,c,d,b,g){this.insertFile(a,c,d,b,!0,g)};
OneDriveClient.prototype.insertFile=function(a,c,d,b,g,e){this.isValidFilename(a)?(g=null!=g?g:!1,this.checkExists(e,a,!0,mxUtils.bind(this,function(k){k?(k="/me/drive/root",null!=e&&(k=this.getItemURL(e,!0)),k=this.baseUrl+k+"/children/"+encodeURIComponent(a)+"/content",this.writeFile(k,c,"PUT",null,mxUtils.bind(this,function(a){g?d(new OneDriveLibrary(this.ui,c,a)):d(new OneDriveFile(this.ui,c,a))}),b)):b()}))):b({message:this.invalidFilenameRegExs[0].test(a)?mxResources.get("oneDriveCharsNotAllowed"):
mxResources.get("oneDriveInvalidDeviceName")})};
OneDriveClient.prototype.checkExists=function(a,c,d,b){var g="/me/drive/root";null!=a&&(g=this.getItemURL(a,!0));this.executeRequest(this.baseUrl+g+"/children/"+encodeURIComponent(c),mxUtils.bind(this,function(a){404==a.getStatus()?b(!0):d?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[c]),function(){b(!0)},function(){b(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){b(!1)}))}),function(a){b(!1)},
!0)};OneDriveClient.prototype.saveFile=function(a,c,d,b){try{var g=a.getData(),e=mxUtils.bind(this,function(e){var k=this.getItemURL(a.getId());this.writeFile(k+"/content/",e,"PUT",null,mxUtils.bind(this,function(a){c(a,g)}),d,b)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){e(this.ui.base64ToBlob(a,"image/png"))}),d,this.ui.getCurrentFile()!=a?g:null):e(g)}catch(k){d(k)}};
-OneDriveClient.prototype.writeFile=function(a,c,d,b,g,e,k){try{if(null!=a&&null!=c)if(4E6<=c.length)e({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(c.length)+" / 4 MB)"});else{var n=mxUtils.bind(this,function(m){try{var t=!0,f=window.setTimeout(mxUtils.bind(this,function(){t=!1;e({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout),l=new mxXmlRequest(a,c,d);l.setRequestHeaders=mxUtils.bind(this,function(a,c){a.setRequestHeader("Content-Type",b||" ");a.setRequestHeader("Authorization",
-"Bearer "+this.token);null!=k&&a.setRequestHeader("If-Match",k)});l.send(mxUtils.bind(this,function(a){window.clearTimeout(f);t&&(200<=a.getStatus()&&299>=a.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),g(JSON.parse(a.getText()))):m||401!==a.getStatus()?e(this.parseRequestText(a),a):this.authenticate(function(){n(!0)},e,m))}),mxUtils.bind(this,function(a){window.clearTimeout(f);t&&e(this.parseRequestText(a))}))}catch(p){e(p)}});null==this.token||6E4>this.tokenExpiresOn-
+OneDriveClient.prototype.writeFile=function(a,c,d,b,g,e,k){try{if(null!=a&&null!=c)if(4E6<=c.length)e({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(c.length)+" / 4 MB)"});else{var n=mxUtils.bind(this,function(m){try{var q=!0,f=window.setTimeout(mxUtils.bind(this,function(){q=!1;e({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout),l=new mxXmlRequest(a,c,d);l.setRequestHeaders=mxUtils.bind(this,function(a,c){a.setRequestHeader("Content-Type",b||" ");a.setRequestHeader("Authorization",
+"Bearer "+this.token);null!=k&&a.setRequestHeader("If-Match",k)});l.send(mxUtils.bind(this,function(a){window.clearTimeout(f);q&&(200<=a.getStatus()&&299>=a.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),g(JSON.parse(a.getText()))):m||401!==a.getStatus()?e(this.parseRequestText(a),a):this.authenticate(function(){n(!0)},e,m))}),mxUtils.bind(this,function(a){window.clearTimeout(f);q&&e(this.parseRequestText(a))}))}catch(p){e(p)}});null==this.token||6E4>this.tokenExpiresOn-
Date.now()?this.authenticate(function(){n(!0)},e):n(!1)}else e({message:mxResources.get("unknownError")})}catch(m){e(m)}};OneDriveClient.prototype.parseRequestText=function(a){var c={message:mxResources.get("unknownError")};try{c=JSON.parse(a.getText())}catch(d){}return c};OneDriveClient.prototype.pickLibrary=function(a){this.pickFile(function(c){a(c)})};
OneDriveClient.prototype.pickFolder=function(a,c){var d=mxUtils.bind(this,function(b){var c=mxUtils.bind(this,function(){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:this.token,isConsumerAccount:!1},success:mxUtils.bind(this,function(b){a(b);mxClient.IS_IE11&&(this.token=b.accessToken)}),cancel:mxUtils.bind(this,function(){}),
error:mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)})})});b?c():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){a({value:[{id:"root",name:"root",parentReference:{driveId:"me"}}]})}),c,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){d(!1)}),this.emptyFn):d(c)};
@@ -9000,7 +9009,7 @@ c({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.
GitHubClient.prototype.authenticate=function(a,c){if(null==window.onGitHubCallback){var d=mxUtils.bind(this,function(){var b=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(g,e){null!=window.open("https://github.com/login/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope,"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(k,n){if(b)if(window.onGitHubCallback=null,b=!1,null==k)c({message:mxResources.get("accessDenied"),retry:d});else{var m=mxUtils.bind(this,function(){var b=
!0,d=window.setTimeout(mxUtils.bind(this,function(){b=!1;c({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+k,mxUtils.bind(this,function(f){window.clearTimeout(d);if(b)try{if(200>f.getStatus()||300<=f.getStatus())c({message:mxResources.get("cannotLogin")});else{null!=e&&e();var k=f.getText();this.token=k.substring(k.indexOf("=")+1,k.indexOf("&"));this.setUser(null);g&&this.setPersistentToken(this.token);a()}}catch(u){c(u)}finally{null!=n&&
n.close()}}))});m()}else null!=n&&n.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:d})}),mxUtils.bind(this,function(){b&&(window.onGitHubCallback=null,b=!1,c({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=function(a,c){try{var d=JSON.parse(a.getText());null!=d&&null!=d.message&&(c=d.message)}catch(b){}return c};
-GitHubClient.prototype.executeRequest=function(a,c,d,b){var g=mxUtils.bind(this,function(k){var n=!0,m=window.setTimeout(mxUtils.bind(this,function(){n=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout),t=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","token "+t)};a.send(mxUtils.bind(this,function(){window.clearTimeout(m);if(n)if(200<=a.getStatus()&&299>=a.getStatus()||b&&404==a.getStatus())c(a);else if(401===a.getStatus())k?d({code:a.getStatus(),message:mxResources.get("accessDenied"),
+GitHubClient.prototype.executeRequest=function(a,c,d,b){var g=mxUtils.bind(this,function(k){var n=!0,m=window.setTimeout(mxUtils.bind(this,function(){n=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout),q=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","token "+q)};a.send(mxUtils.bind(this,function(){window.clearTimeout(m);if(n)if(200<=a.getStatus()&&299>=a.getStatus()||b&&404==a.getStatus())c(a);else if(401===a.getStatus())k?d({code:a.getStatus(),message:mxResources.get("accessDenied"),
retry:mxUtils.bind(this,function(){this.authenticate(function(){e(!0)},d)})}):this.authenticate(function(){g(!0)},d);else if(403===a.getStatus()){var f=!1;try{var l=JSON.parse(a.getText());null!=l&&null!=l.errors&&0<l.errors.length&&(f="too_large"==l.errors[0].code)}catch(p){}d({message:mxResources.get(f?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?d({code:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("fileNotFound"))}):409===a.getStatus()?d({code:a.getStatus(),status:409}):
d({code:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("error")+" "+a.getStatus())})}),d)}),e=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){e(!0)},d,a):g(a)});null==this.token?this.authenticate(function(){e(!0)},d):e(!1)};GitHubClient.prototype.getLibrary=function(a,c,d){this.getFile(a,c,d,!0)};
GitHubClient.prototype.getSha=function(a,c,d,b,g,e){var k="&t="+(new Date).getTime();a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+c+"/contents/"+d+"?ref="+b+k,null,"HEAD");this.executeRequest(a,mxUtils.bind(this,function(a){try{g(a.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(m){e(m)}}),e)};
@@ -9008,27 +9017,27 @@ GitHubClient.prototype.getFile=function(a,c,d,b,g){b=null!=b?b:!1;var e=a.split(
a=new mxXmlRequest(this.baseUrl+"/repos/"+k+"/"+n+"/contents/"+a+"?ref="+m+g,null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{c(this.createGitHubFile(k,n,m,JSON.parse(a.getText()),b))}catch(f){d(f)}}),d))};
GitHubClient.prototype.createGitHubFile=function(a,c,d,b,g){a={org:a,repo:c,ref:d,name:b.name,path:b.path,sha:b.sha,html_url:b.html_url,download_url:b.download_url};c=b.content;"base64"===b.encoding&&(/\.jpe?g$/i.test(b.name)?c="data:image/jpeg;base64,"+c:/\.gif$/i.test(b.name)?c="data:image/gif;base64,"+c:/\.png$/i.test(b.name)?(b=this.ui.extractGraphModelFromPng(c),c=null!=b&&0<b.length?b:"data:image/png;base64,"+c):c=Base64.decode(c));return g?new GitHubLibrary(this.ui,c,a):new GitHubFile(this.ui,
c,a)};GitHubClient.prototype.insertLibrary=function(a,c,d,b,g){this.insertFile(a,c,d,b,!0,g,!1)};
-GitHubClient.prototype.insertFile=function(a,c,d,b,g,e,k){g=null!=g?g:!1;e=e.split("/");var n=e[0],m=e[1],t=e[2],f=e.slice(3,e.length).join("/");0<f.length&&(f+="/");f+=a;this.checkExists(n+"/"+m+"/"+t+"/"+f,!0,mxUtils.bind(this,function(e,p){e?g?(k||(c=Base64.encode(c)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(n,m,t,f,a,c,p,mxUtils.bind(this,function(a){try{var c=JSON.parse(a.getText());d(this.createGitHubFile(n,m,t,c.content,g))}catch(x){b(x)}}),b)}),b)):d(new GitHubFile(this.ui,
-c,{org:n,repo:m,ref:t,name:a,path:f,sha:p,isNew:!0})):b()}))};GitHubClient.prototype.showCommitDialog=function(a,c,d,b){var g=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(c?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){g();d(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){b()}),null,280);this.ui.showDialog(a.container,400,80,!0,!1);a.init()};
+GitHubClient.prototype.insertFile=function(a,c,d,b,g,e,k){g=null!=g?g:!1;e=e.split("/");var n=e[0],m=e[1],q=e[2],f=e.slice(3,e.length).join("/");0<f.length&&(f+="/");f+=a;this.checkExists(n+"/"+m+"/"+q+"/"+f,!0,mxUtils.bind(this,function(e,p){e?g?(k||(c=Base64.encode(c)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(n,m,q,f,a,c,p,mxUtils.bind(this,function(a){try{var c=JSON.parse(a.getText());d(this.createGitHubFile(n,m,q,c.content,g))}catch(x){b(x)}}),b)}),b)):d(new GitHubFile(this.ui,
+c,{org:n,repo:m,ref:q,name:a,path:f,sha:p,isNew:!0})):b()}))};GitHubClient.prototype.showCommitDialog=function(a,c,d,b){var g=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(c?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){g();d(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){b()}),null,280);this.ui.showDialog(a.container,400,80,!0,!1);a.init()};
GitHubClient.prototype.writeFile=function(a,c,d,b,g,e,k,n,m){e.length>=this.maxFileSize?m({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 1 MB)"}):(d={path:b,branch:decodeURIComponent(d),message:g,content:e},null!=k&&(d.sha=k),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+c+"/contents/"+b,JSON.stringify(d),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){n(a)}),mxUtils.bind(this,function(a){404==a.code&&(a.helpLink="https://github.com/settings/connections/applications/"+
this.clientId,a.code=null);m(a)})))};
GitHubClient.prototype.checkExists=function(a,c,d){var b=a.split("/"),g=b[0],e=b[1],k=b[2];a=b.slice(3,b.length).join("/");this.getSha(g,e,a,k,mxUtils.bind(this,function(b){if(c){var e=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){e();d(!0,b)},function(){e();d(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){d(!1)})}),mxUtils.bind(this,function(a){d(!0)}),null,!0)};
-GitHubClient.prototype.saveFile=function(a,c,d,b,g){var e=a.meta.org,k=a.meta.repo,n=a.meta.ref,m=a.meta.path,t=mxUtils.bind(this,function(b,f){this.writeFile(e,k,n,m,g,f,b,mxUtils.bind(this,function(b){delete a.meta.isNew;c(JSON.parse(b.getText()).content.sha)}),mxUtils.bind(this,function(a){d(a)}))}),f=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(m)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){t(a.meta.sha,b)}),d,this.ui.getCurrentFile()!=a?a.getData():null):
-t(a.meta.sha,Base64.encode(a.getData()))});b?this.getSha(e,k,m,n,mxUtils.bind(this,function(b){a.meta.sha=b;f()}),d):f()};GitHubClient.prototype.pickLibrary=function(a){this.pickFile(a)};GitHubClient.prototype.pickFolder=function(a){this.showGitHubDialog(!1,a)};GitHubClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("H"+encodeURIComponent(a))});this.showGitHubDialog(!0,a)};
+GitHubClient.prototype.saveFile=function(a,c,d,b,g){var e=a.meta.org,k=a.meta.repo,n=a.meta.ref,m=a.meta.path,q=mxUtils.bind(this,function(b,f){this.writeFile(e,k,n,m,g,f,b,mxUtils.bind(this,function(b){delete a.meta.isNew;c(JSON.parse(b.getText()).content.sha)}),mxUtils.bind(this,function(a){d(a)}))}),f=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(m)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){q(a.meta.sha,b)}),d,this.ui.getCurrentFile()!=a?a.getData():null):
+q(a.meta.sha,Base64.encode(a.getData()))});b?this.getSha(e,k,m,n,mxUtils.bind(this,function(b){a.meta.sha=b;f()}),d):f()};GitHubClient.prototype.pickLibrary=function(a){this.pickFile(a)};GitHubClient.prototype.pickFolder=function(a){this.showGitHubDialog(!1,a)};GitHubClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("H"+encodeURIComponent(a))});this.showGitHubDialog(!0,a)};
GitHubClient.prototype.showGitHubDialog=function(a,c){var d=null,b=null,g=null,e=null,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(a?"selectFile":"selectFolder"));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(n);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";k.appendChild(m);var t=document.createElement("div");t.style.textOverflow="ellipsis";t.style.boxSizing="border-box";t.style.overflow="hidden";t.style.padding="4px";t.style.width="100%";var f=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){c(d+"/"+b+"/"+encodeURIComponent(g)+"/"+e)}));this.ui.showDialog(f.container,420,360,!0,!0);a&&f.okButton.parentNode.removeChild(f.okButton);var l=
-mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");d.setAttribute("title",a);mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=t.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),p=mxUtils.bind(this,function(a){var c=document.createElement("div");c.style.marginBottom="8px";c.appendChild(l(d+"/"+b,mxUtils.bind(this,function(){e=null;D()})));a||(mxUtils.write(c," / "),c.appendChild(l(decodeURIComponent(g),mxUtils.bind(this,
-function(){e=null;y()}))));if(null!=e&&0<e.length){var f=e.split("/");for(a=0;a<f.length;a++)(function(a){mxUtils.write(c," / ");c.appendChild(l(f[a],mxUtils.bind(this,function(){e=f.slice(0,a+1).join("/");x()})))})(a)}m.appendChild(c)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(e=g=b=d=null,D()):this.ui.hideDialog()}))}),v=null,q=null,x=mxUtils.bind(this,function(k){null==k&&(m.innerHTML="",k=1);var n=new mxXmlRequest(this.baseUrl+
-"/repos/"+d+"/"+b+"/contents/"+e+"?ref="+encodeURIComponent(g)+"&per_page=100&page="+k,null,"GET");this.ui.spinner.spin(m,mxResources.get("loading"));f.okButton.removeAttribute("disabled");null!=q&&(mxEvent.removeListener(m,"scroll",q),q=null);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var B=mxUtils.bind(this,function(){x(k+1)});mxEvent.addListener(v,
-"click",B);this.executeRequest(n,mxUtils.bind(this,function(f){this.ui.spinner.stop();1==k&&(p(),m.appendChild(l("../ [Up]",mxUtils.bind(this,function(){if(""==e)e=null,D();else{var a=e.split("/");e=a.slice(0,a.length-1).join("/");x()}}),"4px")));var n=JSON.parse(f.getText());if(null==n||0==n.length)mxUtils.write(m,mxResources.get("noFiles"));else{var z=!0,q=0;f=mxUtils.bind(this,function(f){for(var k=0;k<n.length;k++)mxUtils.bind(this,function(k,n){if(f==("dir"==k.type)){var p=t.cloneNode();p.style.backgroundColor=
-z?"#eeeeee":"";z=!z;var B=document.createElement("img");B.src=IMAGE_PATH+"/"+("dir"==k.type?"folder.png":"file.png");B.setAttribute("align","absmiddle");B.style.marginRight="4px";B.style.marginTop="-4px";B.width=20;p.appendChild(B);p.appendChild(l(k.name+("dir"==k.type?"/":""),mxUtils.bind(this,function(){"dir"==k.type?(e=k.path,x()):a&&"file"==k.type&&(this.ui.hideDialog(),c(d+"/"+b+"/"+encodeURIComponent(g)+"/"+k.path))})));m.appendChild(p);q++}})(n[k],k)});f(!0);a&&f(!1)}}),u,!0)}),y=mxUtils.bind(this,
-function(a){null==a&&(m.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+b+"/branches?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=q&&(mxEvent.removeListener(m,"scroll",q),q=null);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var k=
-mxUtils.bind(this,function(){y(a+1)});mxEvent.addListener(v,"click",k);this.executeRequest(c,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(p(!0),m.appendChild(l("../ [Up]",mxUtils.bind(this,function(){e=null;D()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(m,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=t.cloneNode();c.style.backgroundColor=0==b%2?"#eeeeee":"";c.appendChild(l(a.name,mxUtils.bind(this,function(){g=
-a.name;e="";x()})));m.appendChild(c)})(b[c],c);100==b.length&&(m.appendChild(v),q=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&k()},mxEvent.addListener(m,"scroll",q))}}),u)}),D=mxUtils.bind(this,function(a){null==a&&(m.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=q&&mxEvent.removeListener(m,"scroll",q);null!=v&&null!=v.parentNode&&
+"border-box";m.style.padding="4px";m.style.overflow="auto";m.style.lineHeight="1.2em";m.style.height="274px";k.appendChild(m);var q=document.createElement("div");q.style.textOverflow="ellipsis";q.style.boxSizing="border-box";q.style.overflow="hidden";q.style.padding="4px";q.style.width="100%";var f=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){c(d+"/"+b+"/"+encodeURIComponent(g)+"/"+e)}));this.ui.showDialog(f.container,420,360,!0,!0);a&&f.okButton.parentNode.removeChild(f.okButton);var l=
+mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");d.setAttribute("title",a);mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=q.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),p=mxUtils.bind(this,function(a){var c=document.createElement("div");c.style.marginBottom="8px";c.appendChild(l(d+"/"+b,mxUtils.bind(this,function(){e=null;D()})));a||(mxUtils.write(c," / "),c.appendChild(l(decodeURIComponent(g),mxUtils.bind(this,
+function(){e=null;y()}))));if(null!=e&&0<e.length){var f=e.split("/");for(a=0;a<f.length;a++)(function(a){mxUtils.write(c," / ");c.appendChild(l(f[a],mxUtils.bind(this,function(){e=f.slice(0,a+1).join("/");x()})))})(a)}m.appendChild(c)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(e=g=b=d=null,D()):this.ui.hideDialog()}))}),v=null,t=null,x=mxUtils.bind(this,function(k){null==k&&(m.innerHTML="",k=1);var n=new mxXmlRequest(this.baseUrl+
+"/repos/"+d+"/"+b+"/contents/"+e+"?ref="+encodeURIComponent(g)+"&per_page=100&page="+k,null,"GET");this.ui.spinner.spin(m,mxResources.get("loading"));f.okButton.removeAttribute("disabled");null!=t&&(mxEvent.removeListener(m,"scroll",t),t=null);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var B=mxUtils.bind(this,function(){x(k+1)});mxEvent.addListener(v,
+"click",B);this.executeRequest(n,mxUtils.bind(this,function(f){this.ui.spinner.stop();1==k&&(p(),m.appendChild(l("../ [Up]",mxUtils.bind(this,function(){if(""==e)e=null,D();else{var a=e.split("/");e=a.slice(0,a.length-1).join("/");x()}}),"4px")));var n=JSON.parse(f.getText());if(null==n||0==n.length)mxUtils.write(m,mxResources.get("noFiles"));else{var z=!0,t=0;f=mxUtils.bind(this,function(f){for(var k=0;k<n.length;k++)mxUtils.bind(this,function(k,n){if(f==("dir"==k.type)){var p=q.cloneNode();p.style.backgroundColor=
+z?"#eeeeee":"";z=!z;var B=document.createElement("img");B.src=IMAGE_PATH+"/"+("dir"==k.type?"folder.png":"file.png");B.setAttribute("align","absmiddle");B.style.marginRight="4px";B.style.marginTop="-4px";B.width=20;p.appendChild(B);p.appendChild(l(k.name+("dir"==k.type?"/":""),mxUtils.bind(this,function(){"dir"==k.type?(e=k.path,x()):a&&"file"==k.type&&(this.ui.hideDialog(),c(d+"/"+b+"/"+encodeURIComponent(g)+"/"+k.path))})));m.appendChild(p);t++}})(n[k],k)});f(!0);a&&f(!1)}}),u,!0)}),y=mxUtils.bind(this,
+function(a){null==a&&(m.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+b+"/branches?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=t&&(mxEvent.removeListener(m,"scroll",t),t=null);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var k=
+mxUtils.bind(this,function(){y(a+1)});mxEvent.addListener(v,"click",k);this.executeRequest(c,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(p(!0),m.appendChild(l("../ [Up]",mxUtils.bind(this,function(){e=null;D()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(m,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=q.cloneNode();c.style.backgroundColor=0==b%2?"#eeeeee":"";c.appendChild(l(a.name,mxUtils.bind(this,function(){g=
+a.name;e="";x()})));m.appendChild(c)})(b[c],c);100==b.length&&(m.appendChild(v),t=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&k()},mxEvent.addListener(m,"scroll",t))}}),u)}),D=mxUtils.bind(this,function(a){null==a&&(m.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=t&&mxEvent.removeListener(m,"scroll",t);null!=v&&null!=v.parentNode&&
v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){D(a+1)});mxEvent.addListener(v,"click",k);this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();c=JSON.parse(c.getText());if(null==c||0==c.length)mxUtils.write(m,mxResources.get("noFiles"));else{1==a&&(m.appendChild(l(mxResources.get("enterValue")+"...",mxUtils.bind(this,
function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(a){if(null!=a){var c=a.split("/");if(1<c.length){a=c[0];var f=c[1];3>c.length?(d=a,b=f,e=g=null,y()):this.ui.spinner.spin(m,mxResources.get("loading"))&&(c=encodeURIComponent(c.slice(2,c.length).join("/")),this.getFile(a+"/"+f+"/"+c,mxUtils.bind(this,function(a){this.ui.spinner.stop();d=a.meta.org;b=a.meta.repo;g=decodeURIComponent(a.meta.ref);e="";x()}),mxUtils.bind(this,function(a){this.ui.spinner.stop();
-this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(m),mxUtils.br(m));for(var f=0;f<c.length;f++)mxUtils.bind(this,function(a,c){var f=t.cloneNode();f.style.backgroundColor=0==c%2?"#eeeeee":"";f.appendChild(l(a.full_name,mxUtils.bind(this,function(){d=a.owner.login;b=a.name;g=a.default_branch;
-e="";x()})));m.appendChild(f)})(c[f],f)}100==c.length&&(m.appendChild(v),q=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&k()},mxEvent.addListener(m,"scroll",q))}),u)});D()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,c,d){DrawioFile.call(this,a,c);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};
+this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(m),mxUtils.br(m));for(var f=0;f<c.length;f++)mxUtils.bind(this,function(a,c){var f=q.cloneNode();f.style.backgroundColor=0==c%2?"#eeeeee":"";f.appendChild(l(a.full_name,mxUtils.bind(this,function(){d=a.owner.login;b=a.name;g=a.default_branch;
+e="";x()})));m.appendChild(f)})(c[f],f)}100==c.length&&(m.appendChild(v),t=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&k()},mxEvent.addListener(m,"scroll",t))}),u)});D()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,c,d){DrawioFile.call(this,a,c);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(a,c,d){this.doSave(this.getTitle(),c,d)};TrelloFile.prototype.saveAs=function(a,c,d){this.doSave(a,c,d)};TrelloFile.prototype.doSave=function(a,c,d){var b=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=b;this.saveFile(a,!1,c,d)};
TrelloFile.prototype.saveFile=function(a,c,d,b){if(this.isEditable())if(this.savingFile)null!=b&&(this.saveNeededCounter++,b({code:App.ERROR_BUSY}));else if(this.savingFile=!0,this.savingFileTime=new Date,this.getTitle()==a){var g=this.isModified,e=this.isModified(),k=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return e}});k();this.ui.trello.saveFile(this,mxUtils.bind(this,function(e){this.savingFile=!1;this.isModified=g;this.meta=e;this.contentChanged();null!=d&&
d();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,c,d,b))}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=g;this.setModified(e||this.isModified());if(null!=b){if(null!=a&&null!=a.retry){var c=a.retry;a.retry=function(){k();c()}}b(a)}}))}else this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(e){this.ui.trello.insertFile(a,this.getData(),mxUtils.bind(this,function(e){this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(e);0<this.saveNeededCounter&&
@@ -9041,51 +9050,51 @@ TrelloClient.prototype.insertFile=function(a,c,d,b,g,e){g=null!=g?g:!1;var k=mxU
TrelloClient.prototype.saveFile=function(a,c,d){var b=a.meta.compoundId.split(this.SEPARATOR),g=mxUtils.bind(this,function(g){this.writeFile(a.meta.name,g,b[0],function(a){Trello.del("cards/"+b[0]+"/attachments/"+b[1],mxUtils.bind(this,function(){c(a)}),mxUtils.bind(this,function(a){null!=a&&401==a.status?this.authenticate(e,d,!0):d()}))},d)}),e=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){g(this.ui.base64ToBlob(a,
"image/png"))}),d,this.ui.getCurrentFile()!=a?a.getData():null):g(a.getData())});this.authenticate(e,d)};
TrelloClient.prototype.writeFile=function(a,c,d,b,g){if(null!=a&&null!=c)if(c.length>=this.maxFileSize)g({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(c.length)+" / 10 MB)"});else{var e=mxUtils.bind(this,function(){var k=!0,n=window.setTimeout(mxUtils.bind(this,function(){k=!1;g({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout),m=new FormData;m.append("key",Trello.key());m.append("token",Trello.token());m.append("file","string"===typeof c?new Blob([c]):c,a);m.append("name",
-a);var t=new XMLHttpRequest;t.responseType="json";t.onreadystatechange=mxUtils.bind(this,function(){if(4===t.readyState&&(window.clearTimeout(n),k))if(200==t.status){var a=t.response;a.compoundId=d+this.SEPARATOR+a.id;b(a)}else 401==t.status?this.authenticate(e,g,!0):g()});t.open("POST",this.baseUrl+"cards/"+d+"/attachments");t.send(m)});this.authenticate(e,g)}else g({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(a){this.pickFile(a)};
+a);var q=new XMLHttpRequest;q.responseType="json";q.onreadystatechange=mxUtils.bind(this,function(){if(4===q.readyState&&(window.clearTimeout(n),k))if(200==q.status){var a=q.response;a.compoundId=d+this.SEPARATOR+a.id;b(a)}else 401==q.status?this.authenticate(e,g,!0):g()});q.open("POST",this.baseUrl+"cards/"+d+"/attachments");q.send(m)});this.authenticate(e,g)}else g({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(a){this.pickFile(a)};
TrelloClient.prototype.pickFolder=function(a){this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!1,a)}),mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)}))};TrelloClient.prototype.pickFile=function(a,c){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("T"+encodeURIComponent(a))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,a)}),mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a,mxResources.get("ok"))}))};
TrelloClient.prototype.showTrelloDialog=function(a,c){var d=null,b="@me",g=0,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.height="224px";var k=document.createElement("h3");mxUtils.write(k,a?mxResources.get("selectFile"):mxResources.get("selectCard"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(k);var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.overflow="auto";n.style.height=
"194px";e.appendChild(n);e=new CustomDialog(this.ui,e);this.ui.showDialog(e.container,340,270,!0,!0);e.okButton.parentNode.removeChild(e.okButton);var m=mxUtils.bind(this,function(a,b,c){g++;var d=document.createElement("div");d.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;background:"+(0==g%2?"#eee":"#fff");var e=document.createElement("a");e.setAttribute("href","javascript:void(0);");if(null!=c){var f=document.createElement("img");f.src=c.url;f.width=c.width;f.height=
-c.height;f.style="border: 1px solid black;margin:5px;vertical-align:middle";e.appendChild(f)}mxUtils.write(e,a);mxEvent.addListener(e,"click",b);d.appendChild(e);return d}),t=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),f=mxUtils.bind(this,function(){g=0;n.innerHTML="";this.ui.spinner.spin(n,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(d+"/attachments",{fields:"id,name,previews"},
-mxUtils.bind(this,function(a){this.ui.spinner.stop();n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){u()})));mxUtils.br(n);null==a||0==a.length?mxUtils.write(n,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){n.appendChild(m(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();c(d+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[b])})()}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(a,t,!0):
-null!=t&&t(b)}))});a()}),l=null,p=null,u=mxUtils.bind(this,function(e){null==e&&(g=0,n.innerHTML="",e=1);this.ui.spinner.spin(n,mxResources.get("loading"));null!=l&&null!=l.parentNode&&l.parentNode.removeChild(l);l=document.createElement("a");l.style.display="block";l.setAttribute("href","javascript:void(0);");mxUtils.write(l,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(n,"scroll",p);u(e+1)});mxEvent.addListener(l,"click",k);var v=mxUtils.bind(this,function(){Trello.get("search",
+c.height;f.style="border: 1px solid black;margin:5px;vertical-align:middle";e.appendChild(f)}mxUtils.write(e,a);mxEvent.addListener(e,"click",b);d.appendChild(e);return d}),q=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),f=mxUtils.bind(this,function(){g=0;n.innerHTML="";this.ui.spinner.spin(n,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(d+"/attachments",{fields:"id,name,previews"},
+mxUtils.bind(this,function(a){this.ui.spinner.stop();n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){u()})));mxUtils.br(n);null==a||0==a.length?mxUtils.write(n,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){n.appendChild(m(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();c(d+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[b])})()}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(a,q,!0):
+null!=q&&q(b)}))});a()}),l=null,p=null,u=mxUtils.bind(this,function(e){null==e&&(g=0,n.innerHTML="",e=1);this.ui.spinner.spin(n,mxResources.get("loading"));null!=l&&null!=l.parentNode&&l.parentNode.removeChild(l);l=document.createElement("a");l.style.display="block";l.setAttribute("href","javascript:void(0);");mxUtils.write(l,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(n,"scroll",p);u(e+1)});mxEvent.addListener(l,"click",k);var v=mxUtils.bind(this,function(){Trello.get("search",
{query:""==mxUtils.trim(b)?"is:open":b,cards_limit:100,cards_page:e-1},mxUtils.bind(this,function(g){this.ui.spinner.stop();g=null!=g?g.cards:null;if(null==g||0==g.length)mxUtils.write(n,mxResources.get("noFiles"));else{1==e&&(n.appendChild(m(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,b,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(b=a,u())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
-this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(n));for(var q=0;q<g.length;q++)mxUtils.bind(this,function(b){n.appendChild(m(b.name,mxUtils.bind(this,function(){a?(d=b.id,f()):(this.ui.hideDialog(),c(b.id))})))})(g[q]);100==g.length&&(n.appendChild(l),p=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",p))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(v,t,!0):null!=t&&t({message:a.responseText})}))});v()});u()};
+this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(n));for(var t=0;t<g.length;t++)mxUtils.bind(this,function(b){n.appendChild(m(b.name,mxUtils.bind(this,function(){a?(d=b.id,f()):(this.ui.hideDialog(),c(b.id))})))})(g[t]);100==g.length&&(n.appendChild(l),p=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",p))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(v,q,!0):null!=q&&q({message:a.responseText})}))});v()});u()};
TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(a){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};GitLabFile=function(a,c,d){GitHubFile.call(this,a,c,d);this.peer=this.ui.gitLab};mxUtils.extend(GitLabFile,GitHubFile);GitLabFile.prototype.getId=function(){return this.meta.org+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitLabFile.prototype.getHash=function(){return encodeURIComponent("A"+this.getId())};GitLabFile.prototype.isConflict=function(a){return null!=a&&400==a.status};
GitLabFile.prototype.getMode=function(){return App.MODE_GITLAB};GitLabFile.prototype.getDescriptorEtag=function(a){return a.last_commit_id};GitLabFile.prototype.setDescriptorEtag=function(a,c){a.last_commit_id=c};GitLabLibrary=function(a,c,d){GitLabFile.call(this,a,c,d)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(a,c,d){this.saveFile(a,!1,c,d)};GitLabLibrary.prototype.open=function(){};GitLabClient=function(a){GitHubClient.call(this,a,"gitlabauth")};mxUtils.extend(GitLabClient,GitHubClient);GitLabClient.prototype.clientId=DRAWIO_GITLAB_ID;GitLabClient.prototype.scope="api%20read_repository%20write_repository";GitLabClient.prototype.baseUrl=DRAWIO_GITLAB_URL+"/api/v4";
GitLabClient.prototype.authenticate=function(a,c){if(null==window.onGitLabCallback){var d=mxUtils.bind(this,function(){var b=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(g,e){var k=window.location.href,k=k.substring(0,k.lastIndexOf("/")),k=encodeURIComponent(k+"/gitlab.html");null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope+"&redirect_uri="+k+"&response_type=token&state=123","gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,
function(k,m){b?(window.onGitLabCallback=null,b=!1,null==k?c({message:mxResources.get("accessDenied"),retry:d}):(null!=e&&e(),this.token=k,this.setUser(null),g&&this.setPersistentToken(this.token),a())):null!=m&&m.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:d})}),mxUtils.bind(this,function(){b&&(window.onGitLabCallback=null,b=!1,c({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else c({code:App.ERROR_BUSY})};
-GitLabClient.prototype.executeRequest=function(a,c,d,b){var g=mxUtils.bind(this,function(k){var n=!0,m=window.setTimeout(mxUtils.bind(this,function(){n=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),t=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","Bearer "+t);a.setRequestHeader("PRIVATE_TOKEN",t);a.setRequestHeader("Content-Type","application/json")};a.send(mxUtils.bind(this,function(){window.clearTimeout(m);if(n)if(200<=a.getStatus()&&
+GitLabClient.prototype.executeRequest=function(a,c,d,b){var g=mxUtils.bind(this,function(k){var n=!0,m=window.setTimeout(mxUtils.bind(this,function(){n=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),q=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","Bearer "+q);a.setRequestHeader("PRIVATE_TOKEN",q);a.setRequestHeader("Content-Type","application/json")};a.send(mxUtils.bind(this,function(){window.clearTimeout(m);if(n)if(200<=a.getStatus()&&
299>=a.getStatus()||b&&404==a.getStatus())c(a);else if(401===a.getStatus())k?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){e(!0)},d)})}):this.authenticate(function(){g(!0)},d);else if(403===a.getStatus()){var f=!1;try{var l=JSON.parse(a.getText());null!=l&&null!=l.errors&&0<l.errors.length&&(f="too_large"==l.errors[0].code)}catch(p){}d({message:mxResources.get(f?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?d({message:this.getErrorMessage(a,
mxResources.get("fileNotFound"))}):400===a.getStatus()?d({status:400}):d({status:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("error")+" "+a.getStatus())})}),d)}),e=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){e(!0)},d,a):g(a)});null==this.token?this.authenticate(function(){e(!0)},d):e(!1)};
-GitLabClient.prototype.getRefIndex=function(a,c,d,b,g){if(null!=g)d(a,g);else{var e=a.length-2,k=mxUtils.bind(this,function(){if(2>e)b({message:mxResources.get("fileNotFound")});else{var g=Math.max(e-1,0),m=a.slice(0,g).join("/"),g=a[g],t=a[e],f=a.slice(e+1,a.length).join("/"),m=this.baseUrl+"/projects/"+encodeURIComponent(m+"/"+g)+"/repository/"+(c?"tree?path="+f+"&ref="+t:"files/"+encodeURIComponent(f)+"?ref="+t),l=new mxXmlRequest(m,null,"HEAD");this.executeRequest(l,mxUtils.bind(this,function(){200==
+GitLabClient.prototype.getRefIndex=function(a,c,d,b,g){if(null!=g)d(a,g);else{var e=a.length-2,k=mxUtils.bind(this,function(){if(2>e)b({message:mxResources.get("fileNotFound")});else{var g=Math.max(e-1,0),m=a.slice(0,g).join("/"),g=a[g],q=a[e],f=a.slice(e+1,a.length).join("/"),m=this.baseUrl+"/projects/"+encodeURIComponent(m+"/"+g)+"/repository/"+(c?"tree?path="+f+"&ref="+q:"files/"+encodeURIComponent(f)+"?ref="+q),l=new mxXmlRequest(m,null,"HEAD");this.executeRequest(l,mxUtils.bind(this,function(){200==
l.getStatus()?d(a,e):b({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==l.getStatus()?(e--,k()):b({message:mxResources.get("fileNotFound")})}))}});k()}};
-GitLabClient.prototype.getFile=function(a,c,d,b,g,e){b=null!=b?b:!1;this.getRefIndex(a.split("/"),!1,mxUtils.bind(this,function(e,n){var k=Math.max(n-1,0),t=e.slice(0,k).join("/"),f=e[k],l=e[n];a=e.slice(n+1,e.length).join("/");k=/\.png$/i.test(a);if(!g&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&k))null!=this.token?(k=this.baseUrl+"/projects/"+encodeURIComponent(t+"/"+f)+"/repository/files/"+encodeURIComponent(l),e=a.split("/"),this.ui.convertFile(k,0<e.length?
-e[e.length-1]:a,null,this.extension,c,d)):d({message:mxResources.get("accessDenied")});else{var p="&t="+(new Date).getTime(),k=this.baseUrl+"/projects/"+encodeURIComponent(t+"/"+f)+"/repository/files/"+encodeURIComponent(a)+"?ref="+l,k=new mxXmlRequest(k+p,null,"GET");this.executeRequest(k,mxUtils.bind(this,function(a){try{c(this.createGitLabFile(t,f,l,JSON.parse(a.getText()),b,n))}catch(v){d(v)}}),d)}}),d,e)};
+GitLabClient.prototype.getFile=function(a,c,d,b,g,e){b=null!=b?b:!1;this.getRefIndex(a.split("/"),!1,mxUtils.bind(this,function(e,n){var k=Math.max(n-1,0),q=e.slice(0,k).join("/"),f=e[k],l=e[n];a=e.slice(n+1,e.length).join("/");k=/\.png$/i.test(a);if(!g&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&k))null!=this.token?(k=this.baseUrl+"/projects/"+encodeURIComponent(q+"/"+f)+"/repository/files/"+encodeURIComponent(l),e=a.split("/"),this.ui.convertFile(k,0<e.length?
+e[e.length-1]:a,null,this.extension,c,d)):d({message:mxResources.get("accessDenied")});else{var p="&t="+(new Date).getTime(),k=this.baseUrl+"/projects/"+encodeURIComponent(q+"/"+f)+"/repository/files/"+encodeURIComponent(a)+"?ref="+l,k=new mxXmlRequest(k+p,null,"GET");this.executeRequest(k,mxUtils.bind(this,function(a){try{c(this.createGitLabFile(q,f,l,JSON.parse(a.getText()),b,n))}catch(v){d(v)}}),d)}}),d,e)};
GitLabClient.prototype.createGitLabFile=function(a,c,d,b,g,e){var k=DRAWIO_GITLAB_URL+"/",n=b.file_name;a={org:a,repo:c,ref:d,name:n,path:b.file_path,html_url:k+a+"/"+c+"/blob/"+d+"/"+b.file_path,download_url:k+a+"/"+c+"/raw/"+d+"/"+b.file_path+"?inline=false",last_commit_id:b.last_commit_id,refPos:e};c=b.content;"base64"===b.encoding&&(/\.jpe?g$/i.test(n)?c="data:image/jpeg;base64,"+c:/\.gif$/i.test(n)?c="data:image/gif;base64,"+c:/\.png$/i.test(n)?(b=this.ui.extractGraphModelFromPng(c),c=null!=
b&&0<b.length?b:"data:image/png;base64,"+c):c=Base64.decode(c));return g?new GitLabLibrary(this.ui,c,a):new GitLabFile(this.ui,c,a)};
GitLabClient.prototype.insertFile=function(a,c,d,b,g,e,k){g=null!=g?g:!1;this.getRefIndex(e.split("/"),!0,mxUtils.bind(this,function(e,m){var n=Math.max(m-1,0),f=e.slice(0,n).join("/"),l=e[n],p=e[m];path=e.slice(m+1,e.length).join("/");0<path.length&&(path+="/");path+=a;this.checkExists(f+"/"+l+"/"+p+"/"+path,!0,mxUtils.bind(this,function(e,n){if(e)if(g)k||(c=Base64.encode(c)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(f,l,p,path,a,c,n,mxUtils.bind(this,function(a){try{var c=
-JSON.parse(a.getText());d(this.createGitLabFile(f,l,p,c.content,g,m))}catch(I){b(I)}}),b)}),b);else{var q=DRAWIO_GITLAB_URL+"/";d(new GitLabFile(this.ui,c,{org:f,repo:l,ref:p,name:a,path:path,html_url:q+f+"/"+l+"/blob/"+p+"/"+path,download_url:q+f+"/"+l+"/raw/"+p+"/"+path+"?inline=false",refPos:m,last_commit_id:n,isNew:!0}))}else b()}))}),b)};
+JSON.parse(a.getText());d(this.createGitLabFile(f,l,p,c.content,g,m))}catch(I){b(I)}}),b)}),b);else{var t=DRAWIO_GITLAB_URL+"/";d(new GitLabFile(this.ui,c,{org:f,repo:l,ref:p,name:a,path:path,html_url:t+f+"/"+l+"/blob/"+p+"/"+path,download_url:t+f+"/"+l+"/raw/"+p+"/"+path+"?inline=false",refPos:m,last_commit_id:n,isNew:!0}))}else b()}))}),b)};
GitLabClient.prototype.checkExists=function(a,c,d){this.getFile(a,mxUtils.bind(this,function(b){if(c){var g=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){g();d(!0,b.getCurrentEtag())},function(){g();d(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){d(!1)})}),mxUtils.bind(this,function(a){d(!0)}),null,!0)};
-GitLabClient.prototype.writeFile=function(a,c,d,b,g,e,k,n,m){if(e.length>=this.maxFileSize)m({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 1 MB)"});else{var t="POST";d={path:encodeURIComponent(b),branch:decodeURIComponent(d),commit_message:g,content:e,encoding:"base64"};null!=k&&(d.last_commit_id=k,t="PUT");a=this.baseUrl+"/projects/"+encodeURIComponent(a+"/"+c)+"/repository/files/"+encodeURIComponent(b);t=new mxXmlRequest(a,JSON.stringify(d),t);this.executeRequest(t,
+GitLabClient.prototype.writeFile=function(a,c,d,b,g,e,k,n,m){if(e.length>=this.maxFileSize)m({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 1 MB)"});else{var q="POST";d={path:encodeURIComponent(b),branch:decodeURIComponent(d),commit_message:g,content:e,encoding:"base64"};null!=k&&(d.last_commit_id=k,q="PUT");a=this.baseUrl+"/projects/"+encodeURIComponent(a+"/"+c)+"/repository/files/"+encodeURIComponent(b);q=new mxXmlRequest(a,JSON.stringify(d),q);this.executeRequest(q,
mxUtils.bind(this,function(a){n(a)}),m)}};
-GitLabClient.prototype.saveFile=function(a,c,d,b,g){var e=a.meta.org,k=a.meta.repo,n=a.meta.ref,m=a.meta.path,t=mxUtils.bind(this,function(b,f){this.writeFile(e,k,n,m,g,f,b,mxUtils.bind(this,function(b){delete a.meta.isNew;this.getFile(e+"/"+k+"/"+n+"/"+m,mxUtils.bind(this,function(b){b.getData()==a.getData()?c(b.getCurrentEtag()):c({content:a.getCurrentEtag()})}),d,null,null,a.meta.refPos)}),d)}),f=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(m)?this.ui.getEmbeddedPng(mxUtils.bind(this,
-function(b){t(a.meta.last_commit_id,b)}),d,this.ui.getCurrentFile()!=a?a.getData():null):t(a.meta.last_commit_id,Base64.encode(a.getData()))});b?this.getFile(e+"/"+k+"/"+n+"/"+m,mxUtils.bind(this,function(b){a.meta.last_commit_id=b.meta.last_commit_id;f()}),d):f()};GitLabClient.prototype.pickFolder=function(a){this.showGitLabDialog(!1,a)};GitLabClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("A"+encodeURIComponent(a))});this.showGitLabDialog(!0,a)};
+GitLabClient.prototype.saveFile=function(a,c,d,b,g){var e=a.meta.org,k=a.meta.repo,n=a.meta.ref,m=a.meta.path,q=mxUtils.bind(this,function(b,f){this.writeFile(e,k,n,m,g,f,b,mxUtils.bind(this,function(b){delete a.meta.isNew;this.getFile(e+"/"+k+"/"+n+"/"+m,mxUtils.bind(this,function(b){b.getData()==a.getData()?c(b.getCurrentEtag()):c({content:a.getCurrentEtag()})}),d,null,null,a.meta.refPos)}),d)}),f=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(m)?this.ui.getEmbeddedPng(mxUtils.bind(this,
+function(b){q(a.meta.last_commit_id,b)}),d,this.ui.getCurrentFile()!=a?a.getData():null):q(a.meta.last_commit_id,Base64.encode(a.getData()))});b?this.getFile(e+"/"+k+"/"+n+"/"+m,mxUtils.bind(this,function(b){a.meta.last_commit_id=b.meta.last_commit_id;f()}),d):f()};GitLabClient.prototype.pickFolder=function(a){this.showGitLabDialog(!1,a)};GitLabClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("A"+encodeURIComponent(a))});this.showGitLabDialog(!0,a)};
GitLabClient.prototype.showGitLabDialog=function(a,c){var d=null,b=null,g=null,e=null,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(a?"selectFile":"selectFolder"));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(n);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";k.appendChild(m);var t=document.createElement("div");t.style.textOverflow="ellipsis";t.style.boxSizing="border-box";t.style.overflow="hidden";t.style.padding="4px";t.style.width="100%";var f=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){c(d+"/"+b+"/"+encodeURIComponent(g)+"/"+e)}));this.ui.showDialog(f.container,420,360,!0,!0);a&&f.okButton.parentNode.removeChild(f.okButton);var l=
-mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");d.setAttribute("title",a);mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=t.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),p=mxUtils.bind(this,function(a){var c=document.createElement("div");c.style.marginBottom="8px";c.appendChild(l(d+"/"+b,mxUtils.bind(this,function(){e=null;D()})));a||(mxUtils.write(c," / "),c.appendChild(l(decodeURIComponent(g),mxUtils.bind(this,
-function(){e=null;y()}))));if(null!=e&&0<e.length){var f=e.split("/");for(a=0;a<f.length;a++)(function(a){mxUtils.write(c," / ");c.appendChild(l(f[a],mxUtils.bind(this,function(){e=f.slice(0,a+1).join("/");x()})))})(a)}m.appendChild(c)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(e=g=b=d=null,D()):this.ui.hideDialog()}))}),v=null,q=null,x=mxUtils.bind(this,function(k){null==k&&(m.innerHTML="",k=1);var n=new mxXmlRequest(this.baseUrl+
-"/projects/"+encodeURIComponent(d+"/"+b)+"/repository/tree?path="+e+"&ref="+g+"&per_page=100&page="+k,null,"GET");this.ui.spinner.spin(m,mxResources.get("loading"));f.okButton.removeAttribute("disabled");null!=q&&(mxEvent.removeListener(m,"scroll",q),q=null);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var B=mxUtils.bind(this,function(){x(k+
+"border-box";m.style.padding="4px";m.style.overflow="auto";m.style.lineHeight="1.2em";m.style.height="274px";k.appendChild(m);var q=document.createElement("div");q.style.textOverflow="ellipsis";q.style.boxSizing="border-box";q.style.overflow="hidden";q.style.padding="4px";q.style.width="100%";var f=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){c(d+"/"+b+"/"+encodeURIComponent(g)+"/"+e)}));this.ui.showDialog(f.container,420,360,!0,!0);a&&f.okButton.parentNode.removeChild(f.okButton);var l=
+mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");d.setAttribute("title",a);mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=q.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),p=mxUtils.bind(this,function(a){var c=document.createElement("div");c.style.marginBottom="8px";c.appendChild(l(d+"/"+b,mxUtils.bind(this,function(){e=null;D()})));a||(mxUtils.write(c," / "),c.appendChild(l(decodeURIComponent(g),mxUtils.bind(this,
+function(){e=null;y()}))));if(null!=e&&0<e.length){var f=e.split("/");for(a=0;a<f.length;a++)(function(a){mxUtils.write(c," / ");c.appendChild(l(f[a],mxUtils.bind(this,function(){e=f.slice(0,a+1).join("/");x()})))})(a)}m.appendChild(c)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(e=g=b=d=null,D()):this.ui.hideDialog()}))}),v=null,t=null,x=mxUtils.bind(this,function(k){null==k&&(m.innerHTML="",k=1);var n=new mxXmlRequest(this.baseUrl+
+"/projects/"+encodeURIComponent(d+"/"+b)+"/repository/tree?path="+e+"&ref="+g+"&per_page=100&page="+k,null,"GET");this.ui.spinner.spin(m,mxResources.get("loading"));f.okButton.removeAttribute("disabled");null!=t&&(mxEvent.removeListener(m,"scroll",t),t=null);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var B=mxUtils.bind(this,function(){x(k+
1)});mxEvent.addListener(v,"click",B);this.executeRequest(n,mxUtils.bind(this,function(f){this.ui.spinner.stop();1==k&&(p(!g),m.appendChild(l("../ [Up]",mxUtils.bind(this,function(){if(""==e)e=null,D();else{var a=e.split("/");e=a.slice(0,a.length-1).join("/");x()}}),"4px")));var n=JSON.parse(f.getText());if(null==n||0==n.length)mxUtils.write(m,mxResources.get("noFiles"));else{var z=!0,u=0;f=mxUtils.bind(this,function(f){for(var k=0;k<n.length;k++)mxUtils.bind(this,function(k){if(f==("tree"==k.type)){var n=
-t.cloneNode();n.style.backgroundColor=z?"#eeeeee":"";z=!z;var p=document.createElement("img");p.src=IMAGE_PATH+"/"+("tree"==k.type?"folder.png":"file.png");p.setAttribute("align","absmiddle");p.style.marginRight="4px";p.style.marginTop="-4px";p.width=20;n.appendChild(p);n.appendChild(l(k.name+("tree"==k.type?"/":""),mxUtils.bind(this,function(){"tree"==k.type?(e=k.path,x()):a&&"blob"==k.type&&(this.ui.hideDialog(),c(d+"/"+b+"/"+g+"/"+k.path))})));m.appendChild(n);u++}})(n[k])});f(!0);a&&f(!1);100==
-u&&(m.appendChild(v),q=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&B()},mxEvent.addListener(m,"scroll",q))}}),u,!0)}),y=mxUtils.bind(this,function(a){null==a&&(m.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(d+"/"+b)+"/repository/branches?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=q&&(mxEvent.removeListener(m,"scroll",q),q=null);null!=v&&null!=v.parentNode&&
+q.cloneNode();n.style.backgroundColor=z?"#eeeeee":"";z=!z;var p=document.createElement("img");p.src=IMAGE_PATH+"/"+("tree"==k.type?"folder.png":"file.png");p.setAttribute("align","absmiddle");p.style.marginRight="4px";p.style.marginTop="-4px";p.width=20;n.appendChild(p);n.appendChild(l(k.name+("tree"==k.type?"/":""),mxUtils.bind(this,function(){"tree"==k.type?(e=k.path,x()):a&&"blob"==k.type&&(this.ui.hideDialog(),c(d+"/"+b+"/"+g+"/"+k.path))})));m.appendChild(n);u++}})(n[k])});f(!0);a&&f(!1);100==
+u&&(m.appendChild(v),t=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&B()},mxEvent.addListener(m,"scroll",t))}}),u,!0)}),y=mxUtils.bind(this,function(a){null==a&&(m.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(d+"/"+b)+"/repository/branches?per_page=100&page="+a,null,"GET");f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=t&&(mxEvent.removeListener(m,"scroll",t),t=null);null!=v&&null!=v.parentNode&&
v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){y(a+1)});mxEvent.addListener(v,"click",k);this.executeRequest(c,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(p(!0),m.appendChild(l("../ [Up]",mxUtils.bind(this,function(){e=null;D()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(m,mxResources.get("noFiles"));
-else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=t.cloneNode();c.style.backgroundColor=0==b%2?"#eeeeee":"";c.appendChild(l(a.name,mxUtils.bind(this,function(){g=encodeURIComponent(a.name);e="";x()})));m.appendChild(c)})(b[c],c);100==b.length&&(m.appendChild(v),q=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&k()},mxEvent.addListener(m,"scroll",q))}}),u)});f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));var D=mxUtils.bind(this,
-function(a){this.ui.spinner.stop();null==a&&(m.innerHTML="",a=1);null!=q&&(mxEvent.removeListener(m,"scroll",q),q=null);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var c=mxUtils.bind(this,function(){D(a+1)});mxEvent.addListener(v,"click",c);var f=mxUtils.bind(this,function(a){this.ui.spinner.spin(m,mxResources.get("loading"));var b=new mxXmlRequest(this.baseUrl+
+else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=q.cloneNode();c.style.backgroundColor=0==b%2?"#eeeeee":"";c.appendChild(l(a.name,mxUtils.bind(this,function(){g=encodeURIComponent(a.name);e="";x()})));m.appendChild(c)})(b[c],c);100==b.length&&(m.appendChild(v),t=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&k()},mxEvent.addListener(m,"scroll",t))}}),u)});f.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));var D=mxUtils.bind(this,
+function(a){this.ui.spinner.stop();null==a&&(m.innerHTML="",a=1);null!=t&&(mxEvent.removeListener(m,"scroll",t),t=null);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var c=mxUtils.bind(this,function(){D(a+1)});mxEvent.addListener(v,"click",c);var f=mxUtils.bind(this,function(a){this.ui.spinner.spin(m,mxResources.get("loading"));var b=new mxXmlRequest(this.baseUrl+
"/groups?per_page=100",null,"GET");this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();a(JSON.parse(b.getText()))}),u)}),k=mxUtils.bind(this,function(a,b){this.ui.spinner.spin(m,mxResources.get("loading"));var c=new mxXmlRequest(this.baseUrl+"/groups/"+a.id+"/projects?per_page=100",null,"GET");this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();b(a,JSON.parse(c.getText()))}),u)});f(mxUtils.bind(this,function(f){var n=new mxXmlRequest(this.baseUrl+"/users/"+
this.user.id+"/projects?per_page=100&page="+a,null,"GET");this.ui.spinner.spin(m,mxResources.get("loading"));this.executeRequest(n,mxUtils.bind(this,function(n){this.ui.spinner.stop();n=JSON.parse(n.getText());if(null!=n&&0!=n.length||null!=f&&0!=f.length){1==a&&(m.appendChild(l(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(a=a.split("/"),1<a.length?(d=a[0],b=a[1],g="master",
-e=null,2<a.length&&(e=encodeURIComponent(a.slice(2,a.length).join("/"))),x()):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(m),mxUtils.br(m));for(var p=!0,z=0;z<n.length;z++)mxUtils.bind(this,function(a,c){var f=t.cloneNode();f.style.backgroundColor=p?"#eeeeee":"";p=!p;f.appendChild(l(a.name_with_namespace,mxUtils.bind(this,function(){d=a.owner.username;b=
-a.path;g=a.default_branch||"master";e="";x()})));m.appendChild(f)})(n[z],z);for(z=0;z<f.length;z++)k(f[z],mxUtils.bind(this,function(a,c){for(var f=0;f<c.length;f++){var k=t.cloneNode();k.style.backgroundColor=p?"#eeeeee":"";p=!p;mxUtils.bind(this,function(c){k.appendChild(l(c.name_with_namespace,mxUtils.bind(this,function(){d=a.full_path;b=c.path;g=c.default_branch||"master";e="";x()})));m.appendChild(k)})(c[f])}}))}else mxUtils.write(m,mxResources.get("noFiles"));100==n.length&&(m.appendChild(v),
-q=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&c()},mxEvent.addListener(m,"scroll",q))}),u)}))});this.token?this.user?D():this.updateUser(function(){D()},u,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){D()},u,!0)}),u)};GitLabClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};DrawioComment=function(a,c,d,b,g,e,k){this.file=a;this.id=c;this.content=d;this.modifiedDate=b;this.createdDate=g;this.isResolved=e;this.user=k;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,c,d,b,g){c()};DrawioComment.prototype.editComment=function(a,c,d){c()};DrawioComment.prototype.deleteComment=function(a,c){a()};DriveComment=function(a,c,d,b,g,e,k,n){DrawioComment.call(this,a,c,d,b,g,e,k);this.pCommentId=n};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(a,c,d,b,g){a={content:a.content};b?a.verb="resolve":g&&(a.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:a,method:"POST"},mxUtils.bind(this,function(a){c(a.replyId)}),d)};
+e=null,2<a.length&&(e=encodeURIComponent(a.slice(2,a.length).join("/"))),x()):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(m),mxUtils.br(m));for(var p=!0,z=0;z<n.length;z++)mxUtils.bind(this,function(a,c){var f=q.cloneNode();f.style.backgroundColor=p?"#eeeeee":"";p=!p;f.appendChild(l(a.name_with_namespace,mxUtils.bind(this,function(){d=a.owner.username;b=
+a.path;g=a.default_branch||"master";e="";x()})));m.appendChild(f)})(n[z],z);for(z=0;z<f.length;z++)k(f[z],mxUtils.bind(this,function(a,c){for(var f=0;f<c.length;f++){var k=q.cloneNode();k.style.backgroundColor=p?"#eeeeee":"";p=!p;mxUtils.bind(this,function(c){k.appendChild(l(c.name_with_namespace,mxUtils.bind(this,function(){d=a.full_path;b=c.path;g=c.default_branch||"master";e="";x()})));m.appendChild(k)})(c[f])}}))}else mxUtils.write(m,mxResources.get("noFiles"));100==n.length&&(m.appendChild(v),
+t=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&c()},mxEvent.addListener(m,"scroll",t))}),u)}))});this.token?this.user?D():this.updateUser(function(){D()},u,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){D()},u,!0)}),u)};GitLabClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};DrawioComment=function(a,c,d,b,g,e,k){this.file=a;this.id=c;this.content=d;this.modifiedDate=b;this.createdDate=g;this.isResolved=e;this.user=k;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,c,d,b,g){c()};DrawioComment.prototype.editComment=function(a,c,d){c()};DrawioComment.prototype.deleteComment=function(a,c){a()};DriveComment=function(a,c,d,b,g,e,k,n){DrawioComment.call(this,a,c,d,b,g,e,k);this.pCommentId=n};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(a,c,d,b,g){a={content:a.content};b?a.verb="resolve":g&&(a.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:a,method:"POST"},mxUtils.bind(this,function(a){c(a.replyId)}),d)};
DriveComment.prototype.editComment=function(a,c,d){this.content=a;a={content:a};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:a,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:a,method:"PATCH"},c,d)};
DriveComment.prototype.deleteComment=function(a,c){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},a,c)};App=function(a,c,d){EditorUi.call(this,a,c,null!=d?d:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.isModified()){var c={category:"DISCARD-FILE-"+a.getHash(),action:(a.savingFile?"saving":"")+(a.savingFile&&null!=a.savingFileTime?"_"+Math.round((Date.now()-a.savingFileTime.getTime())/1E3):"")+(null!=a.saveLevel?"-sl_"+a.saveLevel:"")+"-age_"+(null!=
a.ageStart?Math.round((Date.now()-a.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+"-open_"+(null!=a.opened?Math.round((Date.now()-a.opened.getTime())/1E3):"x")+"-save_"+(null!=a.lastSaved?Math.round((Date.now()-a.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=a.lastChanged?Math.round((Date.now()-a.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=a.sync?"client_"+a.sync.clientId:"nosync"};
@@ -9103,7 +9112,7 @@ App.getStoredMode=function(){var a=null;null==a&&isLocalStorage&&(a=localStorage
2)?(mxscript(App.DROPBOX_URL),mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY)):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=null):window.OneDriveClient=
null),"function"===typeof window.TrelloClient&&("0"!=urlParams.tr&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?(mxscript(App.TRELLO_JQUERY_URL),mxscript(App.TRELLO_URL)):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)),"undefined"==typeof JSON&&mxscript("js/json/json2.min.js")))})();
App.main=function(a,c){function d(b){mxUtils.getAll("1"!=urlParams.dev?[b]:[b,STYLE_PATH+"/default.xml",STYLE_PATH+"/dark-default.xml"],function(b){mxResources.parse(b[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var d=function(a){if(null!=a)for(var b=0;b<a.length;b++)if(!e[a[b]])throw Error(mxResources.get("invalidInput")+' "'+a[b])+'"';return!0},e={},f;for(f in App.pluginRegistry)e[App.pluginRegistry[f]]=!0;
-var g=JSON.parse(Graph.decompress(window.location.hash.substring(9)));null!=g&&d(g.plugins)&&(EditorUi.debug("Setting configuration",JSON.stringify(g)),confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(".configuration",JSON.stringify(g)),window.location.hash="",window.location.reload()));window.location.hash=""}catch(x){window.location.hash="",alert(x)}2<b.length&&(Graph.prototype.defaultThemes["default-style2"]=b[1].getDocumentElement(),
+var k=JSON.parse(Graph.decompress(window.location.hash.substring(9)));null!=k&&d(k.plugins)&&(EditorUi.debug("Setting configuration",JSON.stringify(k)),confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(".configuration",JSON.stringify(k)),window.location.hash="",window.location.reload()));window.location.hash=""}catch(x){window.location.hash="",alert(x)}2<b.length&&(Graph.prototype.defaultThemes["default-style2"]=b[1].getDocumentElement(),
Graph.prototype.defaultThemes.darkTheme=b[2].getDocumentElement());b=null!=c?c():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,
function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):
"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=
@@ -9114,7 +9123,7 @@ window.console&&console.error(l)}mxResources.loadDefaultBundle=!1;d(mxResources.
"1"!=urlParams.offline&&mxscript(App.PUSHER_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 e=JSON.parse(localStorage.getItem(mxSettings.key));null!=e&&(g=e.plugins)}catch(f){}e=urlParams.p;App.initPluginCallback();null!=e&&App.loadPlugins(e.split(";"));if(null!=g&&0<g.length&&"0"!=urlParams.plugins){for(var e=window.location.protocol+"//"+window.location.host,
k=!0,n=0;n<g.length&&k;n++)"/"!=g[n].charAt(0)&&g[n].substring(0,e.length)!=e&&(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(n=0;n<g.length;n++)try{null==App.pluginsLoaded[g[n]]&&(App.pluginsLoaded[g[n]]=!0,App.embedModePluginsCount++,
"/"==g[n].charAt(0)&&(g[n]=PLUGINS_BASE_PATH+g[n]),mxscript(g[n]))}catch(f){}}}"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 m=window.opener||window.parent,t=function(a){if(a.source==m)try{var c=JSON.parse(a.data);null!=c&&"configure"==c.action&&(mxEvent.removeListener(window,"message",t),Editor.configure(c.config,!0),mxSettings.load(),b())}catch(p){null!=window.console&&console.log("Error in configure message: "+p,a.data)}};mxEvent.addListener(window,"message",t);m.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",
+Editor.initMath();if("1"==urlParams.configure){var m=window.opener||window.parent,q=function(a){if(a.source==m)try{var c=JSON.parse(a.data);null!=c&&"configure"==c.action&&(mxEvent.removeListener(window,"message",q),Editor.configure(c.config,!0),mxSettings.load(),b())}catch(p){null!=window.console&&console.log("Error in configure message: "+p,a.data)}};mxEvent.addListener(window,"message",q);m.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)}catch(f){null!=window.console&&console.error(f)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(g=localStorage.getItem(".configuration"),null!=g))try{g=JSON.parse(g),null!=g&&(EditorUi.debug("Using local configuration",g),Editor.configure(g))}catch(f){null!=window.console&&console.error(f)}}b()}};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz=64";
App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg==";
App.prototype.chevronUpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUY1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NjA1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1RDUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1RTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pg+qUokAAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAAL0lEQVR42mJgRgMMRAswMKAKMDDARBjg8lARBoR6KImkH0wTbygT6YaS4DmAAAMAYPkClOEDDD0AAAAASUVORK5CYII=":
@@ -9136,13 +9145,14 @@ a+c+"</a>"+(null!=e?'<a href="'+e+'" target="_blank" style="display:inline;text-
mxUtils.bind(this,function(){"undefined"!==typeof window.Trello?(this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.trello))):null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=d)});d()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var b=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var a=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,a),window.DrawGapiClientCallback=null):a()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=b)});b()}if("1"!=urlParams.embed||
"1"==urlParams.db){var g=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=
-g)});g()}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,!(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"1"==urlParams.embed||"auto"!=DrawioFile.SYNC||"1"==urlParams.local||
-"1"==urlParams.stealth||"1"==urlParams.offline||this.editor.chromeless&&!this.editor.editable)){var e=window.setTimeout(mxUtils.bind(this,function(){DrawioFile.SYNC="manual";var a=this.getCurrentFile();null!=a&&null!=a.sync&&(a.sync.destroy(),a.sync=null,a=mxUtils.htmlEntities(mxResources.get("timeout")),this.editor.setStatus('<div title="'+a+'" class="geStatusAlert" style="overflow:hidden;">'+a+"</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(a){window.clearTimeout(e)}));this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){if(!(this.getCurrentFile().mode!=App.MODE_DEVICE||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings.closeDesktopFooter||this.editor.chromeless&&!this.editor.editable||this.footerShowing)&&null==urlParams.open){var b=a(mxResources.get("downloadDesktop")+"...","https://get.draw.io/","geStatusMessage",
-mxUtils.bind(this,function(){b.parentNode.removeChild(b);this.hideFooter();isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeDesktopFooter=Date.now(),mxSettings.save())}));document.body.appendChild(b);this.footerShowing=!0;window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),1500);window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,110%)");this.footerShowing=!1}),
-15E3)}}))}}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(a){this.appIconClicked(a)})),mxClient.IS_QUIRKS&&(this.icon.style.marginTop="12px"),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild));this.editor.graph.isViewer()&&
-this.initializeViewerMode()};App.prototype.scheduleSanityCheck=function(){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)};
+g)});g()}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,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.editor.chromeless&&!this.editor.editable||this.editor.addListener("fileLoaded",
+mxUtils.bind(this,function(){if(!(this.getCurrentFile().mode!=App.MODE_DEVICE||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings.closeDesktopFooter||this.footerShowing)&&null==urlParams.open){var b=a('<img border="0" align="absmiddle" style="margin-top:-6px;cursor:pointer;margin-left:8px;margin-right:12px;width:24px;height:24px;" src="'+IMAGE_PATH+'/logo.png"><font size="3">'+mxResources.get("downloadDesktop")+"...</font>","https://get.draw.io/","geStatusMessage",mxUtils.bind(this,
+function(){b.parentNode.removeChild(b);this.hideFooter();isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeDesktopFooter=Date.now(),mxSettings.save())}));document.body.appendChild(b);this.footerShowing=!0;window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,110%)");this.footerShowing=!1}),15E3)}})),!(mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp||"1"==urlParams.embed||"auto"!=DrawioFile.SYNC||"1"==urlParams.local||"1"==urlParams.stealth||"1"==urlParams.offline||this.editor.chromeless&&!this.editor.editable)){var e=window.setTimeout(mxUtils.bind(this,function(){DrawioFile.SYNC="manual";var a=this.getCurrentFile();null!=a&&null!=a.sync&&(a.sync.destroy(),a.sync=null,a=mxUtils.htmlEntities(mxResources.get("timeout")),this.editor.setStatus('<div title="'+a+'" class="geStatusAlert" style="overflow:hidden;">'+a+"</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(a){window.clearTimeout(e)}))}}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(a){this.appIconClicked(a)})),mxClient.IS_QUIRKS&&(this.icon.style.marginTop="12px"),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild));this.editor.graph.isViewer()&&this.initializeViewerMode()};App.prototype.scheduleSanityCheck=function(){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)};
App.prototype.sanityCheck=function(){var a=this.getCurrentFile();if(null!=a&&a.isModified()&&a.isAutosave()&&a.isOverdue()){var c={category:"WARN-FILE-"+a.getHash(),action:(a.savingFile?"saving":"")+(a.savingFile&&null!=a.savingFileTime?"_"+Math.round((Date.now()-a.savingFileTime.getTime())/1E3):"")+(null!=a.saveLevel?"-sl_"+a.saveLevel:"")+"-age_"+(null!=a.ageStart?Math.round((Date.now()-a.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+"-open_"+(null!=
a.opened?Math.round((Date.now()-a.opened.getTime())/1E3):"x")+"-save_"+(null!=a.lastSaved?Math.round((Date.now()-a.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=a.lastChanged?Math.round((Date.now()-a.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=a.sync?"client_"+a.sync.clientId:"nosync"};a.constructor==DriveFile&&null!=a.desc&&null!=this.drive&&(c.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+a.desc.headRevisionId+
"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType);EditorUi.logEvent(c);c=mxResources.get("ensureDataSaved");null!=a.lastSaved&&(c=this.timeSince(a.lastSaved),null==c&&(c=mxResources.get("lessThanAMinute")),c=mxResources.get("lastSaved",[c]));this.spinner.stop();this.showError(mxResources.get("unsavedChanges"),c,mxResources.get("ignore"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("save"),mxUtils.bind(this,function(){this.stopSanityCheck();this.actions.get(null!=
@@ -9154,10 +9164,10 @@ App.prototype.updateDraft=function(){isLocalStorage&&null!=localStorage&&localSt
App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var a=localStorage.getItem(".recent");if(null!=a)return JSON.parse(a)}catch(c){}return null}};App.prototype.resetRecent=function(a){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(c){}};App.prototype.removeDraft=function(){if(isLocalStorage&&null!=localStorage&&"0"==urlParams.splash)try{localStorage.removeItem(".draft")}catch(a){}};
App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var a=this.getCurrentFile();if(null!=a)if(a.constructor!=LocalFile||""!=a.getHash()||a.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()){if(a.isModified())return mxResources.get("allChangesLost");a.close(!0)}else return mxResources.get("ensureDataSaved")};
App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var a=this.editor.appName,c=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=c&&(a=(null!=c.getTitle()?c.getTitle():this.defaultFilename)+" - "+a);document.title=a}};App.prototype.createCrcTable=function(){for(var a=[],c,d=0;256>d;d++){c=d;for(var b=0;8>b;b++)c=c&1?3988292384^c>>>1:c>>>1;a[d]=c}return a};
-App.prototype.getThumbnail=function(a,c){var d=!1;try{var b=!0,g=window.setTimeout(mxUtils.bind(this,function(){b=!1;c(null)}),this.timeout),e=mxUtils.bind(this,function(a){window.clearTimeout(g);b&&c(a)});null==this.thumbImageCache&&(this.thumbImageCache={});var k=this.editor.graph,n=null!=k.themes&&"darkTheme"==k.defaultThemeName;if(null!=this.pages&&(this.currentPage!=this.pages[0]||n)){var m=k.getGlobalVariable,k=this.createTemporaryGraph(n?k.getDefaultStylesheet():k.getStylesheet()),t=this.pages[0];
-n&&(k.defaultThemeName="default");k.getGlobalVariable=function(a){return"page"==a?t.getName():"pagenumber"==a?1:m.apply(this,arguments)};k.getGlobalVariable=m;document.body.appendChild(k.container);k.model.setRoot(t.root)}if(mxClient.IS_CHROMEAPP||!k.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,function(a){try{k!=this.editor.graph&&null!=k.container.parentNode&&k.container.parentNode.removeChild(k.container)}catch(B){a=null}e(a)}),a,this.thumbImageCache,"#ffffff",function(){e()},
-null,null,null,null,null,null,k),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var f=document.createElement("canvas"),l=k.getGraphBounds(),p=a/l.width,p=Math.min(1,Math.min(3*a/(4*l.height),p)),u=Math.floor(l.x),v=Math.floor(l.y);f.setAttribute("width",Math.ceil(p*(l.width+4)));f.setAttribute("height",Math.ceil(p*(l.height+4)));var q=f.getContext("2d");q.scale(p,p);q.translate(-u,-v);var x=k.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";q.save();q.fillStyle=x;q.fillRect(u,
-v,Math.ceil(l.width+4),Math.ceil(l.height+4));q.restore();var y=new mxJsCanvas(f),D=new mxAsyncCanvas(this.thumbImageCache);y.images=this.thumbImageCache.images;var I=new mxImageExport;I.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};I.drawText=function(a,b){};I.drawState(k.getView().getState(k.model.root),D);D.finish(mxUtils.bind(this,function(){try{I.drawState(k.getView().getState(k.model.root),
+App.prototype.getThumbnail=function(a,c){var d=!1;try{var b=!0,g=window.setTimeout(mxUtils.bind(this,function(){b=!1;c(null)}),this.timeout),e=mxUtils.bind(this,function(a){window.clearTimeout(g);b&&c(a)});null==this.thumbImageCache&&(this.thumbImageCache={});var k=this.editor.graph,n=null!=k.themes&&"darkTheme"==k.defaultThemeName;if(null!=this.pages&&(this.currentPage!=this.pages[0]||n)){var m=k.getGlobalVariable,k=this.createTemporaryGraph(n?k.getDefaultStylesheet():k.getStylesheet()),q=this.pages[0];
+n&&(k.defaultThemeName="default");k.getGlobalVariable=function(a){return"page"==a?q.getName():"pagenumber"==a?1:m.apply(this,arguments)};k.getGlobalVariable=m;document.body.appendChild(k.container);k.model.setRoot(q.root)}if(mxClient.IS_CHROMEAPP||!k.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,function(a){try{k!=this.editor.graph&&null!=k.container.parentNode&&k.container.parentNode.removeChild(k.container)}catch(B){a=null}e(a)}),a,this.thumbImageCache,"#ffffff",function(){e()},
+null,null,null,null,null,null,k),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var f=document.createElement("canvas"),l=k.getGraphBounds(),p=a/l.width,p=Math.min(1,Math.min(3*a/(4*l.height),p)),u=Math.floor(l.x),v=Math.floor(l.y);f.setAttribute("width",Math.ceil(p*(l.width+4)));f.setAttribute("height",Math.ceil(p*(l.height+4)));var t=f.getContext("2d");t.scale(p,p);t.translate(-u,-v);var x=k.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";t.save();t.fillStyle=x;t.fillRect(u,
+v,Math.ceil(l.width+4),Math.ceil(l.height+4));t.restore();var y=new mxJsCanvas(f),D=new mxAsyncCanvas(this.thumbImageCache);y.images=this.thumbImageCache.images;var I=new mxImageExport;I.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};I.drawText=function(a,b){};I.drawState(k.getView().getState(k.model.root),D);D.finish(mxUtils.bind(this,function(){try{I.drawState(k.getView().getState(k.model.root),
y),k!=this.editor.graph&&null!=k.container.parentNode&&k.container.parentNode.removeChild(k.container)}catch(z){f=null}e(f)}));d=!0}}catch(z){d=!1,null!=k&&k!=this.editor.graph&&null!=k.container.parentNode&&k.container.parentNode.removeChild(k.container)}return d};
App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a};
(function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(c,d){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var b=this.getCurrentFile();c=null!=b?b.getMode():c;c==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):c==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
@@ -9176,7 +9186,7 @@ mxResources.get("close");c.appendChild(a);mxEvent.addListener(a,"click",function
App.prototype.start=function(){this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{if("1"!=urlParams.client&&"1"!=urlParams.embed&&mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{this.hideDialog();var b=this.getDiagramId(),c=this.getCurrentFile();null!=c&&c.getHash()==b||this.loadFile(b,!0)}catch(n){null!=document.body&&this.handleError(n,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=
null!=a?a.getHash():""}))}})),(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var a=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var a=mxUtils.bind(this,function(a){"data:image/png;base64,"==a.substring(0,22)&&(a=this.extractGraphModelFromPng(a));var b=urlParams.title,b=null!=b?
decodeURIComponent(b):this.defaultFilename;a=new LocalFile(this,a,b,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(a.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(a);this.getCurrentFile().setModified(!this.editor.chromeless)}),b=window.opener||window.parent;if(b!=window){var c=urlParams.create;null!=c?a(b[decodeURIComponent(c)]):(c=urlParams.data,null!=c?a(decodeURIComponent(c)):this.installMessageHandler(mxUtils.bind(this,function(c,d){d.source==
-b&&a(c)})))}}else if(null==this.dialog)if("1"==urlParams.demo)c=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=c;else{c=!1;try{c=null!=window.opener&&null!=window.opener.openFile}catch(t){}if(c)this.spinner.spin(document.body,mxResources.get("loading"));else if(c=this.getDiagramId(),"0"!=urlParams.splash||null!=c&&0!=c.length)this.loadFile(c);else if(!mxClient.IS_CHROMEAPP){var d=this.getDraft(),m=null!=d?d.data:this.getFileData(),
+b&&a(c)})))}}else if(null==this.dialog)if("1"==urlParams.demo)c=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=c;else{c=!1;try{c=null!=window.opener&&null!=window.opener.openFile}catch(q){}if(c)this.spinner.spin(document.body,mxResources.get("loading"));else if(c=this.getDiagramId(),"0"!=urlParams.splash||null!=c&&0!=c.length)this.loadFile(c);else if(!mxClient.IS_CHROMEAPP){var d=this.getDraft(),m=null!=d?d.data:this.getFileData(),
c=Editor.useLocalStorage;this.createFile(this.defaultFilename,m,null,null,null,null,null,!0);Editor.useLocalStorage=c;null!=d&&(c=this.getCurrentFile(),null!=c&&c.addUnsavedStatus())}}}),c=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=c&&0<c.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var d=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=
this.getSearch(["create","title"]))}),b=mxUtils.bind(this,function(a){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,a,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var b=urlParams.title,b=null!=b?decodeURIComponent(b):this.defaultFilename;a=this.getServiceCount(!0);isLocalStorage&&a++;var c=4>=a?2:6<a?4:3,b=new CreateDialog(this,b,mxUtils.bind(this,function(a,b){if(null==b){this.hideDialog();var c=Editor.useLocalStorage;this.createFile(0<a.length?
a:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=c}else this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,this.getFileData(!0),null,b,null,!0,c)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,c,null,null,null,this.editor.fileExtensions);this.showDialog(b.container,400,a>c?390:270,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));b.init()}}),c=decodeURIComponent(c);if("http://"!=c.substring(0,
@@ -9199,21 +9209,21 @@ App.prototype.saveLibrary=function(a,c,d,b,g,e,k){try{b=null!=b?b:this.mode;g=nu
n,d,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),m,this.drive.libraryMimeType):b==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),m,d):b==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(a,n,mxUtils.bind(this,
function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),m,d):b==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),m,d):b==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);
this.libraryLoaded(a,c)}),m,d):b==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),m,d):b==App.MODE_BROWSER?(d=mxUtils.bind(this,function(){var b=new StorageLibrary(this,n,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(b,c)}),m)}),null==localStorage.getItem(a)?d():this.confirm(mxResources.get("replaceIt",
-[a]),d)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(g||this.spinner.spin(document.body,mxResources.get("saving"))){d.setData(n);var t=mxUtils.bind(this,function(){d.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);e||this.libraryLoaded(d,c);null!=k&&k()}),m)});if(a!=d.getTitle()){var f=d.getHash();d.rename(a,mxUtils.bind(this,function(a){d.constructor!=LocalLibrary&&f!=d.getHash()&&(mxSettings.removeCustomLibrary(f),mxSettings.addCustomLibrary(d.getHash()));
-this.removeLibrarySidebar(f);t()}),m)}else t()}}catch(l){this.handleError(l)}};
+[a]),d)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(g||this.spinner.spin(document.body,mxResources.get("saving"))){d.setData(n);var q=mxUtils.bind(this,function(){d.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);e||this.libraryLoaded(d,c);null!=k&&k()}),m)});if(a!=d.getTitle()){var f=d.getHash();d.rename(a,mxUtils.bind(this,function(a){d.constructor!=LocalLibrary&&f!=d.getHash()&&(mxSettings.removeCustomLibrary(f),mxSettings.addCustomLibrary(d.getHash()));
+this.removeLibrarySidebar(f);q()}),m)}else q()}}catch(l){this.handleError(l)}};
App.prototype.saveFile=function(a,c){var d=this.getCurrentFile();if(null!=d){var b=mxUtils.bind(this,function(){this.removeDraft();this.getCurrentFile()==d||d.isModified()||(d.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=c&&c()});if(a||null==d.getTitle()||null==this.mode){var g=null!=d.getTitle()?d.getTitle():this.defaultFilename,e=!mxClient.IS_IOS||!navigator.standalone,k=this.mode,n=this.getServiceCount(!0);
isLocalStorage&&n++;var m=4>=n?2:6<n?4:3,g=new CreateDialog(this,g,mxUtils.bind(this,function(a,c,d){null!=a&&0<a.length&&(/(\.pdf)$/i.test(a)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){d.value=a.split(".").slice(0,-1).join(".");d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?d.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),
mxResources.get("no")):(this.hideDialog(),null==k&&c==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,b)):"download"==c?(new LocalFile(this,null,a)).save():"_blank"==c?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):k!=c?this.pickFolder(c,mxUtils.bind(this,function(d){this.createFile(a,this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf(".")||/(\.drawio)$/i.test(a),
/(\.svg)$/i.test(a),/(\.html)$/i.test(a)),null,c,b,null==this.mode,d)})):null!=c&&this.save(a,b)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,e,null,!0,m,null,null,null,this.editor.fileExtensions,!1);this.showDialog(g.container,400,n>m?390:270,!0,!0);g.init()}else this.save(d.getTitle(),b)}};
App.prototype.loadTemplate=function(a,c,d,b){var g=!1,e=a;this.editor.isCorsEnabledForUrl(e)||(e="t="+(new Date).getTime(),e=PROXY_URL+"?url="+encodeURIComponent(a)+"&base64=1&"+e,g=!0);var k=null!=b?b:a;this.loadUrl(e,mxUtils.bind(this,function(b){try{var e=g?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b):b;if(/(\.v(dx|sdx?))($|\?)/i.test(k)||this.isVisioData(e))this.importVisio(this.base64ToBlob(b.substring(b.indexOf(",")+1)),function(a){c(a)},d,k);else if(!this.isOffline()&&
-(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,k))this.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&c(a.responseText)}),a);else if(this.isLucidChartData(e))this.convertLucidChart(e,mxUtils.bind(this,function(a){c(a)}),mxUtils.bind(this,function(a){d(a)}));else{if(/(\.png)($|\?)/i.test(k)||this.isPngData(e))e=this.extractGraphModelFromPng(b);c(e)}}catch(t){d(t)}}),
+(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,k))this.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&c(a.responseText)}),a);else if(this.isLucidChartData(e))this.convertLucidChart(e,mxUtils.bind(this,function(a){c(a)}),mxUtils.bind(this,function(a){d(a)}));else{if(/(\.png)($|\?)/i.test(k)||this.isPngData(e))e=this.extractGraphModelFromPng(b);c(e)}}catch(q){d(q)}}),
d,/(\.png)($|\?)/i.test(k)||/(\.v(dx|sdx?))($|\?)/i.test(k),null,null,g)};App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_GITLAB?this.gitLab:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_TRELLO?this.trello:null};
-App.prototype.createFile=function(a,c,d,b,g,e,k,n,m){b=n?null:null!=b?b:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){c=null!=c?c:this.emptyDiagramXml;var t=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(a){t();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});try{if(b==App.MODE_GOOGLE&&null!=this.drive)null==k&&null!=this.stateArg&&null!=this.stateArg.folderId&&(k=this.stateArg.folderId),
-this.drive.insertFile(a,c,k,mxUtils.bind(this,function(a){t();this.fileCreated(a,d,e,g,m)}),f);else if(b==App.MODE_GITHUB&&null!=this.gitHub)this.gitHub.insertFile(a,c,mxUtils.bind(this,function(a){t();this.fileCreated(a,d,e,g,m)}),f,!1,k);else if(b==App.MODE_GITLAB&&null!=this.gitLab)this.gitLab.insertFile(a,c,mxUtils.bind(this,function(a){t();this.fileCreated(a,d,e,g,m)}),f,!1,k);else if(b==App.MODE_TRELLO&&null!=this.trello)this.trello.insertFile(a,c,mxUtils.bind(this,function(a){t();this.fileCreated(a,
-d,e,g,m)}),f,!1,k);else if(b==App.MODE_DROPBOX&&null!=this.dropbox)this.dropbox.insertFile(a,c,mxUtils.bind(this,function(a){t();this.fileCreated(a,d,e,g,m)}),f);else if(b==App.MODE_ONEDRIVE&&null!=this.oneDrive)this.oneDrive.insertFile(a,c,mxUtils.bind(this,function(a){t();this.fileCreated(a,d,e,g,m)}),f,!1,k);else if(b==App.MODE_BROWSER){t();var l=mxUtils.bind(this,function(){var b=new StorageFile(this,c,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(b,d,e,g,m)}),f)});null==localStorage.getItem(a)?
-l():this.confirm(mxResources.get("replaceIt",[a]),l,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}else t(),this.fileCreated(new LocalFile(this,c,a,null==b),d,e,g,m)}catch(p){t(),this.handleError(p)}}};
-App.prototype.fileCreated=function(a,c,d,b,g){var e=window.location.pathname;null!=c&&0<c.length&&(e+="?libs="+c);null!=g&&0<g.length&&(e+="?clibs="+g);e=this.getUrl(e);a.getMode()!=App.MODE_DEVICE&&(e+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var k=a.getData(),k=0<k.length?this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,!0):null,n=window.location.protocol+"//"+window.location.hostname+e,m=k,t=null;null!=k&&/\.svg$/i.test(a.getTitle())&&
-(t=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(t.container),m=this.decodeNodeIntoGraph(m,t));a.setData(this.createFileData(k,t,a,n));null!=t&&t.container.parentNode.removeChild(t.container);var f=mxUtils.bind(this,function(){this.spinner.stop()}),l=mxUtils.bind(this,function(){f();var k=this.getCurrentFile();null==d&&null!=k&&(d=!k.isModified()&&null==k.getMode());var m=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);d&&a.addAllSavedStatus();
+App.prototype.createFile=function(a,c,d,b,g,e,k,n,m){b=n?null:null!=b?b:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){c=null!=c?c:this.emptyDiagramXml;var q=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(a){q();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});try{if(b==App.MODE_GOOGLE&&null!=this.drive)null==k&&null!=this.stateArg&&null!=this.stateArg.folderId&&(k=this.stateArg.folderId),
+this.drive.insertFile(a,c,k,mxUtils.bind(this,function(a){q();this.fileCreated(a,d,e,g,m)}),f);else if(b==App.MODE_GITHUB&&null!=this.gitHub)this.gitHub.insertFile(a,c,mxUtils.bind(this,function(a){q();this.fileCreated(a,d,e,g,m)}),f,!1,k);else if(b==App.MODE_GITLAB&&null!=this.gitLab)this.gitLab.insertFile(a,c,mxUtils.bind(this,function(a){q();this.fileCreated(a,d,e,g,m)}),f,!1,k);else if(b==App.MODE_TRELLO&&null!=this.trello)this.trello.insertFile(a,c,mxUtils.bind(this,function(a){q();this.fileCreated(a,
+d,e,g,m)}),f,!1,k);else if(b==App.MODE_DROPBOX&&null!=this.dropbox)this.dropbox.insertFile(a,c,mxUtils.bind(this,function(a){q();this.fileCreated(a,d,e,g,m)}),f);else if(b==App.MODE_ONEDRIVE&&null!=this.oneDrive)this.oneDrive.insertFile(a,c,mxUtils.bind(this,function(a){q();this.fileCreated(a,d,e,g,m)}),f,!1,k);else if(b==App.MODE_BROWSER){q();var l=mxUtils.bind(this,function(){var b=new StorageFile(this,c,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(b,d,e,g,m)}),f)});null==localStorage.getItem(a)?
+l():this.confirm(mxResources.get("replaceIt",[a]),l,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}else q(),this.fileCreated(new LocalFile(this,c,a,null==b),d,e,g,m)}catch(p){q(),this.handleError(p)}}};
+App.prototype.fileCreated=function(a,c,d,b,g){var e=window.location.pathname;null!=c&&0<c.length&&(e+="?libs="+c);null!=g&&0<g.length&&(e+="?clibs="+g);e=this.getUrl(e);a.getMode()!=App.MODE_DEVICE&&(e+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var k=a.getData(),k=0<k.length?this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,!0):null,n=window.location.protocol+"//"+window.location.hostname+e,m=k,q=null;null!=k&&/\.svg$/i.test(a.getTitle())&&
+(q=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(q.container),m=this.decodeNodeIntoGraph(m,q));a.setData(this.createFileData(k,q,a,n));null!=q&&q.container.parentNode.removeChild(q.container);var f=mxUtils.bind(this,function(){this.spinner.stop()}),l=mxUtils.bind(this,function(){f();var k=this.getCurrentFile();null==d&&null!=k&&(d=!k.isModified()&&null==k.getMode());var m=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);d&&a.addAllSavedStatus();
null!=c&&this.sidebar.showEntries(c);if(null!=g){for(var b=[],e=g.split(";"),f=0;f<e.length;f++)b.push(decodeURIComponent(e[f]));this.loadLibraries(b)}}),l=mxUtils.bind(this,function(){d||null==k||!k.isModified()?m():this.confirm(mxResources.get("allChangesLost"),null,m,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=b&&b();null==d||d?l():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),
null==a.getMode())),null!=b&&b(),window.openWindow(e,null,l))});a.constructor==LocalFile?l():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,function(){l()}),mxUtils.bind(this,function(a){f();this.handleError(a)}))}};
App.prototype.loadFile=function(a,c,d,b,g){this.hideDialog();var e=mxUtils.bind(this,function(){if(null==a||0==a.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage)try{a=decodeURIComponent(a.substring(1));var e=localStorage.getItem(a);if(null!=e)this.fileLoaded(new StorageFile(this,e,a)),null!=b&&b();else throw{message:mxResources.get("fileNotFound")};}catch(p){this.handleError(p,
@@ -9231,8 +9241,8 @@ mxResources.get("browser")+")":a.constructor==LocalLibrary&&(c+=" ("+mxResources
App.prototype.loadLibraries=function(a,c){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var d=mxUtils.bind(this,function(a,b){b||mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),b=0,g=[],e=mxUtils.bind(this,function(){if(0==b){if(null!=a)for(var d=a.length-1;0<=d;d--)null!=g[d]&&this.loadLibrary(g[d]);null!=c&&c()}});if(null!=a)for(var k=0;k<a.length;k++){var n=encodeURIComponent(decodeURIComponent(a[k]));mxUtils.bind(this,function(a,c){if(null!=
a&&0<a.length&&null==this.pendingLibraries[a]&&null==this.sidebar.palettes[a]){b++;var f=mxUtils.bind(this,function(d){delete this.pendingLibraries[a];g[c]=d;b--;e()}),k=mxUtils.bind(this,function(c){d(a,c);b--;e()});this.pendingLibraries[a]=!0;var m=a.substring(0,1);if("L"==m)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var b=decodeURIComponent(a.substring(1));this.getLocalData(b,mxUtils.bind(this,function(a){".scratchpad"==b&&null==a&&(a=this.emptyLibraryXml);
null!=a?f(new StorageLibrary(this,a,b)):k()}))}catch(y){k()}}),0);else if("U"==m){var n=decodeURIComponent(a.substring(1));if(!this.isOffline()){m=n;this.editor.isCorsEnabledForUrl(m)||(m="t="+(new Date).getTime(),m=PROXY_URL+"?url="+encodeURIComponent(n)+"&"+m);try{mxUtils.get(m,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{f(new UrlLibrary(this,a.getText(),n))}catch(y){k()}else k()}),function(){k()})}catch(x){k()}}}else if("R"==m){if(m=decodeURIComponent(a.substring(1)),
-!this.isOffline())try{var m=JSON.parse(m),t={id:m[0],title:m[1],downloadUrl:m[2]};this.remoteInvoke("getFileContent",[t.downloadUrl],null,mxUtils.bind(this,function(a){try{f(new RemoteLibrary(this,a,t))}catch(y){k()}}),function(){k()})}catch(x){k()}}else if("S"==m&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(a.substring(1)),function(a){f(a)},k)}catch(x){k()}else{var q=null;"G"==m?null!=this.drive&&null!=this.drive.user&&(q=this.drive):"H"==m?null!=this.gitHub&&null!=this.gitHub.getUser()&&
-(q=this.gitHub):"T"==m?null!=this.trello&&this.trello.isAuthorized()&&(q=this.trello):"D"==m?null!=this.dropbox&&null!=this.dropbox.getUser()&&(q=this.dropbox):"W"==m&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(q=this.oneDrive);null!=q?q.getLibrary(decodeURIComponent(a.substring(1)),mxUtils.bind(this,function(a){try{f(a)}catch(y){k()}}),function(a){k()}):k(!0)}}})(n,k)}e()}};
+!this.isOffline())try{var m=JSON.parse(m),q={id:m[0],title:m[1],downloadUrl:m[2]};this.remoteInvoke("getFileContent",[q.downloadUrl],null,mxUtils.bind(this,function(a){try{f(new RemoteLibrary(this,a,q))}catch(y){k()}}),function(){k()})}catch(x){k()}}else if("S"==m&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(a.substring(1)),function(a){f(a)},k)}catch(x){k()}else{var t=null;"G"==m?null!=this.drive&&null!=this.drive.user&&(t=this.drive):"H"==m?null!=this.gitHub&&null!=this.gitHub.getUser()&&
+(t=this.gitHub):"T"==m?null!=this.trello&&this.trello.isAuthorized()&&(t=this.trello):"D"==m?null!=this.dropbox&&null!=this.dropbox.getUser()&&(t=this.dropbox):"W"==m&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(t=this.oneDrive);null!=t?t.getLibrary(decodeURIComponent(a.substring(1)),mxUtils.bind(this,function(a){try{f(a)}catch(y){k()}}),function(a){k()}):k(!0)}}})(n,k)}e()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var a=this.getCurrentFile();this.commentsSupported()?null==this.commentButton&&(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton",this.commentButton.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;float:left;cursor:pointer;width:24px;height:24px;background-size:24px 24px;background-position:center center;background-repeat:no-repeat;background-image:url("+
Editor.commentImage+");","atlas"==uiTheme?(this.commentButton.style.marginRight="10px",this.commentButton.style.marginTop="-3px"):this.commentButton.style.marginTop="min"==uiTheme?"1px":"-5px",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton),"dark"==uiTheme||"atlas"==uiTheme)&&(this.commentButton.style.filter="invert(100%)"):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),
this.commentButton=null);null!=a&&a.constructor==DriveFile?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.backgroundColor="#F2931E",this.shareButton.style.borderColor="#F08705",this.shareButton.style.backgroundImage="none",this.shareButton.style.padding="2px 10px 0 10px",this.shareButton.style.marginTop="-10px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight=
@@ -9249,9 +9259,9 @@ App.prototype.descriptorChanged=function(){var a=this.getCurrentFile();if(null!=
window.location.hash=a:0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null!=this.format&&this.editor.graph.isSelectionEmpty()&&this.format.refresh()};
App.prototype.showAuthDialog=function(a,c,d,b){var g=this.spinner.pause();this.showDialog((new AuthDialog(this,a,c,mxUtils.bind(this,function(a){try{null!=d&&d(a,mxUtils.bind(this,function(){this.hideDialog();g()}))}catch(k){this.editor.setStatus(mxUtils.htmlEntities(k.message))}}))).container,300,c?180:140,!0,!0,mxUtils.bind(this,function(a){null!=b&&b();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
App.prototype.convertFile=function(a,c,d,b,g,e){var k=c;/\.svg$/i.test(k)||(k=k.substring(0,c.lastIndexOf("."))+b);var n=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(n=!0);if(/\.v(dx|sdx?)$/i.test(c)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var m=new XMLHttpRequest;m.open("GET",a,!0);n||(m.responseType="blob");m.onload=mxUtils.bind(this,function(){if(200<=m.status&&299>=m.status){var a=null;n?(a=
-JSON.parse(m.responseText),a=this.base64ToBlob(a.content,"application/octet-stream")):a=new Blob([m.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){g(new LocalFile(this,a,k,!0))}),e,c)}else null!=e&&e({message:mxResources.get("errorLoadingFile")})});m.onerror=e;m.send()}else{var t=mxUtils.bind(this,function(b){try{/\.png$/i.test(c)?(temp=this.extractGraphModelFromPng(b),null!=temp?g(new LocalFile(this,temp,k,!0)):g(new LocalFile(this,b,c,!0))):Graph.fileSupport&&
+JSON.parse(m.responseText),a=this.base64ToBlob(a.content,"application/octet-stream")):a=new Blob([m.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){g(new LocalFile(this,a,k,!0))}),e,c)}else null!=e&&e({message:mxResources.get("errorLoadingFile")})});m.onerror=e;m.send()}else{var q=mxUtils.bind(this,function(b){try{/\.png$/i.test(c)?(temp=this.extractGraphModelFromPng(b),null!=temp?g(new LocalFile(this,temp,k,!0)):g(new LocalFile(this,b,c,!0))):Graph.fileSupport&&
(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,a)?this.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(new LocalFile(this,a.responseText,k,!0)):null!=e&&e({message:mxResources.get("errorLoadingFile")}))}),c):g(new LocalFile(this,b,k,!0))}catch(l){null!=e&&e(l)}});d=/\.png$/i.test(c)||/\.jpe?g$/i.test(c)||null!=d&&"image/"==d.substring(0,6);n?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&
-299>=a.getStatus()){if(null!=g){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(c)?"data:image/png;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));t(b)}}else null!=e&&e({code:App.ERROR_UNKNOWN})}),function(){null!=e&&e({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=e&&e({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,t,e,d)}};
+299>=a.getStatus()){if(null!=g){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(c)?"data:image/png;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));q(b)}}else null!=e&&e({code:App.ERROR_UNKNOWN})}),function(){null!=e&&e({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=e&&e({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,q,e,d)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="28px";this.appIcon.style.height=this.menubarHeight-28+"px";this.appIcon.style.margin="14px 0px 8px 20px";this.appIcon.style.opacity="0.75";this.appIcon.style.borderRadius="3px";"dark"!=uiTheme&&(this.appIcon.style.backgroundColor="#f08705");mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,
"click",mxUtils.bind(this,function(a){this.appIconClicked(a)}));var a=mxClient.IS_SVG?"dark"==uiTheme?"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+)":
"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJFYmVuZV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMjI1IDIyNSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjI1IDIyNTsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MXtmaWxsOiNERjZDMEM7fQoJLnN0MntmaWxsOiNGRkZGRkY7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QxIiBkPSJNMjI1LDIxNS40YzAsNS4zLTQuMyw5LjYtOS41LDkuNmwwLDBINzcuMWwtNDQuOC00NS41TDYwLjIsMTM0bDgyLjctMTAyLjdsODIuMSw4NC41VjIxNS40eiIvPgo8cGF0aCBjbGFzcz0ic3QyIiBkPSJNMTg0LjYsMTI1LjhoLTIzLjdsLTI1LTQyLjdjNS43LTEuMiw5LjgtNi4yLDkuNy0xMlYzOWMwLTYuOC01LjQtMTIuMy0xMi4yLTEyLjNoLTAuMUg5MS42CgljLTYuOCwwLTEyLjMsNS40LTEyLjMsMTIuMlYzOXYzMi4xYzAsNS44LDQsMTAuOCw5LjcsMTJsLTI1LDQyLjdINDAuNGMtNi44LDAtMTIuMyw1LjQtMTIuMywxMi4ydjAuMXYzMi4xCgljMCw2LjgsNS40LDEyLjMsMTIuMiwxMi4zaDAuMWg0MS43YzYuOCwwLDEyLjMtNS40LDEyLjMtMTIuMnYtMC4xdi0zMi4xYzAtNi44LTUuNC0xMi4zLTEyLjItMTIuM2gtMC4xaC00bDI0LjgtNDIuNGgxOS4zCglsMjQuOSw0Mi40SDE0M2MtNi44LDAtMTIuMyw1LjQtMTIuMywxMi4ydjAuMXYzMi4xYzAsNi44LDUuNCwxMi4zLDEyLjIsMTIuM2gwLjFoNDEuN2M2LjgsMCwxMi4zLTUuNCwxMi4zLTEyLjJ2LTAuMXYtMzIuMQoJYzAtNi44LTUuNC0xMi4zLTEyLjItMTIuM0MxODQuNywxMjUuOCwxODQuNywxMjUuOCwxODQuNiwxMjUuOHoiLz4KPC9zdmc+Cg==)":
@@ -9295,19 +9305,19 @@ App.prototype.getCurrentUser=function(){var a=null;null!=this.drive&&null!=this.
Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);this.graph.pageFormat=mxSettings.getPageFormat()};(function(){var a=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){a.apply(this,arguments);this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-10+"px"};Menus.prototype.createHelpLink=function(a){var b=document.createElement("span");b.setAttribute("title",mxResources.get("help"));b.style.cssText="color:blue;text-decoration:underline;margin-left:8px;cursor:help;";
var c=document.createElement("img");mxUtils.setOpacity(c,50);c.style.height="16px";c.style.width="16px";c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);b.appendChild(c);mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){null!=this.editorUi.menubar&&this.editorUi.menubar.hideMenu();this.editorUi.openLink(a);mxEvent.consume(b)}));return b};Menus.prototype.addLinkToItem=function(a,b){null!=a&&a.firstChild.nextSibling.appendChild(this.createHelpLink(b))};
var c=Menus.prototype.init;Menus.prototype.init=function(){function a(a,b){this.ui=a;this.previousExtFonts=this.extFonts=b}c.apply(this,arguments);var b=this.editorUi,g=b.editor.graph,e=mxUtils.bind(g,g.isEnabled),k=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),n=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==
-document.documentMode||9<document.documentMode),m=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),t=("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&mxClient.IS_SVG&&(null==document.documentMode||
+document.documentMode||9<document.documentMode),m=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),q=("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&mxClient.IS_SVG&&(null==document.documentMode||
9<document.documentMode);mxClient.IS_SVG||b.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");b.actions.addAction("new...",function(){var a=b.isOffline(),c=new NewDialog(b,a);b.showDialog(c.container,a?350:620,a?70:440,!0,!0,function(a){a&&null==b.getCurrentFile()&&b.showSplash()});c.init()});b.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){b.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",
-mxUtils.bind(this,function(a,c,d,e,f,g,k,l,m,n){a=parseInt(a);!isNaN(a)&&0<a&&b.exportSvg(a/100,c,d,e,f,g,k,!l,m,n)}),!0,null,"svg")}));b.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){var a=new NewDialog(b,null,!1,function(a){b.hideDialog();if(null!=a){var c=b.editor.graph.getFreeInsertPoint();g.setSelectionCells(b.importXml(a,Math.max(c.x,20),Math.max(c.y,20),!0));g.scrollCellToVisible(g.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,
+mxUtils.bind(this,function(a,c,d,e,f,g,k,m,l,n){a=parseInt(a);!isNaN(a)&&0<a&&b.exportSvg(a/100,c,d,e,f,g,k,!m,l,n)}),!0,null,"svg")}));b.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){var a=new NewDialog(b,null,!1,function(a){b.hideDialog();if(null!=a){var c=b.editor.graph.getFreeInsertPoint();g.setSelectionCells(b.importXml(a,Math.max(c.x,20),Math.max(c.y,20),!0));g.scrollCellToVisible(g.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,
!1,mxResources.get("insert"));b.showDialog(a.container,620,440,!0,!0)})).isEnabled=e;var f=b.actions.addAction("points",function(){b.editor.graph.view.setUnit(mxConstants.POINTS)});f.setToggleAction(!0);f.setSelectedCallback(function(){return b.editor.graph.view.unit==mxConstants.POINTS});f=b.actions.addAction("inches",function(){b.editor.graph.view.setUnit(mxConstants.INCHES)});f.setToggleAction(!0);f.setSelectedCallback(function(){return b.editor.graph.view.unit==mxConstants.INCHES});f=b.actions.addAction("millimeters",
function(){b.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});f.setToggleAction(!0);f.setSelectedCallback(function(){return b.editor.graph.view.unit==mxConstants.MILLIMETERS});this.put("units",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["points","millimeters"],b)})));f=b.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=b.ruler?(b.ruler.destroy(),b.ruler=null):b.ruler=new mxDualRuler(b,b.editor.graph.view.unit);b.refresh()});
f.setEnabled(b.canvasSupported&&9!=document.documentMode);f.setToggleAction(!0);f.setSelectedCallback(function(){return null!=b.ruler});window.mxFreehand&&(b.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(a){g.isEnabled()&&(null==this.freehandWindow&&(this.freehandWindow=new FreehandWindow(b,document.body.offsetWidth-420,102,176,104)),g.freehand.isDrawing()?g.freehand.stopDrawing():g.freehand.startDrawing(),this.freehandWindow.window.setVisible(g.freehand.isDrawing()))})).isEnabled=
function(){return e()&&mxClient.IS_SVG});b.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var a=document.createElement("div");a.style.whiteSpace="nowrap";var c=null==b.pages||1>=b.pages.length,d=document.createElement("h3");mxUtils.write(d,mxResources.get("formatXml"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";a.appendChild(d);var e=b.addCheckbox(a,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),f=b.addCheckbox(a,mxResources.get("compressed"),
!0),k=b.addCheckbox(a,mxResources.get("allPages"),!c,c);k.style.marginBottom="16px";mxEvent.addListener(e,"change",function(){e.checked?k.setAttribute("disabled","disabled"):k.removeAttribute("disabled")});a=new CustomDialog(b,a,mxUtils.bind(this,function(){b.downloadFile("xml",!f.checked,null,!e.checked,c||!k.checked)}),null,mxResources.get("export"));b.showDialog(a.container,300,180,!0,!0)}));b.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){b.showPublishLinkDialog(mxResources.get("url"),
-!0,null,null,function(a,c,d,e,f,g){a=new EmbedDialog(b,b.createLink(a,c,d,e,f,g,null,!0));b.showDialog(a.container,440,240,!0,!0);a.init()})}));b.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(a){b.spinner.stop();b.showHtmlDialog(mxResources.get("export"),null,a,function(a,c,d,e,f,g,k,l,m,n){b.createHtml(a,c,d,e,f,g,k,l,m,n,mxUtils.bind(this,function(a,c){var d=
-b.getBaseFilename(k),e='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(d)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+a+"\n"+c+"\n</body>\n</html>";b.saveData(d+".html","html",e,"text/html")}))})})}));b.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if("undefined"!==typeof mxIsElectron5&&mxIsElectron5||!b.isOffline()&&!b.printPdfExport){var a=null==b.pages||
-1>=b.pages.length,c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxResources.get("formatPdf"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(d);var d=function(){f!=this&&this.checked?l.removeAttribute("disabled"):(l.setAttribute("disabled","disabled"),l.checked=!1)},e=172;if(b.pdfPageExport&&!a){var f=b.addRadiobox(c,"pages",mxResources.get("allPages"),!0),e=b.addRadiobox(c,"pages",mxResources.get("currentPage"),
-!1),k=b.addRadiobox(c,"pages",mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),l=b.addCheckbox(c,mxResources.get("crop"),!1,!0),m=b.addCheckbox(c,mxResources.get("grid"),!1,!1);mxEvent.addListener(f,"change",d);mxEvent.addListener(e,"change",d);mxEvent.addListener(k,"change",d);e=240}else k=b.addCheckbox(c,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),l=b.addCheckbox(c,mxResources.get("crop"),!g.pageVisible||!b.pdfPageExport,!b.pdfPageExport),m=b.addCheckbox(c,mxResources.get("grid"),
-!1,!1),b.pdfPageExport||mxEvent.addListener(k,"change",d);c=new CustomDialog(b,c,mxUtils.bind(this,function(){b.downloadFile("pdf",null,null,!k.checked,a?!0:!f.checked,!l.checked,null,null,null,m.checked)}),null,mxResources.get("export"));b.showDialog(c.container,300,e,!0,!0)}else b.showDialog((new PrintDialog(b,mxResources.get("formatPdf"))).container,360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)}));b.actions.addAction("open...",function(){b.pickFile()});b.actions.addAction("close",function(){function a(){b.fileLoaded(null)}
+!0,null,null,function(a,c,d,e,f,k){a=new EmbedDialog(b,b.createLink(a,c,d,e,f,k,null,!0));b.showDialog(a.container,440,240,!0,!0);a.init()})}));b.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(a){b.spinner.stop();b.showHtmlDialog(mxResources.get("export"),null,a,function(a,c,d,e,f,k,g,m,l,n){b.createHtml(a,c,d,e,f,k,g,m,l,n,mxUtils.bind(this,function(a,c){var d=
+b.getBaseFilename(g),e='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(d)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+a+"\n"+c+"\n</body>\n</html>";b.saveData(d+".html","html",e,"text/html")}))})})}));b.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if("undefined"!==typeof mxIsElectron5&&mxIsElectron5||!b.isOffline()&&!b.printPdfExport){var a=null==b.pages||
+1>=b.pages.length,c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxResources.get("formatPdf"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(d);var d=function(){f!=this&&this.checked?m.removeAttribute("disabled"):(m.setAttribute("disabled","disabled"),m.checked=!1)},e=172;if(b.pdfPageExport&&!a){var f=b.addRadiobox(c,"pages",mxResources.get("allPages"),!0),e=b.addRadiobox(c,"pages",mxResources.get("currentPage"),
+!1),k=b.addRadiobox(c,"pages",mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),m=b.addCheckbox(c,mxResources.get("crop"),!1,!0),l=b.addCheckbox(c,mxResources.get("grid"),!1,!1);mxEvent.addListener(f,"change",d);mxEvent.addListener(e,"change",d);mxEvent.addListener(k,"change",d);e=240}else k=b.addCheckbox(c,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),m=b.addCheckbox(c,mxResources.get("crop"),!g.pageVisible||!b.pdfPageExport,!b.pdfPageExport),l=b.addCheckbox(c,mxResources.get("grid"),
+!1,!1),b.pdfPageExport||mxEvent.addListener(k,"change",d);c=new CustomDialog(b,c,mxUtils.bind(this,function(){b.downloadFile("pdf",null,null,!k.checked,a?!0:!f.checked,!m.checked,null,null,null,l.checked)}),null,mxResources.get("export"));b.showDialog(c.container,300,e,!0,!0)}else b.showDialog((new PrintDialog(b,mxResources.get("formatPdf"))).container,360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)}));b.actions.addAction("open...",function(){b.pickFile()});b.actions.addAction("close",function(){function a(){b.fileLoaded(null)}
var c=b.getCurrentFile();null!=c&&c.isModified()?b.confirm(mxResources.get("allChangesLost"),null,a,mxResources.get("cancel"),mxResources.get("discardChanges")):a()});b.actions.addAction("editShape...",mxUtils.bind(this,function(){g.getSelectionCells();if(1==g.getSelectionCount()){var a=g.getSelectionCell(),c=g.view.getState(a);null!=c&&null!=c.shape&&null!=c.shape.stencil&&(a=new EditShapeDialog(b,a,mxResources.get("editShape")+":",630,400),b.showDialog(a.container,640,480,!0,!1),a.init())}}));b.actions.addAction("revisionHistory...",
function(){b.isRevisionHistorySupported()?b.spinner.spin(document.body,mxResources.get("loading"))&&b.getRevisions(mxUtils.bind(this,function(a,c){b.spinner.stop();var d=new RevisionDialog(b,a,c);b.showDialog(d.container,640,480,!0,!0);d.init()}),mxUtils.bind(this,function(a){b.handleError(a)})):b.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});b.actions.addAction("createRevision",function(){b.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");
f=b.actions.addAction("synchronize",function(){b.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(f.label=mxResources.get("refresh"));b.actions.addAction("upload...",function(){var a=b.getCurrentFile();null!=a&&(window.drawdata=b.getFileData(),a=null!=a.getTitle()?a.getTitle():b.defaultFilename,b.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(b.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(a),
@@ -9316,8 +9326,8 @@ f.setSelectedCallback(function(){return mxSettings.getShowStartScreen()});var l=
null,null,Editor.ctrlKey+"+Shift+M");var p="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize".split(" ");b.actions.addAction("copyStyle",function(){var a=
g.view.getState(g.getSelectionCell());if(g.isEnabled()&&null!=a){b.copiedStyle=mxUtils.clone(a.style);for(var a=g.getModel().getStyle(a.cell),a=null!=a?a.split(";"):[],c=0;c<a.length;c++){var d=a[c],e=d.indexOf("=");if(0<=e){var f=d.substring(0,e),d=d.substring(e+1);null==b.copiedStyle[f]&&"none"==d&&(b.copiedStyle[f]="none")}}}},null,null,Editor.ctrlKey+"+Shift+C");b.actions.addAction("pasteStyle",function(){if(g.isEnabled()&&!g.isSelectionEmpty()&&null!=b.copiedStyle){g.getModel().beginUpdate();
try{for(var a=g.getSelectionCells(),c=0;c<a.length;c++)for(var d=g.view.getState(a[c]),e=0;e<p.length;e++){var f=p[e],k=b.copiedStyle[f];d.style[f]!=k&&g.setCellStyles(f,k,[a[c]])}}finally{g.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");b.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!b.isOffline()){var a=new BackgroundImageDialog(b,function(a){b.setBackgroundImage(a)});b.showDialog(a.container,320,170,!0,!0);a.init()}}));b.actions.put("exportPng",
-new Action(mxResources.get("formatPng")+"...",function(){b.isExportToCanvas()?b.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,c,d,e,f,g,k,l,m,n,p){a=parseInt(a);!isNaN(a)&&0<a&&b.exportImage(a/100,c,d,e,f,k,!l,m,null,p)}),!0,!0,"png"):b.isOffline()||mxClient.IS_IOS&&navigator.standalone||b.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,c,d,e,f){b.downloadFile(c?
-"xmlpng":"png",null,null,a,null,null,d,e,f)}),!1,!0)}));b.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){b.isExportToCanvas()?b.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,c,d,e,f,g,k,l,m,n,p){a=parseInt(a);!isNaN(a)&&0<a&&b.exportImage(a/100,!1,d,e,!1,k,!l,!1,"jpeg",p)}),!0,!1,"jpeg"):b.isOffline()||mxClient.IS_IOS&&navigator.standalone||b.showRemoteExportDialog(mxResources.get("export"),
+new Action(mxResources.get("formatPng")+"...",function(){b.isExportToCanvas()?b.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,c,d,e,f,k,g,m,l,n,p){a=parseInt(a);!isNaN(a)&&0<a&&b.exportImage(a/100,c,d,e,f,g,!m,l,null,p)}),!0,!0,"png"):b.isOffline()||mxClient.IS_IOS&&navigator.standalone||b.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,c,d,e,f){b.downloadFile(c?
+"xmlpng":"png",null,null,a,null,null,d,e,f)}),!1,!0)}));b.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){b.isExportToCanvas()?b.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,c,d,e,f,k,g,m,l,n,p){a=parseInt(a);!isNaN(a)&&0<a&&b.exportImage(a/100,!1,d,e,!1,g,!m,!1,"jpeg",p)}),!0,!1,"jpeg"):b.isOffline()||mxClient.IS_IOS&&navigator.standalone||b.showRemoteExportDialog(mxResources.get("export"),
null,mxUtils.bind(this,function(a,c,d,e,f){b.downloadFile("jpeg",null,null,a,null,null,null,e,f)}),!0,!0)}));f=b.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){g.setShadowVisible(!g.shadowVisible)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return g.shadowVisible});var u=!1;b.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){u||(b.showDialog((new AboutDialog(b)).container,220,300,!0,!0,function(){u=!1}),u=!0)},null,null,"F1"));
b.actions.addAction("userManual...",function(){b.openLink("https://support.draw.io/display/DO/Draw.io+Online+User+Manual")});b.actions.addAction("support...",function(){b.openLink("https://about.draw.io/support/")});b.actions.addAction("exportOptionsDisabled...",function(){b.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});b.actions.addAction("keyboardShortcuts...",function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.openLink("https://www.draw.io/shortcuts.svg"):
mxClient.IS_SVG?b.openLink("shortcuts.svg"):b.openLink("https://www.draw.io/?lightbox=1#Uhttps%3A%2F%2Fwww.draw.io%2Fshortcuts.svg")});b.actions.addAction("feedback...",function(){var a=new FeedbackDialog(b);b.showDialog(a.container,610,360,!0,!1);a.init()});b.actions.addAction("quickStart...",function(){b.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});f=b.actions.addAction("tags...",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(b,document.body.offsetWidth-
@@ -9330,89 +9340,89 @@ f=new EmbedDialog(b,e);b.showDialog(f.container,440,240,!0);f.init()}catch(J){b.
if(null!=b){var c=this.get("language");if(null!=c){c=b.addMenu("",c.funct);c.setAttribute("title",mxResources.get("language"));c.style.width="16px";c.style.paddingTop="2px";c.style.paddingLeft="4px";c.style.zIndex="1";c.style.position="absolute";c.style.display="block";c.style.cursor="pointer";c.style.right="17px";"atlas"==uiTheme?(c.style.top="6px",c.style.right="15px"):c.style.top="min"==uiTheme?"2px":"0px";if(mxClient.IS_VML)c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>';else{var d=
document.createElement("div");d.style.backgroundImage="url("+Editor.globeImage+")";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";d.style.backgroundSize="19px 19px";d.style.position="absolute";d.style.height="19px";d.style.width="19px";d.style.marginTop="2px";d.style.zIndex="1";c.appendChild(d);mxUtils.setOpacity(c,40);if("atlas"==uiTheme||"dark"==uiTheme)c.style.opacity="0.85",c.style.filter="invert(100%)"}document.body.appendChild(c)}}return b}}b.customLayoutConfig=
[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];b.actions.addAction("runLayout",function(){var a=new TextareaDialog(b,"Run Layouts:",JSON.stringify(b.customLayoutConfig,null,2),function(a){if(0<a.length)try{var c=JSON.parse(a);b.executeLayoutList(c);b.customLayoutConfig=c}catch(A){b.handleError(A),null!=window.console&&console.error(A)}});a.textarea.style.width="600px";a.textarea.style.height=
-"380px";b.showDialog(a.container,620,460,!0,!0);a.init()});var f=this.get("layout"),q=f.funct;f.funct=function(a,c){q.apply(this,arguments);a.addSeparator(c);b.menus.addMenuItem(a,"runLayout",c,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(a,c){if(!mxClient.IS_CHROMEAPP&&b.isOffline())this.addMenuItems(a,["about"],c);else{var d=a.addItem("Search:",null,null,c,null,null,!1);d.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";d.style.cursor=
+"380px";b.showDialog(a.container,620,460,!0,!0);a.init()});var f=this.get("layout"),t=f.funct;f.funct=function(a,c){t.apply(this,arguments);a.addSeparator(c);b.menus.addMenuItem(a,"runLayout",c,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(a,c){if(!mxClient.IS_CHROMEAPP&&b.isOffline())this.addMenuItems(a,["about"],c);else{var d=a.addItem("Search:",null,null,c,null,null,!1);d.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";d.style.cursor=
"default";var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("size","25");e.style.marginLeft="8px";mxEvent.addListener(e,"keydown",mxUtils.bind(this,function(a){var b=mxUtils.trim(e.value);13==a.keyCode&&0<b.length?(this.editorUi.openLink("https://desk.draw.io/support/search/solutions?term="+encodeURIComponent(b)),e.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:b}),null!=this.editorUi.menubar&&window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),
-0)):27==a.keyCode&&(e.value="")}));d.firstChild.nextSibling.appendChild(e);mxEvent.addGestureListeners(e,function(a){document.activeElement!=e&&e.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){e.focus()},0);this.addMenuItems(a,["-","keyboardShortcuts","quickStart","userManual","-"],c);mxClient.IS_CHROMEAPP||this.addMenuItems(a,["feedback"],c);this.addMenuItems(a,["support","-"],c);EditorUi.isElectronApp||navigator.standalone||
-"1"==urlParams.embed||this.addMenuItems(a,["downloadDesktop"],c);navigator.standalone||"1"==urlParams.embed||this.addMenuItems(a,["useOffline"],c);this.addMenuItems(a,["-","about"],c)}"1"==urlParams.test&&(a.addSeparator(c),this.addSubmenu("testDevelop",a,c))})));"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"),
-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"),b.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){g.isSelectionEmpty()||b.showTextDialog("Create Sidebar Entry","sb.createVertexTemplateFromData('"+Graph.compress(mxUtils.getXml(g.encodeCells(g.getSelectionCells())))+"', width, height, 'Title');")})),
-b.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=g.getGraphBounds(),b=g.view.translate,c=g.view.scale;g.insertVertex(g.getDefaultParent(),null,"",a.x/c-b.x,a.y/c-b.y,a.width/c,a.height/c,"fillColor=none;strokeColor=red;")})),b.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var a=null!=b.pages&&null!=b.getCurrentFile()?b.getCurrentFile().getAnonymizedXmlForPages(b.pages):"",a=new TextareaDialog(b,"Paste Data:",a,function(a){if(0<a.length)try{var c=function(a){function b(a){if(null==
-n[a]){if(n[a]=!0,null!=e[a]){for(;0<e[a].length;){var d=e[a].pop();b(d)}delete e[a]}}else mxLog.debug(c+": Visited: "+a)}var c=a.parentNode.id,d=a.childNodes;a={};for(var e={},f=null,g={},k=0;k<d.length;k++){var l=d[k];if(null!=l.id&&0<l.id.length)if(null==a[l.id]){a[l.id]=l.id;var m=l.getAttribute("parent");null==m?null!=f?mxLog.debug(c+": Multiple roots: "+l.id):f=l.id:(null==e[m]&&(e[m]=[]),e[m].push(l.id))}else g[l.id]=l.id}0<Object.keys(g).length?(d=c+": "+Object.keys(g).length+" Duplicates: "+
-Object.keys(g).join(", "),mxLog.debug(d+" (see console)")):mxLog.debug(c+": Checked");var n={};null==f?mxLog.debug(c+": No root"):(b(f),Object.keys(n).length!=Object.keys(a).length&&(mxLog.debug(c+": Invalid tree: (see console)"),console.log(c+": Invalid tree",e)))};"<"!=a.charAt(0)&&(a=Graph.decompress(a),mxLog.debug("See console for uncompressed XML"),console.log("xml",a));var d=mxUtils.parseXml(a),e=b.getPagesForNode(d.documentElement,"mxGraphModel");if(null!=e&&0<e.length)try{var f=b.getHashValueForPages(e);
-mxLog.debug("Checksum: ",f)}catch(H){mxLog.debug("Error: ",H.message)}else mxLog.debug("No pages found for checksum");var g=d.getElementsByTagName("root");for(a=0;a<g.length;a++)c(g[a]);mxLog.show()}catch(H){b.handleError(H),null!=window.console&&console.error(H)}});a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!0);a.init()})),b.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=b.pages){var a=new TextareaDialog(b,"Paste Data:",
-"",function(a){if(0<a.length)try{console.log(JSON.stringify(b.diffPages(b.pages,b.getPagesForNode(mxUtils.parseXml(a).documentElement)),null,2))}catch(C){b.handleError(C),null!=window.console&&console.error(C)}});a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!0);a.init()}else b.alert("No pages")})),b.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(b,g.getModel())})),b.actions.addAction("testXmlImageExport",mxUtils.bind(this,
-function(){var a=new mxImageExport,b=g.getGraphBounds(),c=g.view.scale,d=mxUtils.createXmlDocument(),e=d.createElement("output");d.appendChild(e);d=new mxXmlCanvas2D(e);d.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));d.scale(1/c);var f=0,k=d.save;d.save=function(){f++;k.apply(this,arguments)};var l=d.restore;d.restore=function(){f--;l.apply(this,arguments)};var m=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,f);m.apply(this,arguments);mxLog.debug("leaving shape",a,f)};
-a.drawState(g.getView().getState(g.model.root),d);mxLog.show();mxLog.debug(mxUtils.getXml(e));mxLog.debug("stateCounter",f)})),b.actions.addAction("testDownloadRtModel...",mxUtils.bind(this,function(){null==b.drive?b.handleError({message:mxResources.get("serviceUnavailableOrBlocked")}):b.drive.execute(mxUtils.bind(this,function(){var a=prompt("File ID","");if(null!=a&&0<a.length&&b.spinner.spin(document.body,mxResources.get("export"))){var c=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+
-a+"/realtime?supportsTeamDrives=true",null,"GET");c.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,arguments);a.setRequestHeader("authorization","Bearer "+b.drive.token)};c.send(function(c){b.spinner.stop();200<=c.getStatus()&&299>=c.getStatus()?b.saveLocalFile(c.getText(),"json-"+a+".txt","text/plain"):b.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))})}}))})),b.actions.addAction("testShowConsole",function(){mxLog.isVisible()?
-mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.put("testDevelop",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,"createSidebarEntry showBoundingBox - testCheckFile testDiff - testInspect - testXmlImageExport - testDownloadRtModel".split(" "),c);a.addItem(mxResources.get("testImportRtModel")+"...",null,function(){var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,"change",mxUtils.bind(this,function(){if(null!=
-a.files){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{b.openLocalFile(mxUtils.getXml(b.drive.convertJsonToXml(JSON.parse(c.target.result).data)),a.files[0].name,!0)}catch(F){b.handleError(F,mxResources.get("errorLoadingFile"))}});c.readAsText(a.files[0])}}));a.click()},c);this.addMenuItems(a,["-","testShowConsole"],c)}))));b.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!b.isOffline()?b.showDialog((new MoreShapesDialog(b,!0)).container,640,isLocalStorage?mxClient.IS_IOS?
-480:460:440,!0,!0):b.showDialog((new MoreShapesDialog(b,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});b.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(a){g.isEnabled()&&(a=new mxCell("",new mxGeometry(0,0,120,120),b.defaultCustomShapeStyle),a.vertex=!0,a=new EditShapeDialog(b,a,mxResources.get("editShape")+":",630,400),b.showDialog(a.container,640,480,!0,!1),a.init())})).isEnabled=e;b.actions.put("embedHtml",new Action(mxResources.get("html")+
-"...",function(){b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(a){b.spinner.stop();b.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",a,function(a,c,d,e,f,g,k,l,m,n){b.createHtml(a,c,d,e,f,g,k,l,m,n,mxUtils.bind(this,function(a,c){var d=new EmbedDialog(b,a+"\n"+c,null,null,function(){var d=window.open(),e=d.document;if(null!=e){"CSS1Compat"===document.compatMode&&e.writeln("<!DOCTYPE html>");
-e.writeln("<html>");e.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');e.writeln("<body>");e.writeln(a);var f=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;f&&e.writeln(c);e.writeln("</body>");e.writeln("</html>");e.close();if(!f){var g=d.document.createElement("div");g.marginLeft="26px";g.marginTop="26px";mxUtils.write(g,mxResources.get("updatingDocument"));f=d.document.createElement("img");f.setAttribute("src",window.location.protocol+
-"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");f.style.marginLeft="6px";g.appendChild(f);d.document.body.insertBefore(g,d.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=/<script.*?src="(.*?)"/.exec(c)[1];e.body.appendChild(a);g.parentNode.removeChild(g)},20)}}else b.handleError({message:mxResources.get("errorUpdatingPreview")})});b.showDialog(d.container,440,240,!0,!0);d.init()}))})})}));b.actions.put("liveImage",
-new Action("Live image...",function(){var a=b.getCurrentFile();null!=a&&b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(c){b.spinner.stop();null!=c?(c=new EmbedDialog(b,'<img src="'+(a.constructor!=DriveFile?c:"https://drive.google.com/uc?id="+a.getId())+'"/>'),b.showDialog(c.container,440,240,!0,!0),c.init()):b.handleError({message:mxResources.get("invalidPublicUrl")})})}));b.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){b.showEmbedImageDialog(function(a,
-c,d,e,f,g){b.spinner.spin(document.body,mxResources.get("loading"))&&b.createEmbedImage(a,c,d,e,f,g,function(a){b.spinner.stop();a=new EmbedDialog(b,a);b.showDialog(a.container,440,240,!0,!0);a.init()},function(a){b.spinner.stop();b.handleError(a)})},mxResources.get("image"),mxResources.get("retina"),b.isExportToCanvas())}));b.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){b.showEmbedImageDialog(function(a,c,d,e,f,g){b.spinner.spin(document.body,mxResources.get("loading"))&&
-b.createEmbedSvg(a,c,d,e,f,g,function(a){b.spinner.stop();a=new EmbedDialog(b,a);b.showDialog(a.container,440,240,!0,!0);a.init()},function(a){b.spinner.stop();b.handleError(a)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://desk.draw.io/support/solutions/articles/16000042548")}));b.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var a=g.getGraphBounds();b.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((a.y+a.height-g.view.translate.y)/
-g.view.scale)+2,function(a,c,d,e,f,g,k,l){b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(m){b.spinner.stop();m=new EmbedDialog(b,'<iframe frameborder="0" style="width:'+k+";height:"+l+';" src="'+b.createLink(a,c,d,e,f,g,m)+'"></iframe>');b.showDialog(m.container,440,240,!0,!0);m.init()})},!0)}));b.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){b.showPublishLinkDialog(null,null,null,null,function(a,c,d,e,f,g){b.spinner.spin(document.body,
-mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(k){b.spinner.stop();k=new EmbedDialog(b,b.createLink(a,c,d,e,f,g,k));b.showDialog(k.container,440,240,!0,!0);k.init()})})}));b.actions.addAction("microsoftOffice...",function(){b.openLink("https://office.draw.io")});b.actions.addAction("googleDocs...",function(){b.openLink("http://docsaddon.draw.io")});b.actions.addAction("googleSlides...",function(){b.openLink("https://slidesaddon.draw.io")});b.actions.addAction("googleSheets...",
-function(){b.openLink("https://sheetsaddon.draw.io")});b.actions.addAction("googleSites...",function(){b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(a){b.spinner.stop();a=new GoogleSitesDialog(b,a);b.showDialog(a.container,420,256,!0,!0);a.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)f=b.actions.addAction("scratchpad",function(){b.toggleScratchpad()}),f.setToggleAction(!0),f.setSelectedCallback(function(){return null!=b.scratchpad}),b.actions.addAction("plugins...",
-function(){b.showDialog((new PluginsDialog(b)).container,360,170,!0,!1)});f=b.actions.addAction("search",function(){var a=b.sidebar.isEntryVisible("search");b.sidebar.showPalette("search",!a);isLocalStorage&&(mxSettings.settings.search=!a,mxSettings.save())});f.setToggleAction(!0);f.setSelectedCallback(function(){return b.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(b.actions.get("save").funct=function(a){g.isEditing()&&g.stopEditing();var c="0"!=urlParams.pages||null!=b.pages&&1<b.pages.length?
-b.getFileData(!0):mxUtils.getXml(b.editor.getGraphXml());if("json"==urlParams.proto){var d=b.createLoadMessage("save");d.xml=c;a&&(d.exit=!0);c=JSON.stringify(d)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(b.editor.modified=!1,b.editor.setStatus(""));null!=b.getCurrentFile()&&b.saveFile()},b.actions.addAction("saveAndExit",function(){b.actions.get("save").funct(!0)}),b.actions.addAction("exit",function(){var a=function(){b.editor.modified=
-!1;var a="json"==urlParams.proto?JSON.stringify({event:"exit",modified:b.editor.modified}):"";(window.opener||window.parent).postMessage(a,"*")};b.editor.modified?b.confirm(mxResources.get("allChangesLost"),null,a,mxResources.get("cancel"),mxResources.get("discardChanges")):a()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(a,c){b.isExportToCanvas()?(this.addMenuItems(a,["exportPng"],c),b.jpgSupported&&this.addMenuItems(a,["exportJpg"],c)):b.isOffline()||mxClient.IS_IOS&&navigator.standalone||
-this.addMenuItems(a,["exportPng","exportJpg"],c);this.addMenuItems(a,["exportSvg","-"],c);b.isOffline()||b.printPdfExport?this.addMenuItems(a,["exportPdf"],c):b.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(a,["exportPdf"],c);mxClient.IS_IE||"undefined"===typeof VsdxExport&&b.isOffline()||this.addMenuItems(a,["exportVsdx"],c);this.addMenuItems(a,["-","exportHtml","exportXml","exportUrl"],c);b.isOffline()||(a.addSeparator(c),this.addMenuItem(a,"export",c).firstChild.nextSibling.innerHTML=
-mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(a,c){function d(a){a.pickFile(function(c){b.spinner.spin(document.body,mxResources.get("loading"))&&a.getFile(c,function(a){var c="data:image/"==a.getData().substring(0,11)?f(a.getTitle()):"text/xml";/\.svg$/i.test(a.getTitle())&&!b.editor.isDataSvg(a.getData())&&(a.setData(b.createSvgDataUri(a.getData())),c="image/svg+xml");e(a.getData(),c,a.getTitle())},function(a){b.handleError(a,null!=a?mxResources.get("errorLoadingFile"):
-null)},a==b.drive)},!0)}var e=mxUtils.bind(this,function(a,c,d){var e=g.view,f=g.getGraphBounds(),k=g.snap(Math.ceil(Math.max(0,f.x/e.scale-e.translate.x)+4*g.gridSize)),l=g.snap(Math.ceil(Math.max(0,(f.y+f.height)/e.scale-e.translate.y)+4*g.gridSize));"data:image/"==a.substring(0,11)?b.loadImage(a,mxUtils.bind(this,function(e){var f=!0,m=mxUtils.bind(this,function(){b.resizeImage(e,a,mxUtils.bind(this,function(e,m,n){e=f?Math.min(1,Math.min(b.maxImageSize/m,b.maxImageSize/n)):1;b.importFile(a,c,
-k,l,Math.round(m*e),Math.round(n*e),d,function(a){b.spinner.stop();g.setSelectionCells(a);g.scrollCellToVisible(g.getSelectionCell())})}),f)});a.length>b.resampleThreshold?b.confirmImageResize(function(a){f=a;m()}):m()}),mxUtils.bind(this,function(){b.handleError({message:mxResources.get("cannotOpenFile")})})):b.importFile(a,c,k,l,0,0,d,function(a){b.spinner.stop();g.setSelectionCells(a);g.scrollCellToVisible(g.getSelectionCell())})}),f=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?
-b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=b.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){d(b.drive)},c):k&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){d(b.oneDrive)},c):m&&
-"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+"...",null,function(){d(b.dropbox)},c):n&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){d(b.gitHub)},c);null!=
-b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){d(b.gitLab)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){d(b.trello)},c):t&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.importLocalFile(!1)},c);a.addItem(mxResources.get("device")+"...",
-null,function(){b.importLocalFile(!0)},c);b.isOffline()||(a.addSeparator(c),a.addItem(mxResources.get("url")+"...",null,function(){var a=new FilenameDialog(b,"",mxResources.get("import"),function(a){if(null!=a&&0<a.length&&b.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(a)?"image/png":"text/xml";b.loadUrl(PROXY_URL+"?url="+encodeURIComponent(a),function(b){e(b,c,a)},function(){b.spinner.stop();b.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==
-c)}},mxResources.get("url"));b.showDialog(a.container,300,80,!0,!0);a.init()},c))}))).isEnabled=e;this.put("theme",new Menu(mxUtils.bind(this,function(a,c){var d=mxSettings.getUi(),e=a.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");mxSettings.save();b.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"!=d&&"atlas"!=d&&"dark"!=d&&"min"!=d&&a.addCheckmark(e,Editor.checkmarkImage);a.addSeparator(c);e=a.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("kennedy");
-mxSettings.save();b.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"==d&&a.addCheckmark(e,Editor.checkmarkImage);e=a.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");mxSettings.save();b.alert(mxResources.get("restartForChangeRequired"))},c);"min"==d&&a.addCheckmark(e,Editor.checkmarkImage);e=a.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();b.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==d&&a.addCheckmark(e,
-Editor.checkmarkImage);e=a.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");mxSettings.save();b.alert(mxResources.get("restartForChangeRequired"))},c);"dark"==d&&a.addCheckmark(e,Editor.checkmarkImage)})));f=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();if(null!=a){var c=null!=a.getTitle()?a.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,
-function(b){null!=b&&0<b.length&&null!=a&&b!=a.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&a.rename(b,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}),a.constructor==DriveFile||a.constructor==StorageFile?mxResources.get("diagramName"):null,function(a){if(null!=a&&0<a.length)return!0;b.showError(mxResources.get("error"),mxResources.get("invalidName"),
-mxResources.get("ok"));return!1},null,null,null,null,b.editor.fileExtensions);this.editorUi.showDialog(c.container,340,90,!0,!0);c.init()}}));f.isEnabled=function(){return this.enabled&&e.apply(this,arguments)};f.visible="1"!=urlParams.embed;b.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var a=b.getCurrentFile();if(null!=a){var c=b.getCopyFilename(a);a.constructor==DriveFile?(c=new CreateDialog(b,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&
-(d==App.MODE_GOOGLE?b.spinner.spin(document.body,mxResources.get("saving"))&&a.saveAs(c,mxUtils.bind(this,function(c){a.desc=c;a.save(!1,mxUtils.bind(this,function(){b.spinner.stop();a.setModified(!1);a.addAllSavedStatus()}),mxUtils.bind(this,function(a){b.handleError(a)}))}),mxUtils.bind(this,function(a){b.handleError(a)})):b.createFile(c,b.getFileData(!0),null,d))}),mxUtils.bind(this,function(){b.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0,null,null,
-null,null,b.editor.fileExtensions),b.showDialog(c.container,420,380,!0,!0),c.init()):b.editor.editAsNew(this.editorUi.getFileData(!0),c)}}));b.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var a=b.getCurrentFile();if(a.getMode()==App.MODE_GOOGLE||a.getMode()==App.MODE_ONEDRIVE){var c=!1;if(a.getMode()==App.MODE_GOOGLE&&null!=a.desc.parents)for(var d=0;d<a.desc.parents.length;d++)if(a.desc.parents[d].isRoot){c=!0;break}b.pickFolder(a.getMode(),mxUtils.bind(this,function(c){b.spinner.spin(document.body,
-mxResources.get("moving"))&&a.move(c,mxUtils.bind(this,function(a){b.spinner.stop()}),mxUtils.bind(this,function(a){b.handleError(a)}))}),null,!0,c)}}));this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));b.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){b.openLink("https://app.draw.io/")}));b.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+"...",function(){b.openLink("https://get.draw.io/")}));
-this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var a=b.getCurrentFile();null!=a&&b.drive.showPermissions(a.getId())}catch(B){b.handleError(B)}}));this.put("embed",new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();null==d||d.getMode()!=App.MODE_GOOGLE&&d.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(d.getTitle())||this.addMenuItems(a,["liveImage","-"],c);this.addMenuItems(a,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||b.isOffline()||
-this.addMenuItems(a,["embedIframe"],c);"1"==urlParams.embed||b.isOffline()||this.addMenuItems(a,"- googleDocs googleSlides googleSheets - microsoftOffice".split(" "),c)})));var x=function(a,c,d,f){("plantUml"!=f||EditorUi.enablePlantUml&&!b.isOffline())&&a.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==f||"formatSql"==f||"plantUml"==f){var a=new ParseDialog(b,d,f);b.showDialog(a.container,620,420,!0,!1);b.dialog.container.style.overflow="auto"}else a=new CreateGraphDialog(b,d,f),b.showDialog(a.container,
-620,420,!0,!1);a.init()}),c,null,e())},y=function(a,b,c,d){var e=g.isMouseInsertPoint()?g.getInsertPoint():g.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(e.x,e.y,b,c),d);a.vertex=!0;g.getModel().beginUpdate();try{a=g.addCell(a),g.fireEvent(new mxEventObject("cellsInserted","cells",[a]))}finally{g.getModel().endUpdate()}g.scrollCellToVisible(a);g.setSelectionCell(a);g.container.focus();g.editAfterInsert&&g.startEditing(a);return a};b.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+
-"...",function(){b.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,c,d,e,f,g,k,l,m,n){a=parseInt(a);!isNaN(a)&&0<a&&b.exportSvg(a/100,c,d,e,f,g,k,!l,m,n)}),!0,null,"svg")}));b.actions.put("insertText",new Action(mxResources.get("text"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&g.startEditingAtCell(y("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),
-null,null,Editor.ctrlKey+"+Shift+X").isEnabled=e;b.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&y("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=e;b.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&y("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=e;b.actions.put("insertRhombus",
-new Action(mxResources.get("rhombus"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&y("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=e;var D=mxUtils.bind(this,function(a,b,c){for(var d=0;d<c.length;d++)"-"==c[d]?a.addSeparator(b):x(a,b,mxResources.get(c[d])+"...",c[d])});this.put("insert",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),c);b.insertTemplateEnabled&&
-!b.isOffline()&&this.addMenuItems(a,["insertTemplate","-"],c);this.addMenuItems(a,["createShape","insertFreehand","-"],c);this.addSubmenu("insertLayout",a,c,mxResources.get("layout"));this.addSubmenu("insertAdvanced",a,c,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){D(a,b,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,c){D(a,c,
-["fromText","plantUml","-","formatSql"]);a.addItem(mxResources.get("csv")+"...",null,function(){b.showImportCsvDialog()},c,null,e())})));this.put("openRecent",new Menu(function(a,c){var d=b.getRecent();if(null!=d){for(var e=0;e<d.length;e++)(function(d){var e=d.mode;e==App.MODE_GOOGLE?e="googleDrive":e==App.MODE_ONEDRIVE&&(e="oneDrive");a.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){b.loadFile(d.id)},c)})(d[e]);a.addSeparator(c)}a.addItem(mxResources.get("reset"),null,function(){b.resetRecent()},
-c)}));this.put("openFrom",new Menu(function(a,c){null!=b.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){b.pickFile(App.MODE_GOOGLE)},c):k&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){b.pickFile(App.MODE_ONEDRIVE)},c):m&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+
-" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+"...",null,function(){b.pickFile(App.MODE_DROPBOX)},c):n&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){b.pickFile(App.MODE_GITHUB)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+
-"...",null,function(){b.pickFile(App.MODE_GITLAB)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){b.pickFile(App.MODE_TRELLO)},c):t&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.pickFile(App.MODE_BROWSER)},c);a.addItem(mxResources.get("device")+"...",null,
-function(){b.pickFile(App.MODE_DEVICE)},c);b.isOffline()||(a.addSeparator(c),a.addItem(mxResources.get("url")+"...",null,function(){var a=new FilenameDialog(b,"",mxResources.get("open"),function(a){null!=a&&0<a.length&&(null==b.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(a):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(a)))},mxResources.get("url"));b.showDialog(a.container,300,80,!0,!0);
-a.init()},c))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(a,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=b.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):k&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+
-"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):m&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):n&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},
-c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):t&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+
-" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);a.addItem(mxResources.get("device")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)})),this.put("openLibraryFrom",new Menu(function(a,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=b.drive?a.addItem(mxResources.get("googleDrive")+
-"...",null,function(){b.pickLibrary(App.MODE_GOOGLE)},c):k&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){b.pickLibrary(App.MODE_ONEDRIVE)},c):m&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+
-"...",null,function(){b.pickLibrary(App.MODE_DROPBOX)},c):n&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){b.pickLibrary(App.MODE_GITHUB)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){b.pickLibrary(App.MODE_GITLAB)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",
-null,function(){b.pickLibrary(App.MODE_TRELLO)},c):t&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.pickLibrary(App.MODE_BROWSER)},c);a.addItem(mxResources.get("device")+"...",null,function(){b.pickLibrary(App.MODE_DEVICE)},c);b.isOffline()||(a.addSeparator(c),a.addItem(mxResources.get("url")+
-"...",null,function(){var a=new FilenameDialog(b,"",mxResources.get("open"),function(a){if(null!=a&&0<a.length&&b.spinner.spin(document.body,mxResources.get("loading"))){var c=a;b.editor.isCorsEnabledForUrl(a)||(c=PROXY_URL+"?url="+encodeURIComponent(a));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){b.spinner.stop();try{b.loadLibrary(new UrlLibrary(this,c.getText(),a))}catch(J){b.handleError(J,mxResources.get("errorLoadingFile"))}}else b.spinner.stop(),b.handleError(null,mxResources.get("errorLoadingFile"))},
-function(){b.spinner.stop();b.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));b.showDialog(a.container,300,80,!0,!0);a.init()},c));"1"==urlParams.confLib&&(a.addSeparator(c),a.addItem(mxResources.get("confluenceCloud")+"...",null,function(){b.showRemotelyStoredLibrary(mxResources.get("libraries"))},c))})));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
-f=b.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(b,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("comments"));else{var a=!this.commentsWindow.window.isVisible();
-this.commentsWindow.window.setVisible(a);this.commentsWindow.refreshCommentsTime();a&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));f.setToggleAction(!0);f.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));b.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));var f=this.get("viewPanels"),I=f.funct;f.funct=
-function(a,c){I.apply(this,arguments);b.commentsSupported()&&b.menus.addMenuItems(a,["comments"],c)};this.put("view",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers"]).concat(b.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(a,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(a,"scratchpad",c);(!b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(d,
-"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(a,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",a,c);this.addMenuItems(a,"- scrollbars tooltips ruler - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(a,"shadowVisible",c);this.addMenuItems(a,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(a,c){"1"!=
-urlParams.embed&&(this.addSubmenu("theme",a,c),a.addSeparator(c));if("undefined"!==typeof MathJax){var d=this.addMenuItem(a,"mathematicalTypesetting",c);(!b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}this.addMenuItems(a,["copyConnect","collapseExpand","-"],c);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(a,["showStartScreen"],c);"1"!=urlParams.embed&&this.addMenuItems(a,
-["autosave"],c);a.addSeparator(c);!b.isOfflineApp()&&isLocalStorage&&this.addMenuItem(a,"plugins",c);this.addMenuItems(a,["tags","-","editDiagram","-","drawConfig"],c);a.addSeparator(c);"1"==urlParams.newTempDlg&&(b.actions.addAction("templates",function(){var a=new TemplatesDialog;b.showDialog(a.container,a.width,a.height,!0,!1,null,!1,!0);a.init(b,function(a){console.log(a)},null,null,null,"user",function(a,b){setTimeout(function(){b?a([{url:"123",title:"Test 1Test 1Test 1Test 1Test 1Test 1Test 11Test 1Test 11Test 1Test 1dgdsgdfg fdg dfgdfg dfg dfg"},
-{url:"123",title:"Test 2",imgUrl:"https://www.google.com.eg/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},{url:"123",title:"Test 3",changedBy:"Ashraf Teleb",lastModifiedOn:"Yesterday"},{url:"123",title:"Test 4"},{url:"123",title:"Test 5"},{url:"123",title:"Test 6"}]):a([{url:"123",title:"Test 4",imgUrl:"https://images.pexels.com/photos/459225/pexels-photo-459225.jpeg"},{url:"123",title:"Test 5"},{url:"123",title:"Test 6"},{url:"123",title:"Test 1Test 1Test 1Test 1Test 1Test 1Test 11Test 1Test 11Test 1Test 1dgdsgdfg fdg dfgdfg dfg dfg"},
-{url:"123",title:"Test 2",imgUrl:"https://www.google.com.eg/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},{url:"123",title:"Test 3",changedBy:"Ashraf Teleb",lastModifiedOn:"Yesterday"}]);console.log(b)},1E3)},function(a,b,c){setTimeout(function(){b(c?[{url:"123",title:a+"Test 1Test 1Test 1Test 1Test 1Test 1Test 1"},{url:"123",title:a+"Test 2"},{url:"123",title:a+"Test 3"},{url:"123",title:a+"Test 4"},{url:"123",title:a+"Test 5"},{url:"123",title:a+"Test 6"}]:[{url:"123",title:a+"Test 5"},
-{url:"123",title:a+"Test 6"},{url:"123",title:a+"Test 1Test 1Test 1Test 1Test 1Test 1Test 1"},{url:"123",title:a+"Test 2"},{url:"123",title:a+"Test 3"},{url:"123",title:a+"Test 4"}])},2E3)},null)}),this.addMenuItem(a,"templates",c))})));this.put("file",new Menu(mxUtils.bind(this,function(a,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",a,c),this.addSubmenu("exportAs",a,c),this.addSubmenu("embed",a,c),"1"==urlParams.libraries&&(this.addMenuItems(a,["-"],c),this.addSubmenu("newLibrary",a,c),
-this.addSubmenu("openLibraryFrom",a,c)),b.isRevisionHistorySupported()&&this.addMenuItems(a,["-","revisionHistory"],c),this.addMenuItems(a,"- pageSetup print - rename save".split(" "),c),"1"==urlParams.saveAndExit&&this.addMenuItems(a,["saveAndExit"],c),this.addMenuItems(a,["exit"],c);else{var d=this.editorUi.getCurrentFile();if(null!=d&&d.constructor==DriveFile){d.isRestricted()&&this.addMenuItems(a,["exportOptionsDisabled"],c);this.addMenuItems(a,["save","-","share"],c);var e=this.addMenuItem(a,
-"synchronize",c);(!b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(e,"https://desk.draw.io/support/solutions/articles/16000087947");a.addSeparator(c)}else this.addMenuItems(a,["new"],c);this.addSubmenu("openFrom",a,c);isLocalStorage&&this.addSubmenu("openRecent",a,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(a,["new","-","rename","makeCopy","moveToFolder"],c):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==d||d.constructor==LocalFile||(a.addSeparator(c),
-e=this.addMenuItem(a,"synchronize",c),(!b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(e,"https://desk.draw.io/support/solutions/articles/16000087947")),this.addMenuItems(a,["-","save","saveAs"],c),this.addMenuItems(a,["-","rename"],c),b.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(a,["upload"],c):(this.addMenuItems(a,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(a,["moveToFolder"],c)));a.addSeparator(c);this.addSubmenu("importFrom",
-a,c);this.addSubmenu("exportAs",a,c);a.addSeparator(c);this.addSubmenu("embed",a,c);this.addSubmenu("publish",a,c);a.addSeparator(c);this.addSubmenu("newLibrary",a,c);this.addSubmenu("openLibraryFrom",a,c);b.isRevisionHistorySupported()&&this.addMenuItems(a,["-","revisionHistory"],c);this.addMenuItems(a,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(a,["print"],c);this.addMenuItems(a,["-","close"])}})));a.prototype.execute=function(){var a=this.ui.editor.graph;this.extFonts=
-this.previousExtFonts;for(var b=a.extFonts,c=0;null!=b&&c<b.length;c++){var d=document.getElementById("extFont_"+b[c].name);null!=d&&d.parentNode.removeChild(d)}a.extFonts=[];for(c=0;c<this.previousExtFonts.length;c++)this.ui.editor.graph.addExtFont(this.previousExtFonts[c].name,this.previousExtFonts[c].url);this.previousExtFonts=b};this.put("fontFamily",new Menu(mxUtils.bind(this,function(b,c){for(var d=mxUtils.bind(this,function(a,d){var e=this.editorUi.editor.graph;this.styleChange(b,a,[mxConstants.STYLE_FONTFAMILY],
-[a],null,c,function(){document.execCommand("fontname",!1,a);e.addExtFont(a,d)},function(){e.updateLabelElements(e.getSelectionCells(),function(a){a.removeAttribute("face");a.style.fontFamily=null;"PRE"==a.nodeName&&e.replaceElement(a,"div")});e.addExtFont(a,d)}).firstChild.nextSibling.style.fontFamily=a}),e=0;e<this.defaultFonts.length;e++)d(this.defaultFonts[e]);b.addSeparator(c);var f=this.editorUi.editor.graph.extFonts;if(null!=f&&0<f.length){for(var g={},k=!1,e=0;e<this.customFonts.length;e++)g[this.customFonts[e].name]=
-!0;for(e=0;e<f.length;e++)g[f[e].name]||(this.customFonts.push(f[e]),k=!0);k&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged"))}if(0<this.customFonts.length){for(e=0;e<this.customFonts.length;e++)f=this.customFonts[e].name,g=this.customFonts[e].url,d(f,g),this.editorUi.editor.graph.addExtFont(f,g,!0);b.addSeparator(c);b.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var b=new a(this.editorUi,[]);this.editorUi.editor.graph.model.execute(b);this.customFonts=[];this.editorUi.fireEvent(new mxEventObject("customFontsChanged"))}),
-c);b.addSeparator(c)}b.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph,b=mxConstants.DEFAULT_FONTFAMILY,c="s",d=null,e=a.getView().getState(a.getSelectionCell());null!=e&&(b=e.style[mxConstants.STYLE_FONTFAMILY]||b,c=e.style.FType||c,"w"==c&&(d=this.editorUi.editor.graph.extFonts,e=null,null!=d&&(e=d.find(function(a){return a.name==b})),d=null!=e?e.url:mxResources.get("urlNofFound",null,"URL not found"),0==d.indexOf(PROXY_URL)&&(d=decodeURIComponent(d.substr((PROXY_URL+
-"?url=").length)))));c=new FontDialog(this.editorUi,b,d,c,mxUtils.bind(this,function(b,c,d){if(null!=b&&0<b.length){a.getModel().beginUpdate();try{a.stopEditing(!1);a.setCellStyles(mxConstants.STYLE_FONTFAMILY,b);"s"!=d&&(a.setCellStyles("FType",d),0==c.indexOf("http://")&&(c=PROXY_URL+"?url="+encodeURIComponent(c)),this.editorUi.editor.graph.addExtFont(b,c));d=!0;for(var e=0;e<this.customFonts.length;e++)if(this.customFonts[e].name==b){d=!1;break}d&&(this.customFonts.push({name:b,url:c}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged")))}finally{a.getModel().endUpdate()}}}));
+0)):27==a.keyCode&&(e.value="")}));d.firstChild.nextSibling.appendChild(e);mxEvent.addGestureListeners(e,function(a){document.activeElement!=e&&e.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){e.focus()},0);this.addMenuItems(a,["-","keyboardShortcuts","quickStart","userManual","-"],c);mxClient.IS_CHROMEAPP||this.addMenuItems(a,["feedback"],c);this.addMenuItems(a,["support","-","about"],c)}"1"==urlParams.test&&(a.addSeparator(c),
+this.addSubmenu("testDevelop",a,c))})));"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"),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"),b.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){g.isSelectionEmpty()||b.showTextDialog("Create Sidebar Entry","sb.createVertexTemplateFromData('"+Graph.compress(mxUtils.getXml(g.encodeCells(g.getSelectionCells())))+"', width, height, 'Title');")})),b.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=g.getGraphBounds(),b=g.view.translate,c=g.view.scale;g.insertVertex(g.getDefaultParent(),null,"",a.x/c-
+b.x,a.y/c-b.y,a.width/c,a.height/c,"fillColor=none;strokeColor=red;")})),b.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var a=null!=b.pages&&null!=b.getCurrentFile()?b.getCurrentFile().getAnonymizedXmlForPages(b.pages):"",a=new TextareaDialog(b,"Paste Data:",a,function(a){if(0<a.length)try{var c=function(a){function b(a){if(null==n[a]){if(n[a]=!0,null!=e[a]){for(;0<e[a].length;){var d=e[a].pop();b(d)}delete e[a]}}else mxLog.debug(c+": Visited: "+a)}var c=a.parentNode.id,d=a.childNodes;
+a={};for(var e={},f=null,k={},g=0;g<d.length;g++){var m=d[g];if(null!=m.id&&0<m.id.length)if(null==a[m.id]){a[m.id]=m.id;var l=m.getAttribute("parent");null==l?null!=f?mxLog.debug(c+": Multiple roots: "+m.id):f=m.id:(null==e[l]&&(e[l]=[]),e[l].push(m.id))}else k[m.id]=m.id}0<Object.keys(k).length?(d=c+": "+Object.keys(k).length+" Duplicates: "+Object.keys(k).join(", "),mxLog.debug(d+" (see console)")):mxLog.debug(c+": Checked");var n={};null==f?mxLog.debug(c+": No root"):(b(f),Object.keys(n).length!=
+Object.keys(a).length&&(mxLog.debug(c+": Invalid tree: (see console)"),console.log(c+": Invalid tree",e)))};"<"!=a.charAt(0)&&(a=Graph.decompress(a),mxLog.debug("See console for uncompressed XML"),console.log("xml",a));var d=mxUtils.parseXml(a),e=b.getPagesForNode(d.documentElement,"mxGraphModel");if(null!=e&&0<e.length)try{var f=b.getHashValueForPages(e);mxLog.debug("Checksum: ",f)}catch(H){mxLog.debug("Error: ",H.message)}else mxLog.debug("No pages found for checksum");var k=d.getElementsByTagName("root");
+for(a=0;a<k.length;a++)c(k[a]);mxLog.show()}catch(H){b.handleError(H),null!=window.console&&console.error(H)}});a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!0);a.init()})),b.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=b.pages){var a=new TextareaDialog(b,"Paste Data:","",function(a){if(0<a.length)try{console.log(JSON.stringify(b.diffPages(b.pages,b.getPagesForNode(mxUtils.parseXml(a).documentElement)),null,2))}catch(C){b.handleError(C),
+null!=window.console&&console.error(C)}});a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!0);a.init()}else b.alert("No pages")})),b.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(b,g.getModel())})),b.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=g.getGraphBounds(),c=g.view.scale,d=mxUtils.createXmlDocument(),e=d.createElement("output");d.appendChild(e);d=new mxXmlCanvas2D(e);
+d.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));d.scale(1/c);var f=0,k=d.save;d.save=function(){f++;k.apply(this,arguments)};var m=d.restore;d.restore=function(){f--;m.apply(this,arguments)};var l=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,f);l.apply(this,arguments);mxLog.debug("leaving shape",a,f)};a.drawState(g.getView().getState(g.model.root),d);mxLog.show();mxLog.debug(mxUtils.getXml(e));mxLog.debug("stateCounter",f)})),b.actions.addAction("testDownloadRtModel...",
+mxUtils.bind(this,function(){null==b.drive?b.handleError({message:mxResources.get("serviceUnavailableOrBlocked")}):b.drive.execute(mxUtils.bind(this,function(){var a=prompt("File ID","");if(null!=a&&0<a.length&&b.spinner.spin(document.body,mxResources.get("export"))){var c=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+a+"/realtime?supportsTeamDrives=true",null,"GET");c.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,arguments);a.setRequestHeader("authorization",
+"Bearer "+b.drive.token)};c.send(function(c){b.spinner.stop();200<=c.getStatus()&&299>=c.getStatus()?b.saveLocalFile(c.getText(),"json-"+a+".txt","text/plain"):b.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))})}}))})),b.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.put("testDevelop",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,
+"createSidebarEntry showBoundingBox - testCheckFile testDiff - testInspect - testXmlImageExport - testDownloadRtModel".split(" "),c);a.addItem(mxResources.get("testImportRtModel")+"...",null,function(){var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,"change",mxUtils.bind(this,function(){if(null!=a.files){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{b.openLocalFile(mxUtils.getXml(b.drive.convertJsonToXml(JSON.parse(c.target.result).data)),
+a.files[0].name,!0)}catch(F){b.handleError(F,mxResources.get("errorLoadingFile"))}});c.readAsText(a.files[0])}}));a.click()},c);this.addMenuItems(a,["-","testShowConsole"],c)}))));b.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!b.isOffline()?b.showDialog((new MoreShapesDialog(b,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):b.showDialog((new MoreShapesDialog(b,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});b.actions.put("createShape",
+new Action(mxResources.get("shape")+"...",function(a){g.isEnabled()&&(a=new mxCell("",new mxGeometry(0,0,120,120),b.defaultCustomShapeStyle),a.vertex=!0,a=new EditShapeDialog(b,a,mxResources.get("editShape")+":",630,400),b.showDialog(a.container,640,480,!0,!1),a.init())})).isEnabled=e;b.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(a){b.spinner.stop();b.showHtmlDialog(mxResources.get("create"),
+"https://desk.draw.io/support/solutions/articles/16000042542",a,function(a,c,d,e,f,k,g,m,l,n){b.createHtml(a,c,d,e,f,k,g,m,l,n,mxUtils.bind(this,function(a,c){var d=new EmbedDialog(b,a+"\n"+c,null,null,function(){var d=window.open(),e=d.document;if(null!=e){"CSS1Compat"===document.compatMode&&e.writeln("<!DOCTYPE html>");e.writeln("<html>");e.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');e.writeln("<body>");e.writeln(a);var f=mxClient.IS_IE||
+mxClient.IS_EDGE||null!=document.documentMode;f&&e.writeln(c);e.writeln("</body>");e.writeln("</html>");e.close();if(!f){var k=d.document.createElement("div");k.marginLeft="26px";k.marginTop="26px";mxUtils.write(k,mxResources.get("updatingDocument"));f=d.document.createElement("img");f.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");f.style.marginLeft="6px";k.appendChild(f);d.document.body.insertBefore(k,d.document.body.firstChild);window.setTimeout(function(){var a=
+document.createElement("script");a.type="text/javascript";a.src=/<script.*?src="(.*?)"/.exec(c)[1];e.body.appendChild(a);k.parentNode.removeChild(k)},20)}}else b.handleError({message:mxResources.get("errorUpdatingPreview")})});b.showDialog(d.container,440,240,!0,!0);d.init()}))})})}));b.actions.put("liveImage",new Action("Live image...",function(){var a=b.getCurrentFile();null!=a&&b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(c){b.spinner.stop();
+null!=c?(c=new EmbedDialog(b,'<img src="'+(a.constructor!=DriveFile?c:"https://drive.google.com/uc?id="+a.getId())+'"/>'),b.showDialog(c.container,440,240,!0,!0),c.init()):b.handleError({message:mxResources.get("invalidPublicUrl")})})}));b.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){b.showEmbedImageDialog(function(a,c,d,e,f,k){b.spinner.spin(document.body,mxResources.get("loading"))&&b.createEmbedImage(a,c,d,e,f,k,function(a){b.spinner.stop();a=new EmbedDialog(b,
+a);b.showDialog(a.container,440,240,!0,!0);a.init()},function(a){b.spinner.stop();b.handleError(a)})},mxResources.get("image"),mxResources.get("retina"),b.isExportToCanvas())}));b.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){b.showEmbedImageDialog(function(a,c,d,e,f,k){b.spinner.spin(document.body,mxResources.get("loading"))&&b.createEmbedSvg(a,c,d,e,f,k,function(a){b.spinner.stop();a=new EmbedDialog(b,a);b.showDialog(a.container,440,240,!0,!0);a.init()},function(a){b.spinner.stop();
+b.handleError(a)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://desk.draw.io/support/solutions/articles/16000042548")}));b.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var a=g.getGraphBounds();b.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((a.y+a.height-g.view.translate.y)/g.view.scale)+2,function(a,c,d,e,f,k,g,m){b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(l){b.spinner.stop();
+l=new EmbedDialog(b,'<iframe frameborder="0" style="width:'+g+";height:"+m+';" src="'+b.createLink(a,c,d,e,f,k,l)+'"></iframe>');b.showDialog(l.container,440,240,!0,!0);l.init()})},!0)}));b.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){b.showPublishLinkDialog(null,null,null,null,function(a,c,d,e,f,k){b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(g){b.spinner.stop();g=new EmbedDialog(b,b.createLink(a,c,d,e,f,k,g));
+b.showDialog(g.container,440,240,!0,!0);g.init()})})}));b.actions.addAction("microsoftOffice...",function(){b.openLink("https://office.draw.io")});b.actions.addAction("googleDocs...",function(){b.openLink("http://docsaddon.draw.io")});b.actions.addAction("googleSlides...",function(){b.openLink("https://slidesaddon.draw.io")});b.actions.addAction("googleSheets...",function(){b.openLink("https://sheetsaddon.draw.io")});b.actions.addAction("googleSites...",function(){b.spinner.spin(document.body,mxResources.get("loading"))&&
+b.getPublicUrl(b.getCurrentFile(),function(a){b.spinner.stop();a=new GoogleSitesDialog(b,a);b.showDialog(a.container,420,256,!0,!0);a.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)f=b.actions.addAction("scratchpad",function(){b.toggleScratchpad()}),f.setToggleAction(!0),f.setSelectedCallback(function(){return null!=b.scratchpad}),b.actions.addAction("plugins...",function(){b.showDialog((new PluginsDialog(b)).container,360,170,!0,!1)});f=b.actions.addAction("search",function(){var a=b.sidebar.isEntryVisible("search");
+b.sidebar.showPalette("search",!a);isLocalStorage&&(mxSettings.settings.search=!a,mxSettings.save())});f.setToggleAction(!0);f.setSelectedCallback(function(){return b.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(b.actions.get("save").funct=function(a){g.isEditing()&&g.stopEditing();var c="0"!=urlParams.pages||null!=b.pages&&1<b.pages.length?b.getFileData(!0):mxUtils.getXml(b.editor.getGraphXml());if("json"==urlParams.proto){var d=b.createLoadMessage("save");d.xml=c;a&&(d.exit=!0);c=JSON.stringify(d)}(window.opener||
+window.parent).postMessage(c,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(b.editor.modified=!1,b.editor.setStatus(""));null!=b.getCurrentFile()&&b.saveFile()},b.actions.addAction("saveAndExit",function(){b.actions.get("save").funct(!0)}),b.actions.addAction("exit",function(){var a=function(){b.editor.modified=!1;var a="json"==urlParams.proto?JSON.stringify({event:"exit",modified:b.editor.modified}):"";(window.opener||window.parent).postMessage(a,"*")};b.editor.modified?b.confirm(mxResources.get("allChangesLost"),
+null,a,mxResources.get("cancel"),mxResources.get("discardChanges")):a()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(a,c){b.isExportToCanvas()?(this.addMenuItems(a,["exportPng"],c),b.jpgSupported&&this.addMenuItems(a,["exportJpg"],c)):b.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(a,["exportPng","exportJpg"],c);this.addMenuItems(a,["exportSvg","-"],c);b.isOffline()||b.printPdfExport?this.addMenuItems(a,["exportPdf"],c):b.isOffline()||mxClient.IS_IOS&&navigator.standalone||
+this.addMenuItems(a,["exportPdf"],c);mxClient.IS_IE||"undefined"===typeof VsdxExport&&b.isOffline()||this.addMenuItems(a,["exportVsdx"],c);this.addMenuItems(a,["-","exportHtml","exportXml","exportUrl"],c);b.isOffline()||(a.addSeparator(c),this.addMenuItem(a,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(a,c){function d(a){a.pickFile(function(c){b.spinner.spin(document.body,mxResources.get("loading"))&&a.getFile(c,
+function(a){var c="data:image/"==a.getData().substring(0,11)?f(a.getTitle()):"text/xml";/\.svg$/i.test(a.getTitle())&&!b.editor.isDataSvg(a.getData())&&(a.setData(b.createSvgDataUri(a.getData())),c="image/svg+xml");e(a.getData(),c,a.getTitle())},function(a){b.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)},a==b.drive)},!0)}var e=mxUtils.bind(this,function(a,c,d){var e=g.view,f=g.getGraphBounds(),k=g.snap(Math.ceil(Math.max(0,f.x/e.scale-e.translate.x)+4*g.gridSize)),m=g.snap(Math.ceil(Math.max(0,
+(f.y+f.height)/e.scale-e.translate.y)+4*g.gridSize));"data:image/"==a.substring(0,11)?b.loadImage(a,mxUtils.bind(this,function(e){var f=!0,l=mxUtils.bind(this,function(){b.resizeImage(e,a,mxUtils.bind(this,function(e,l,n){e=f?Math.min(1,Math.min(b.maxImageSize/l,b.maxImageSize/n)):1;b.importFile(a,c,k,m,Math.round(l*e),Math.round(n*e),d,function(a){b.spinner.stop();g.setSelectionCells(a);g.scrollCellToVisible(g.getSelectionCell())})}),f)});a.length>b.resampleThreshold?b.confirmImageResize(function(a){f=
+a;l()}):l()}),mxUtils.bind(this,function(){b.handleError({message:mxResources.get("cannotOpenFile")})})):b.importFile(a,c,k,m,0,0,d,function(a){b.spinner.stop();g.setSelectionCells(a);g.scrollCellToVisible(g.getSelectionCell())})}),f=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=b.drive?a.addItem(mxResources.get("googleDrive")+
+"...",null,function(){d(b.drive)},c):k&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){d(b.oneDrive)},c):m&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+"...",null,
+function(){d(b.dropbox)},c):n&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){d(b.gitHub)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){d(b.gitLab)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){d(b.trello)},c):q&&"function"===typeof window.TrelloClient&&
+a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.importLocalFile(!1)},c);a.addItem(mxResources.get("device")+"...",null,function(){b.importLocalFile(!0)},c);b.isOffline()||(a.addSeparator(c),a.addItem(mxResources.get("url")+"...",null,function(){var a=new FilenameDialog(b,"",mxResources.get("import"),function(a){if(null!=a&&0<
+a.length&&b.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(a)?"image/png":"text/xml";b.loadUrl(PROXY_URL+"?url="+encodeURIComponent(a),function(b){e(b,c,a)},function(){b.spinner.stop();b.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));b.showDialog(a.container,300,80,!0,!0);a.init()},c))}))).isEnabled=e;this.put("theme",new Menu(mxUtils.bind(this,function(a,c){var d=mxSettings.getUi(),e=a.addItem(mxResources.get("automatic"),
+null,function(){mxSettings.setUi("");mxSettings.save();b.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"!=d&&"atlas"!=d&&"dark"!=d&&"min"!=d&&a.addCheckmark(e,Editor.checkmarkImage);a.addSeparator(c);e=a.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("kennedy");mxSettings.save();b.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"==d&&a.addCheckmark(e,Editor.checkmarkImage);e=a.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");
+mxSettings.save();b.alert(mxResources.get("restartForChangeRequired"))},c);"min"==d&&a.addCheckmark(e,Editor.checkmarkImage);e=a.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();b.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==d&&a.addCheckmark(e,Editor.checkmarkImage);e=a.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");mxSettings.save();b.alert(mxResources.get("restartForChangeRequired"))},c);"dark"==d&&a.addCheckmark(e,
+Editor.checkmarkImage)})));f=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();if(null!=a){var c=null!=a.getTitle()?a.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(b){null!=b&&0<b.length&&null!=a&&b!=a.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&a.rename(b,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),
+mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}),a.constructor==DriveFile||a.constructor==StorageFile?mxResources.get("diagramName"):null,function(a){if(null!=a&&0<a.length)return!0;b.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,b.editor.fileExtensions);this.editorUi.showDialog(c.container,340,90,!0,!0);c.init()}}));f.isEnabled=function(){return this.enabled&&
+e.apply(this,arguments)};f.visible="1"!=urlParams.embed;b.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var a=b.getCurrentFile();if(null!=a){var c=b.getCopyFilename(a);a.constructor==DriveFile?(c=new CreateDialog(b,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?b.spinner.spin(document.body,mxResources.get("saving"))&&a.saveAs(c,mxUtils.bind(this,function(c){a.desc=c;a.save(!1,mxUtils.bind(this,function(){b.spinner.stop();
+a.setModified(!1);a.addAllSavedStatus()}),mxUtils.bind(this,function(a){b.handleError(a)}))}),mxUtils.bind(this,function(a){b.handleError(a)})):b.createFile(c,b.getFileData(!0),null,d))}),mxUtils.bind(this,function(){b.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0,null,null,null,null,b.editor.fileExtensions),b.showDialog(c.container,420,380,!0,!0),c.init()):b.editor.editAsNew(this.editorUi.getFileData(!0),c)}}));b.actions.addAction("moveToFolder...",mxUtils.bind(this,
+function(){var a=b.getCurrentFile();if(a.getMode()==App.MODE_GOOGLE||a.getMode()==App.MODE_ONEDRIVE){var c=!1;if(a.getMode()==App.MODE_GOOGLE&&null!=a.desc.parents)for(var d=0;d<a.desc.parents.length;d++)if(a.desc.parents[d].isRoot){c=!0;break}b.pickFolder(a.getMode(),mxUtils.bind(this,function(c){b.spinner.spin(document.body,mxResources.get("moving"))&&a.move(c,mxUtils.bind(this,function(a){b.spinner.stop()}),mxUtils.bind(this,function(a){b.handleError(a)}))}),null,!0,c)}}));this.put("publish",new Menu(mxUtils.bind(this,
+function(a,b){this.addMenuItems(a,["publishLink"],b)})));b.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){b.openLink("https://app.draw.io/")}));b.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+"...",function(){b.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var a=b.getCurrentFile();null!=a&&b.drive.showPermissions(a.getId())}catch(B){b.handleError(B)}}));this.put("embed",
+new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();null==d||d.getMode()!=App.MODE_GOOGLE&&d.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(d.getTitle())||this.addMenuItems(a,["liveImage","-"],c);this.addMenuItems(a,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||b.isOffline()||this.addMenuItems(a,["embedIframe"],c);"1"==urlParams.embed||b.isOffline()||this.addMenuItems(a,"- googleDocs googleSlides googleSheets - microsoftOffice".split(" "),c)})));var x=function(a,
+c,d,f){("plantUml"!=f||EditorUi.enablePlantUml&&!b.isOffline())&&a.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==f||"formatSql"==f||"plantUml"==f){var a=new ParseDialog(b,d,f);b.showDialog(a.container,620,420,!0,!1);b.dialog.container.style.overflow="auto"}else a=new CreateGraphDialog(b,d,f),b.showDialog(a.container,620,420,!0,!1);a.init()}),c,null,e())},y=function(a,b,c,d){var e=g.isMouseInsertPoint()?g.getInsertPoint():g.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(e.x,e.y,b,
+c),d);a.vertex=!0;g.getModel().beginUpdate();try{a=g.addCell(a),g.fireEvent(new mxEventObject("cellsInserted","cells",[a]))}finally{g.getModel().endUpdate()}g.scrollCellToVisible(a);g.setSelectionCell(a);g.container.focus();g.editAfterInsert&&g.startEditing(a);return a};b.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){b.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,
+function(a,c,d,e,f,k,g,m,l,n){a=parseInt(a);!isNaN(a)&&0<a&&b.exportSvg(a/100,c,d,e,f,k,g,!m,l,n)}),!0,null,"svg")}));b.actions.put("insertText",new Action(mxResources.get("text"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&g.startEditingAtCell(y("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=e;b.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),
+function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&y("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=e;b.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&y("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=e;b.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&
+y("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=e;var D=mxUtils.bind(this,function(a,b,c){for(var d=0;d<c.length;d++)"-"==c[d]?a.addSeparator(b):x(a,b,mxResources.get(c[d])+"...",c[d])});this.put("insert",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),c);b.insertTemplateEnabled&&!b.isOffline()&&this.addMenuItems(a,["insertTemplate","-"],c);this.addMenuItems(a,["createShape","insertFreehand",
+"-"],c);this.addSubmenu("insertLayout",a,c,mxResources.get("layout"));this.addSubmenu("insertAdvanced",a,c,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){D(a,b,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,c){D(a,c,["fromText","plantUml","-","formatSql"]);a.addItem(mxResources.get("csv")+"...",null,function(){b.showImportCsvDialog()},
+c,null,e())})));this.put("openRecent",new Menu(function(a,c){var d=b.getRecent();if(null!=d){for(var e=0;e<d.length;e++)(function(d){var e=d.mode;e==App.MODE_GOOGLE?e="googleDrive":e==App.MODE_ONEDRIVE&&(e="oneDrive");a.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){b.loadFile(d.id)},c)})(d[e]);a.addSeparator(c)}a.addItem(mxResources.get("reset"),null,function(){b.resetRecent()},c)}));this.put("openFrom",new Menu(function(a,c){null!=b.drive?a.addItem(mxResources.get("googleDrive")+"...",
+null,function(){b.pickFile(App.MODE_GOOGLE)},c):k&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){b.pickFile(App.MODE_ONEDRIVE)},c):m&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+
+"...",null,function(){b.pickFile(App.MODE_DROPBOX)},c):n&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){b.pickFile(App.MODE_GITHUB)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){b.pickFile(App.MODE_GITLAB)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){b.pickFile(App.MODE_TRELLO)},
+c):q&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.pickFile(App.MODE_BROWSER)},c);a.addItem(mxResources.get("device")+"...",null,function(){b.pickFile(App.MODE_DEVICE)},c);b.isOffline()||(a.addSeparator(c),a.addItem(mxResources.get("url")+"...",null,function(){var a=new FilenameDialog(b,
+"",mxResources.get("open"),function(a){null!=a&&0<a.length&&(null==b.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(a):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(a)))},mxResources.get("url"));b.showDialog(a.container,300,80,!0,!0);a.init()},c))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(a,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=
+b.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):k&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):m&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+
+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):n&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},
+c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):q&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+
+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);a.addItem(mxResources.get("device")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)})),this.put("openLibraryFrom",new Menu(function(a,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=b.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){b.pickLibrary(App.MODE_GOOGLE)},c):k&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+
+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){b.pickLibrary(App.MODE_ONEDRIVE)},c):m&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+"...",null,function(){b.pickLibrary(App.MODE_DROPBOX)},c):n&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+
+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){b.pickLibrary(App.MODE_GITHUB)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){b.pickLibrary(App.MODE_GITLAB)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){b.pickLibrary(App.MODE_TRELLO)},c):q&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
+"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.pickLibrary(App.MODE_BROWSER)},c);a.addItem(mxResources.get("device")+"...",null,function(){b.pickLibrary(App.MODE_DEVICE)},c);b.isOffline()||(a.addSeparator(c),a.addItem(mxResources.get("url")+"...",null,function(){var a=new FilenameDialog(b,"",mxResources.get("open"),function(a){if(null!=a&&0<a.length&&b.spinner.spin(document.body,mxResources.get("loading"))){var c=
+a;b.editor.isCorsEnabledForUrl(a)||(c=PROXY_URL+"?url="+encodeURIComponent(a));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){b.spinner.stop();try{b.loadLibrary(new UrlLibrary(this,c.getText(),a))}catch(J){b.handleError(J,mxResources.get("errorLoadingFile"))}}else b.spinner.stop(),b.handleError(null,mxResources.get("errorLoadingFile"))},function(){b.spinner.stop();b.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));b.showDialog(a.container,300,
+80,!0,!0);a.init()},c));"1"==urlParams.confLib&&(a.addSeparator(c),a.addItem(mxResources.get("confluenceCloud")+"...",null,function(){b.showRemotelyStoredLibrary(mxResources.get("libraries"))},c))})));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));f=b.actions.addAction("comments",
+mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(b,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("comments"));else{var a=!this.commentsWindow.window.isVisible();this.commentsWindow.window.setVisible(a);
+this.commentsWindow.refreshCommentsTime();a&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));f.setToggleAction(!0);f.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));b.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));var f=this.get("viewPanels"),I=f.funct;f.funct=function(a,c){I.apply(this,arguments);
+b.commentsSupported()&&b.menus.addMenuItems(a,["comments"],c)};this.put("view",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers"]).concat(b.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(a,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(a,"scratchpad",c);(!b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(a,
+["shapes","-","pageView","pageScale"]);this.addSubmenu("units",a,c);this.addMenuItems(a,"- scrollbars tooltips ruler - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(a,"shadowVisible",c);this.addMenuItems(a,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(a,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",a,c),a.addSeparator(c));if("undefined"!==
+typeof MathJax){var d=this.addMenuItem(a,"mathematicalTypesetting",c);(!b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}this.addMenuItems(a,["copyConnect","collapseExpand","-"],c);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(a,["showStartScreen"],c);"1"!=urlParams.embed&&this.addMenuItems(a,["autosave"],c);a.addSeparator(c);!b.isOfflineApp()&&isLocalStorage&&this.addMenuItem(a,
+"plugins",c);this.addMenuItems(a,["tags","-","editDiagram","-","drawConfig"],c);a.addSeparator(c);"1"==urlParams.newTempDlg&&(b.actions.addAction("templates",function(){var a=new TemplatesDialog;b.showDialog(a.container,a.width,a.height,!0,!1,null,!1,!0);a.init(b,function(a){console.log(a)},null,null,null,"user",function(a,b){setTimeout(function(){b?a([{url:"123",title:"Test 1Test 1Test 1Test 1Test 1Test 1Test 11Test 1Test 11Test 1Test 1dgdsgdfg fdg dfgdfg dfg dfg"},{url:"123",title:"Test 2",imgUrl:"https://www.google.com.eg/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},
+{url:"123",title:"Test 3",changedBy:"Ashraf Teleb",lastModifiedOn:"Yesterday"},{url:"123",title:"Test 4"},{url:"123",title:"Test 5"},{url:"123",title:"Test 6"}]):a([{url:"123",title:"Test 4",imgUrl:"https://images.pexels.com/photos/459225/pexels-photo-459225.jpeg"},{url:"123",title:"Test 5"},{url:"123",title:"Test 6"},{url:"123",title:"Test 1Test 1Test 1Test 1Test 1Test 1Test 11Test 1Test 11Test 1Test 1dgdsgdfg fdg dfgdfg dfg dfg"},{url:"123",title:"Test 2",imgUrl:"https://www.google.com.eg/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},
+{url:"123",title:"Test 3",changedBy:"Ashraf Teleb",lastModifiedOn:"Yesterday"}]);console.log(b)},1E3)},function(a,b,c){setTimeout(function(){b(c?[{url:"123",title:a+"Test 1Test 1Test 1Test 1Test 1Test 1Test 1"},{url:"123",title:a+"Test 2"},{url:"123",title:a+"Test 3"},{url:"123",title:a+"Test 4"},{url:"123",title:a+"Test 5"},{url:"123",title:a+"Test 6"}]:[{url:"123",title:a+"Test 5"},{url:"123",title:a+"Test 6"},{url:"123",title:a+"Test 1Test 1Test 1Test 1Test 1Test 1Test 1"},{url:"123",title:a+"Test 2"},
+{url:"123",title:a+"Test 3"},{url:"123",title:a+"Test 4"}])},2E3)},null)}),this.addMenuItem(a,"templates",c))})));this.put("file",new Menu(mxUtils.bind(this,function(a,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",a,c),this.addSubmenu("exportAs",a,c),this.addSubmenu("embed",a,c),"1"==urlParams.libraries&&(this.addMenuItems(a,["-"],c),this.addSubmenu("newLibrary",a,c),this.addSubmenu("openLibraryFrom",a,c)),b.isRevisionHistorySupported()&&this.addMenuItems(a,["-","revisionHistory"],c),this.addMenuItems(a,
+"- pageSetup print - rename save".split(" "),c),"1"==urlParams.saveAndExit&&this.addMenuItems(a,["saveAndExit"],c),this.addMenuItems(a,["exit"],c);else{var d=this.editorUi.getCurrentFile();if(null!=d&&d.constructor==DriveFile){d.isRestricted()&&this.addMenuItems(a,["exportOptionsDisabled"],c);this.addMenuItems(a,["save","-","share"],c);var e=this.addMenuItem(a,"synchronize",c);(!b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(e,"https://desk.draw.io/support/solutions/articles/16000087947");
+a.addSeparator(c)}else this.addMenuItems(a,["new"],c);this.addSubmenu("openFrom",a,c);isLocalStorage&&this.addSubmenu("openRecent",a,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(a,["new","-","rename","makeCopy","moveToFolder"],c):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==d||d.constructor==LocalFile||(a.addSeparator(c),e=this.addMenuItem(a,"synchronize",c),(!b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(e,"https://desk.draw.io/support/solutions/articles/16000087947")),
+this.addMenuItems(a,["-","save","saveAs"],c),this.addMenuItems(a,["-","rename"],c),b.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(a,["upload"],c):(this.addMenuItems(a,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(a,["moveToFolder"],c)));a.addSeparator(c);this.addSubmenu("importFrom",a,c);this.addSubmenu("exportAs",a,c);a.addSeparator(c);this.addSubmenu("embed",a,c);this.addSubmenu("publish",a,c);a.addSeparator(c);this.addSubmenu("newLibrary",
+a,c);this.addSubmenu("openLibraryFrom",a,c);b.isRevisionHistorySupported()&&this.addMenuItems(a,["-","revisionHistory"],c);this.addMenuItems(a,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(a,["print"],c);this.addMenuItems(a,["-","close"])}})));a.prototype.execute=function(){var a=this.ui.editor.graph;this.extFonts=this.previousExtFonts;for(var b=a.extFonts,c=0;null!=b&&c<b.length;c++){var d=document.getElementById("extFont_"+b[c].name);null!=d&&d.parentNode.removeChild(d)}a.extFonts=
+[];for(c=0;c<this.previousExtFonts.length;c++)this.ui.editor.graph.addExtFont(this.previousExtFonts[c].name,this.previousExtFonts[c].url);this.previousExtFonts=b};this.put("fontFamily",new Menu(mxUtils.bind(this,function(b,c){for(var d=mxUtils.bind(this,function(a,d){var e=this.editorUi.editor.graph;this.styleChange(b,a,[mxConstants.STYLE_FONTFAMILY],[a],null,c,function(){document.execCommand("fontname",!1,a);e.addExtFont(a,d)},function(){e.updateLabelElements(e.getSelectionCells(),function(a){a.removeAttribute("face");
+a.style.fontFamily=null;"PRE"==a.nodeName&&e.replaceElement(a,"div")});e.addExtFont(a,d)}).firstChild.nextSibling.style.fontFamily=a}),e=0;e<this.defaultFonts.length;e++)d(this.defaultFonts[e]);b.addSeparator(c);var f=this.editorUi.editor.graph.extFonts;if(null!=f&&0<f.length){for(var k={},g=!1,e=0;e<this.customFonts.length;e++)k[this.customFonts[e].name]=!0;for(e=0;e<f.length;e++)k[f[e].name]||(this.customFonts.push(f[e]),g=!0);g&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged"))}if(0<
+this.customFonts.length){for(e=0;e<this.customFonts.length;e++)f=this.customFonts[e].name,k=this.customFonts[e].url,d(f,k),this.editorUi.editor.graph.addExtFont(f,k,!0);b.addSeparator(c);b.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var b=new a(this.editorUi,[]);this.editorUi.editor.graph.model.execute(b);this.customFonts=[];this.editorUi.fireEvent(new mxEventObject("customFontsChanged"))}),c);b.addSeparator(c)}b.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,
+function(){var a=this.editorUi.editor.graph,b=mxConstants.DEFAULT_FONTFAMILY,c="s",d=null,e=a.getView().getState(a.getSelectionCell());null!=e&&(b=e.style[mxConstants.STYLE_FONTFAMILY]||b,c=e.style.FType||c,"w"==c&&(d=this.editorUi.editor.graph.extFonts,e=null,null!=d&&(e=d.find(function(a){return a.name==b})),d=null!=e?e.url:mxResources.get("urlNofFound",null,"URL not found"),0==d.indexOf(PROXY_URL)&&(d=decodeURIComponent(d.substr((PROXY_URL+"?url=").length)))));c=new FontDialog(this.editorUi,b,
+d,c,mxUtils.bind(this,function(b,c,d){if(null!=b&&0<b.length){a.getModel().beginUpdate();try{a.stopEditing(!1);a.setCellStyles(mxConstants.STYLE_FONTFAMILY,b);"s"!=d&&(a.setCellStyles("FType",d),0==c.indexOf("http://")&&(c=PROXY_URL+"?url="+encodeURIComponent(c)),this.editorUi.editor.graph.addExtFont(b,c));d=!0;for(var e=0;e<this.customFonts.length;e++)if(this.customFonts[e].name==b){d=!1;break}d&&(this.customFonts.push({name:b,url:c}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged")))}finally{a.getModel().endUpdate()}}}));
this.editorUi.showDialog(c.container,380,250,!0,!0);c.init()}),c,null,!0)})))}})();function DiagramPage(a,c){this.node=a;null!=c?this.node.setAttribute("id",c):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,c,d){this.ui=a;this.page=c;this.previous=this.name=d}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(a,c,d){this.ui=a;this.oldIndex=c;this.newIndex=d}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
@@ -9468,37 +9478,37 @@ mxEvent.getClientX(a),g=mxEvent.getClientY(a);c.popup(b,g,null,a);this.setCurren
EditorUi.prototype.createTabForPage=function(a,c,d,b){d=this.createTab(d);var g=a.getName()||mxResources.get("untitled"),e=a.getId();d.setAttribute("title",g+(null!=e?" ("+e+")":"")+" ["+b+"]");mxUtils.write(d,g);d.style.maxWidth=c+"px";d.style.width=c+"px";this.addTabListeners(a,d);42<c&&(d.style.textOverflow="ellipsis");return d};
EditorUi.prototype.addTabListeners=function(a,c){mxEvent.disableContextMenu(c);var d=this.editor.graph;mxEvent.addListener(c,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var b=!1,g=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,function(c){b=null!=this.currentMenu;g=a==this.currentPage;d.isMouseDown||g||this.selectPage(a)}),null,mxUtils.bind(this,function(e){if(d.isEnabled()&&!d.isMouseDown&&(mxEvent.isTouchEvent(e)&&g||mxEvent.isPopupTrigger(e))){d.popupMenuHandler.hideMenu();
this.hideCurrentMenu();if(!mxEvent.isTouchEvent(e)||!b){var k=new mxPopupMenu(this.createPageMenu(a));k.div.className+=" geMenubarMenu";k.smartSeparators=!0;k.showDisabled=!0;k.autoExpand=!0;k.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(k,arguments);this.resetCurrentMenu();k.destroy()});var n=mxEvent.getClientX(e),m=mxEvent.getClientY(e);k.popup(n,m,null,e);this.setCurrentMenu(k,c)}mxEvent.consume(e)}}))};
-EditorUi.prototype.createPageMenu=function(a,c){return mxUtils.bind(this,function(d,b){d.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),b);d.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),b);d.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,c)}),b);var g=this.getCurrentFile();null!=g&&g.constructor!=LocalFile&&(d.addSeparator(b),d.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){var b=this.getSearch("create title mode url drive splash state".split(" ")),b=b+((0==b.length?"?":"&")+"page-id="+a.getId()),b=window.location.protocol+"//"+window.location.host+"/"+b+"#"+g.getHash(),b=new EmbedDialog(this,b);this.showDialog(b.container,440,240,!0,!0);b.init()}),b));d.addSeparator(b);d.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,mxResources.get("copyOf",[a.getName()]))}),b)})};
-(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){a.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,d,b){b.ui=a.ui;return d};a.afterDecode=function(a,d,b){a=b.oldIndex;b.oldIndex=b.newIndex;b.newIndex=a;return b};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,d,b){b.ui=a.ui;return d};a.afterDecode=function(a,d,b){a=b.previous;b.previous=b.name;b.name=a;return b};mxCodecRegistry.register(a)})();
+EditorUi.prototype.getLinkForPage=function(a){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var c=this.getCurrentFile();if(null!=c&&c.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var d=this.getSearch("create title mode url drive splash state".split(" ")),d=d+((0==d.length?"?":"&")+"page-id="+a.getId());return window.location.protocol+"//"+window.location.host+"/"+d+"#"+c.getHash()}}return null};
+EditorUi.prototype.createPageMenu=function(a,c){return mxUtils.bind(this,function(d,b){d.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),b);d.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),b);d.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,c)}),b);var g=this.getLinkForPage(a);null!=g&&(d.addSeparator(b),d.addItem(mxResources.get("link"),null,
+mxUtils.bind(this,function(){var a=new EmbedDialog(this,g);this.showDialog(a.container,440,240,!0,!0);a.init()}),b));d.addSeparator(b);d.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,mxResources.get("copyOf",[a.getName()]))}),b)})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){a.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();
+(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,d,b){b.ui=a.ui;return d};a.afterDecode=function(a,d,b){a=b.oldIndex;b.oldIndex=b.newIndex;b.newIndex=a;return b};mxCodecRegistry.register(a)})();(function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,d,b){b.ui=a.ui;return d};a.afterDecode=function(a,d,b){a=b.previous;b.previous=b.name;b.name=a;return b};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),c="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,b,g){g.setAttribute("relatedPage",b.relatedPage.getId());null==b.index&&(g.setAttribute("name",b.relatedPage.getName()),null!=b.relatedPage.viewState&&g.setAttribute("viewState",JSON.stringify(b.relatedPage.viewState,function(a,b){return 0>mxUtils.indexOf(c,
a)?b:void 0})),null!=b.relatedPage.root&&a.encodeCell(b.relatedPage.root,g));return g};a.beforeDecode=function(a,b,c){c.ui=a.ui;c.relatedPage=c.ui.getPageById(b.getAttribute("relatedPage"));if(null==c.relatedPage){var d=b.ownerDocument.createElement("diagram");d.setAttribute("id",b.getAttribute("relatedPage"));d.setAttribute("name",b.getAttribute("name"));c.relatedPage=new DiagramPage(d);d=b.getAttribute("viewState");null!=d&&(c.relatedPage.viewState=JSON.parse(d),b.removeAttribute("viewState"));
-b=b.cloneNode(!0);d=b.firstChild;if(null!=d)for(c.relatedPage.root=a.decodeCell(d,!1),c=d.nextSibling,d.parentNode.removeChild(d),d=c;null!=d;){c=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var g=d.getAttribute("id");null==a.lookup(g)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=c}}return b};a.afterDecode=function(a,b,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png";EditorUi.prototype.altShiftActions[68]=
-"selectDescendants";var c=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,b,d,n,m){b=null!=b?b:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var e=d.slice(),f=[],g=0;g<d.length;g++){var k=this.view.getState(d[g]),u=null!=k?k.style:this.getCellStyle(d[g]);"1"==mxUtils.getValue(u,"treeFolding","0")&&(this.traverse(d[g],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=d[g]&&f.push(a);return a==d[g]||!this.model.isCollapsed(a)})),
-this.model.setCollapsed(d[g],a))}for(g=0;g<f.length;g++)this.model.setVisible(f[g],!a);d=e;d=c.apply(this,arguments)}finally{this.model.endUpdate()}return d};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return x.isVertex(a)&&d(a)}function c(a){var b=!1;null!=a&&(b=q.view.getState(a),b="1"==(null!=b?b.style:q.getCellStyle(a)).treeMoving);
-return b}function d(a){var b=!1;null!=a&&(a=x.getParent(a),b=q.view.getState(a),b="tree"==(null!=b?b.style:q.getCellStyle(a)).containerType);return b}function n(a){var b=!1;null!=a&&(a=x.getParent(a),b=q.view.getState(a),q.view.getState(a),b=null!=(null!=b?b.style:q.getCellStyle(a)).childLayout);return b}function m(a){a=q.view.getState(a);if(null!=a){var b=q.getIncomingEdges(a.cell);if(0<b.length&&(b=q.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==
-a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function t(a,b){b=null!=b?b:!0;q.model.beginUpdate();try{var c=q.model.getParent(a),d=q.getIncomingEdges(a),e=q.cloneCells([d[0],a]);q.model.setTerminal(e[0],q.model.getTerminal(d[0],!0),!0);var f=m(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||
-f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;q.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=q.view.getState(a),l=q.view.scale;if(null!=k){var n=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*l:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var p=q.getOutgoingEdges(q.model.getTerminal(d[0],
-!0));if(null!=p){for(var t=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,u=g=d=0;u<p.length;u++){var z=q.model.getTerminal(p[u],!1);if(f==m(z)){var v=q.view.getState(z);z!=a&&null!=v&&(t&&b!=v.getCenterX()<k.getCenterX()||!t&&b!=v.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,v)&&(d=10+Math.max(d,(Math.min(n.x+n.width,v.x+v.width)-Math.max(n.x,v.x))/l),g=10+Math.max(g,(Math.min(n.y+n.height,v.y+v.height)-Math.max(n.y,v.y))/l))}}t?g=0:d=0;for(u=0;u<p.length;u++)if(z=q.model.getTerminal(p[u],
-!1),f==m(z)&&(v=q.view.getState(z),z!=a&&null!=v&&(t&&b!=v.getCenterX()<k.getCenterX()||!t&&b!=v.getCenterY()<k.getCenterY()))){var x=[];q.traverse(v.cell,!0,function(a,b){null!=b&&x.push(b);x.push(a);return!0});q.moveCells(x,(b?1:-1)*d,(b?1:-1)*g)}}}return q.addCells(e,c)}finally{q.model.endUpdate()}}function f(a){q.model.beginUpdate();try{var b=m(a),c=q.getIncomingEdges(a),d=q.cloneCells([c[0],a]);q.model.setTerminal(c[0],d[1],!1);q.model.setTerminal(d[0],d[1],!0);q.model.setTerminal(d[0],a,!1);
-var e=q.model.getParent(a),f=e.geometry,g=[];q.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);q.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,l=-l):b==mxConstants.DIRECTION_WEST?(k=-k,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);q.moveCells(g,k,l);return q.addCells(d,e)}finally{q.model.endUpdate()}}function l(a){q.model.beginUpdate();try{var b=
-q.model.getParent(a),c=q.getIncomingEdges(a),d=q.cloneCells([c[0],a]);q.model.setTerminal(d[0],a,!0);var c=q.getOutgoingEdges(a),e=b.geometry,f=[];q.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var k=q.model.getTerminal(c[g],!1);null!=k&&f.push(k)}var l=q.view.getBounds(f),n=m(a),p=q.view.translate,t=q.view.scale;n==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/t-p.x-e.x+10,d[1].geometry.y+=d[1].geometry.height-
-e.y+40):n==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/t-p.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height+e.y+40):(d[1].geometry.x=n==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width+e.x+40):d[1].geometry.x+(d[1].geometry.width-e.x+40),d[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(l.y+l.height)/t-p.y+-e.y+10);return q.addCells(d,b)}finally{q.model.endUpdate()}}function p(a,
-b,c){a=q.getOutgoingEdges(a);c=q.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=q.view.getState(q.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function u(a,b){var c=m(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
-c==mxConstants.DIRECTION_WEST)==d&&c!=b?v.actions.get("selectParent").funct():c==b?(d=q.getOutgoingEdges(a),null!=d&&0<d.length&&q.setSelectionCell(q.model.getTerminal(d[0],!1))):(c=q.getIncomingEdges(a),null!=c&&0<c.length&&(d=p(q.model.getTerminal(c[0],!0),d,a),c=q.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&q.setSelectionCell(d[c].cell)))))}var v=this,q=v.editor.graph,x=q.getModel(),y=v.menus.createPopupMenu;
-v.menus.createPopupMenu=function(a,c,d){y.apply(this,arguments);if(1==q.getSelectionCount()){c=q.getSelectionCell();var e=q.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(q.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(q.getSelectionCell())&&(a.addSeparator(),0<q.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};v.actions.addAction("selectChildren",function(){if(q.isEnabled()&&
-1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+X");v.actions.addAction("selectSiblings",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=q.getOutgoingEdges(q.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],
-!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+S");v.actions.addAction("selectParent",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);null!=a&&0<a.length&&q.setSelectionCell(q.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectDescendants",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),b=[];q.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});q.setSelectionCells(b)}},
-null,null,"Alt+Shift+D");var D=q.removeCells;q.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];x.isEdge(g)&&d(g)&&(e.push(g),g=x.getTerminal(g,!1));b(g)?(q.traverse(g,!0,function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=q.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return D.apply(this,arguments)};v.hoverIcons.getStateAt=function(a,c,
-d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var I=q.duplicateCells;q.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=q.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=q.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var k=I.call(this,a,c);if(k.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var l=q.getIncomingEdges(k[e]),g=q.getIncomingEdges(a[e]);
-if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,q.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var z=q.moveCells;q.moveCells=function(a,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.view.getState(f),p=null!=n?n.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var t=0;t<a.length;t++)if(b(a[t])||q.model.isEdge(a[t])&&null==q.model.getTerminal(a[t],!0)){f=q.model.getParent(a[t]);
-break}if(null!=m&&f!=m&&null!=this.view.getState(a[0])){var u=q.getIncomingEdges(a[0]);if(0<u.length){var v=q.view.getState(q.model.getTerminal(u[0],!0));if(null!=v){var x=q.view.getState(m);null!=x&&(c=(x.getCenterX()-v.getCenterX())/q.view.scale,d=(x.getCenterY()-v.getCenterY())/q.view.scale)}}}}l=z.apply(this,arguments);if(null!=l&&null!=a&&l.length==a.length)for(t=0;t<l.length;t++)if(this.model.isEdge(l[t]))b(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[t],!0))&&this.model.setTerminal(l[t],
-m,!0);else if(b(a[t])&&(u=q.getIncomingEdges(a[t]),0<u.length))if(!e)b(m)&&0>mxUtils.indexOf(a,this.model.getTerminal(u[0],!0))&&this.model.setTerminal(u[0],m,!0);else if(0==q.getIncomingEdges(l[t]).length){n=m;if(null==n||n==q.model.getParent(a[t]))n=q.model.getTerminal(u[0],!0);e=this.cloneCell(u[0]);this.addEdge(e,q.getDefaultParent(),n,l[t])}}finally{this.model.endUpdate()}return l};if(null!=v.sidebar){var B=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=function(a,c,d,e){var f=q.model,g=null;
-f.beginUpdate();try{if(g=B.apply(this,arguments),b(a))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],a,!0);var l=q.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var C={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},A=v.onKeyDown;v.onKeyDown=function(a){try{if(q.isEnabled()&&!q.isEditing()&&
-b(q.getSelectionCell())&&1==q.getSelectionCount()){var c=null;0<q.getIncomingEdges(q.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?f(q.getSelectionCell()):l(q.getSelectionCell()):13==a.which&&(c=t(q.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&q.model.isEdge(c[0])?q.setSelectionCell(q.model.getTerminal(c[0],!1)):q.setSelectionCell(c[c.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(q.view.getState(q.getSelectionCell())),q.startEditingAtCell(q.getSelectionCell()),
-mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var d=C[a.keyCode];null!=d&&(d.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(u(q.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(u(q.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(u(q.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(u(q.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(Q){console.log("error",
-Q)}mxEvent.isConsumed(a)||A.apply(this,arguments)};var G=q.connectVertex;q.connectVertex=function(a,c,d,e,g,k){var n=q.getIncomingEdges(a);return b(a)&&0<n.length?(d=m(a),e=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,g=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c?l(a):e==g?f(a):t(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):G.call(this,a,c,d,e,g,k)};q.getSubtree=function(a){var d=[a];!c(a)&&!b(a)||n(a)||q.traverse(a,!0,function(a,b){null!=
+b=b.cloneNode(!0);d=b.firstChild;if(null!=d)for(c.relatedPage.root=a.decodeCell(d,!1),c=d.nextSibling,d.parentNode.removeChild(d),d=c;null!=d;){c=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var k=d.getAttribute("id");null==a.lookup(k)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=c}}return b};a.afterDecode=function(a,b,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png";EditorUi.prototype.altShiftActions[68]=
+"selectDescendants";var c=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,b,d,n,m){b=null!=b?b:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var e=d.slice(),f=[],k=0;k<d.length;k++){var g=this.view.getState(d[k]),u=null!=g?g.style:this.getCellStyle(d[k]);"1"==mxUtils.getValue(u,"treeFolding","0")&&(this.traverse(d[k],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=d[k]&&f.push(a);return a==d[k]||!this.model.isCollapsed(a)})),
+this.model.setCollapsed(d[k],a))}for(k=0;k<f.length;k++)this.model.setVisible(f[k],!a);d=e;d=c.apply(this,arguments)}finally{this.model.endUpdate()}return d};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return x.isVertex(a)&&d(a)}function c(a){var b=!1;null!=a&&(b=t.view.getState(a),b="1"==(null!=b?b.style:t.getCellStyle(a)).treeMoving);
+return b}function d(a){var b=!1;null!=a&&(a=x.getParent(a),b=t.view.getState(a),b="tree"==(null!=b?b.style:t.getCellStyle(a)).containerType);return b}function n(a){var b=!1;null!=a&&(a=x.getParent(a),b=t.view.getState(a),t.view.getState(a),b=null!=(null!=b?b.style:t.getCellStyle(a)).childLayout);return b}function m(a){a=t.view.getState(a);if(null!=a){var b=t.getIncomingEdges(a.cell);if(0<b.length&&(b=t.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==
+a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function q(a,b){b=null!=b?b:!0;t.model.beginUpdate();try{var c=t.model.getParent(a),d=t.getIncomingEdges(a),e=t.cloneCells([d[0],a]);t.model.setTerminal(e[0],t.model.getTerminal(d[0],!0),!0);var f=m(a),k=c.geometry;f==mxConstants.DIRECTION_SOUTH||
+f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;t.view.currentRoot!=c&&(e[1].geometry.x-=k.x,e[1].geometry.y-=k.y);var g=t.view.getState(a),l=t.view.scale;if(null!=g){var n=mxRectangle.fromRectangle(g);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*l:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var p=t.getOutgoingEdges(t.model.getTerminal(d[0],
+!0));if(null!=p){for(var q=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,u=k=d=0;u<p.length;u++){var z=t.model.getTerminal(p[u],!1);if(f==m(z)){var v=t.view.getState(z);z!=a&&null!=v&&(q&&b!=v.getCenterX()<g.getCenterX()||!q&&b!=v.getCenterY()<g.getCenterY())&&mxUtils.intersects(n,v)&&(d=10+Math.max(d,(Math.min(n.x+n.width,v.x+v.width)-Math.max(n.x,v.x))/l),k=10+Math.max(k,(Math.min(n.y+n.height,v.y+v.height)-Math.max(n.y,v.y))/l))}}q?k=0:d=0;for(u=0;u<p.length;u++)if(z=t.model.getTerminal(p[u],
+!1),f==m(z)&&(v=t.view.getState(z),z!=a&&null!=v&&(q&&b!=v.getCenterX()<g.getCenterX()||!q&&b!=v.getCenterY()<g.getCenterY()))){var x=[];t.traverse(v.cell,!0,function(a,b){null!=b&&x.push(b);x.push(a);return!0});t.moveCells(x,(b?1:-1)*d,(b?1:-1)*k)}}}return t.addCells(e,c)}finally{t.model.endUpdate()}}function f(a){t.model.beginUpdate();try{var b=m(a),c=t.getIncomingEdges(a),d=t.cloneCells([c[0],a]);t.model.setTerminal(c[0],d[1],!1);t.model.setTerminal(d[0],d[1],!0);t.model.setTerminal(d[0],a,!1);
+var e=t.model.getParent(a),f=e.geometry,k=[];t.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);t.traverse(a,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});var g=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?g=0:b==mxConstants.DIRECTION_NORTH?(g=0,l=-l):b==mxConstants.DIRECTION_WEST?(g=-g,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);t.moveCells(k,g,l);return t.addCells(d,e)}finally{t.model.endUpdate()}}function l(a){t.model.beginUpdate();try{var b=
+t.model.getParent(a),c=t.getIncomingEdges(a),d=t.cloneCells([c[0],a]);t.model.setTerminal(d[0],a,!0);var c=t.getOutgoingEdges(a),e=b.geometry,f=[];t.view.currentRoot==b&&(e=new mxRectangle);for(var k=0;k<c.length;k++){var g=t.model.getTerminal(c[k],!1);null!=g&&f.push(g)}var l=t.view.getBounds(f),n=m(a),p=t.view.translate,q=t.view.scale;n==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/q-p.x-e.x+10,d[1].geometry.y+=d[1].geometry.height-
+e.y+40):n==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/q-p.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height+e.y+40):(d[1].geometry.x=n==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width+e.x+40):d[1].geometry.x+(d[1].geometry.width-e.x+40),d[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(l.y+l.height)/q-p.y+-e.y+10);return t.addCells(d,b)}finally{t.model.endUpdate()}}function p(a,
+b,c){a=t.getOutgoingEdges(a);c=t.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=t.view.getState(t.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function u(a,b){var c=m(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
+c==mxConstants.DIRECTION_WEST)==d&&c!=b?v.actions.get("selectParent").funct():c==b?(d=t.getOutgoingEdges(a),null!=d&&0<d.length&&t.setSelectionCell(t.model.getTerminal(d[0],!1))):(c=t.getIncomingEdges(a),null!=c&&0<c.length&&(d=p(t.model.getTerminal(c[0],!0),d,a),c=t.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&t.setSelectionCell(d[c].cell)))))}var v=this,t=v.editor.graph,x=t.getModel(),y=v.menus.createPopupMenu;
+v.menus.createPopupMenu=function(a,c,d){y.apply(this,arguments);if(1==t.getSelectionCount()){c=t.getSelectionCell();var e=t.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(t.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(t.getSelectionCell())&&(a.addSeparator(),0<t.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};v.actions.addAction("selectChildren",function(){if(t.isEnabled()&&
+1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+X");v.actions.addAction("selectSiblings",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=t.getOutgoingEdges(t.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],
+!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+S");v.actions.addAction("selectParent",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);null!=a&&0<a.length&&t.setSelectionCell(t.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectDescendants",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),b=[];t.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});t.setSelectionCells(b)}},
+null,null,"Alt+Shift+D");var D=t.removeCells;t.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var k=a[f];x.isEdge(k)&&d(k)&&(e.push(k),k=x.getTerminal(k,!1));b(k)?(t.traverse(k,!0,function(a,b){null!=b&&e.push(b);e.push(a);return!0}),k=t.getIncomingEdges(a[f]),a=a.concat(k)):e.push(a[f])}a=e;return D.apply(this,arguments)};v.hoverIcons.getStateAt=function(a,c,
+d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var I=t.duplicateCells;t.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=t.view.getState(d[e]);if(null!=f&&b(f.cell))for(var k=t.getIncomingEdges(f.cell),f=0;f<k.length;f++)mxUtils.remove(k[f],a)}this.model.beginUpdate();try{var g=I.call(this,a,c);if(g.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var m=t.getIncomingEdges(g[e]),k=t.getIncomingEdges(a[e]);
+if(0==m.length&&0<k.length){var l=this.cloneCell(k[0]);this.addEdge(l,t.getDefaultParent(),this.model.getTerminal(k[0],!0),g[e])}}}finally{this.model.endUpdate()}return g};var z=t.moveCells;t.moveCells=function(a,c,d,e,f,k,g){var m=null;this.model.beginUpdate();try{var l=f,n=this.view.getState(f),p=null!=n?n.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var q=0;q<a.length;q++)if(b(a[q])||t.model.isEdge(a[q])&&null==t.model.getTerminal(a[q],!0)){f=t.model.getParent(a[q]);
+break}if(null!=l&&f!=l&&null!=this.view.getState(a[0])){var u=t.getIncomingEdges(a[0]);if(0<u.length){var v=t.view.getState(t.model.getTerminal(u[0],!0));if(null!=v){var x=t.view.getState(l);null!=x&&(c=(x.getCenterX()-v.getCenterX())/t.view.scale,d=(x.getCenterY()-v.getCenterY())/t.view.scale)}}}}m=z.apply(this,arguments);if(null!=m&&null!=a&&m.length==a.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(l)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[q],!0))&&this.model.setTerminal(m[q],
+l,!0);else if(b(a[q])&&(u=t.getIncomingEdges(a[q]),0<u.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(u[0],!0))&&this.model.setTerminal(u[0],l,!0);else if(0==t.getIncomingEdges(m[q]).length){n=l;if(null==n||n==t.model.getParent(a[q]))n=t.model.getTerminal(u[0],!0);e=this.cloneCell(u[0]);this.addEdge(e,t.getDefaultParent(),n,m[q])}}finally{this.model.endUpdate()}return m};if(null!=v.sidebar){var B=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=function(a,c,d,e){var f=t.model,k=null;
+f.beginUpdate();try{if(k=B.apply(this,arguments),b(a))for(var g=0;g<k.length;g++)if(f.isEdge(k[g])&&null==f.getTerminal(k[g],!0)){f.setTerminal(k[g],a,!0);var m=t.getCellGeometry(k[g]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return k}}var C={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},A=v.onKeyDown;v.onKeyDown=function(a){try{if(t.isEnabled()&&!t.isEditing()&&
+b(t.getSelectionCell())&&1==t.getSelectionCount()){var c=null;0<t.getIncomingEdges(t.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?f(t.getSelectionCell()):l(t.getSelectionCell()):13==a.which&&(c=q(t.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&t.model.isEdge(c[0])?t.setSelectionCell(t.model.getTerminal(c[0],!1)):t.setSelectionCell(c[c.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(t.view.getState(t.getSelectionCell())),t.startEditingAtCell(t.getSelectionCell()),
+mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var d=C[a.keyCode];null!=d&&(d.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(u(t.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(u(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(u(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(u(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(Q){console.log("error",
+Q)}mxEvent.isConsumed(a)||A.apply(this,arguments)};var G=t.connectVertex;t.connectVertex=function(a,c,d,e,k,g){var n=t.getIncomingEdges(a);return b(a)&&0<n.length?(d=m(a),e=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,k=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c?l(a):e==k?f(a):q(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):G.call(this,a,c,d,e,k,g)};t.getSubtree=function(a){var d=[a];!c(a)&&!b(a)||n(a)||t.traverse(a,!0,function(a,b){null!=
b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d};var F=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){F.apply(this,arguments);(c(this.state.cell)||b(this.state.cell))&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="18px",
this.moveHandle.style.height="18px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));this.graph.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells);this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);
this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var J=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var H=mxVertexHandler.prototype.destroy;
@@ -9506,8 +9516,8 @@ mxVertexHandler.prototype.destroy=function(a,b){H.apply(this,arguments);null!=th
a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");b.vertex=!0;var c=new mxCell("Topic",
new mxGeometry(320,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");d.geometry.relative=!0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!1);var e=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");
e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);e.insertEdge(g,!1);var p=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;");p.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-u.geometry.relative=!0;u.edge=!0;b.insertEdge(u,!0);p.insertEdge(u,!1);var 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]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");v.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-q.geometry.relative=!0;q.edge=!0;b.insertEdge(q,!0);v.insertEdge(q,!1);a.insert(d);a.insert(g);a.insert(u);a.insert(q);a.insert(b);a.insert(c);a.insert(e);a.insert(p);a.insert(v);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");a.vertex=
+u.geometry.relative=!0;u.edge=!0;b.insertEdge(u,!0);p.insertEdge(u,!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]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");v.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+t.geometry.relative=!0;t.edge=!0;b.insertEdge(t,!0);v.insertEdge(t,!1);a.insert(d);a.insert(g);a.insert(u);a.insert(t);a.insert(b);a.insert(c);a.insert(e);a.insert(p);a.insert(v);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");a.vertex=
!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");a.vertex=!0;var b=new mxCell("",
new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;");
a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");
@@ -9525,7 +9535,7 @@ g.className="geTitle";b.appendChild(g);return g}var d=document.createElement("di
c("newLibrary",mxResources.get("newLibrary")),d.style.boxSizing="border-box",d.style.paddingRight="6px",d.style.paddingLeft="6px",d.style.height="32px",d.style.left="0",d=c("openLibraryFrom",mxResources.get("openLibraryFrom")),d.style.borderLeft="1px solid lightgray",d.style.boxSizing="border-box",d.style.paddingRight="6px",d.style.paddingLeft="6px",d.style.height="32px",d.style.left="50%";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.minimumSize=new mxRectangle(0,
0,90,90);a.sidebarWindow.window.setVisible(!0);a.getLocalData("sidebar",function(b){a.sidebar.showEntries(b,null,!0)});a.restoreLibraries()}else a.sidebarWindow.window.setVisible(!a.sidebarWindow.window.isVisible());a.sidebarWindow.window.isVisible()&&a.sidebarWindow.window.fit()}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
try{var b=document.createElement("style");b.type="text/css";b.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * { font-size:13px; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select:none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity:0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding:2px;display:inline-block; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geToolbarContainer { background:#fff !important; }div.geSidebarContainer { background-color: #ffffff; }div.geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: rgb(249, 249, 249) !important; color: #A0A0A0 !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }"+
-(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"");document.getElementsByTagName("head")[0].appendChild(b)}catch(q){}var g=function(a,b,c,d,e,f,g){var k=document.createElement("div");k.className="geSidebarContainer";k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.border="1px solid whiteSmoke";k.style.overflowX="hidden";k.style.overflowY="auto";g(k);this.window=new mxWindow(b,k,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"");document.getElementsByTagName("head")[0].appendChild(b)}catch(t){}var g=function(a,b,c,d,e,f,g){var k=document.createElement("div");k.className="geSidebarContainer";k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.border="1px solid whiteSmoke";k.style.overflowX="hidden";k.style.overflowY="auto";g(k);this.window=new mxWindow(b,k,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&&
(this.window.div.onselectstart=mxUtils.bind(this,function(b){null==b&&(b=window.event);return null!=b&&a.isSelectionAllowed(b)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;
mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR=
@@ -9533,7 +9543,7 @@ mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7
"#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var e=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=
function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px");e.apply(this,arguments)};var k=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){k.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var n=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>d&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",
b.shortcut):n.apply(this,arguments)};var m=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){m.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height=
-"24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"));"none"!=a.style.display&&(a.style.display="inline-block")}};var t=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){t.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage=
+"24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"));"none"!=a.style.display&&(a.style.display="inline-block")}};var q=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){q.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage=
"url("+Editor.shareImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px"}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="8px";a.style.marginRight="4px";var b=document.createElement("a");b.className="geMenuItem gePrimaryBtn";b.style.marginLeft=
"8px";b.style.padding="6px";"1"==urlParams.noSaveBtn?(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),
"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geMenuItem",b.style.marginLeft="6px",b.style.padding="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className="geMenuItem";b.style.marginLeft=
@@ -9555,58 +9565,58 @@ c);b.insertTemplateEnabled&&!b.isOffline()&&b.menus.addMenuItems(a,["insertTempl
k=function(a,c,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(b,d,e);b.showDialog(a.container,620,420,!0,!1);a.init()}),c)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<g.length;c++)"-"==g[c]?a.addSeparator(b):k(a,b,mxResources.get(g[c])+"...",g[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,c){b.menus.addMenuItems(a,"grid guides ruler - connectionArrows connectionPoints -".split(" "),c);if("undefined"!==typeof MathJax){var d=
b.menus.addMenuItem(a,"mathematicalTypesetting",c);b.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}b.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"],c)})))};var v=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a,b,c){var d=k.menus.get(a),e=p.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),n);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";
e.style.top="6px";e.style.marginRight="6px";e.style.height="30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",mxResources.get(a));k.menus.menuCreated(d,e,"geMenuItem");null!=c?(e.style.backgroundImage="url("+c+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.width="34px",e.innerHTML=""):b||(e.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",e.style.backgroundPosition=
-"right 6px center",e.style.backgroundRepeat="no-repeat",e.style.paddingRight="22px");return e}function b(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=k.statusContainer?m.insertBefore(g,k.statusContainer):m.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition=
+"right 6px center",e.style.backgroundRepeat="no-repeat",e.style.paddingRight="22px");return e}function b(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=k.statusContainer?l.insertBefore(g,k.statusContainer):l.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition=
"center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px"):mxUtils.write(g,a);mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(g,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),g.style.cursor=
"pointer"):(g.setAttribute("disabled","disabled"),g.style.cursor="default")},e.addListener("stateChanged",a),a());return g}function e(a,b){var c=document.createElement("div");c.className="geMenuItem";c.style.display="inline-block";c.style.verticalAlign="top";c.style.marginRight="6px";c.style.padding="0 4px 0 4px";c.style.height="30px";c.style.position="relative";c.style.top="0px";for(var d=0;d<a.length;d++)null!=a[d]&&(a[d].style.margin="0px",a[d].style.boxShadow="none",c.appendChild(a[d]));null!=
-b&&mxUtils.setOpacity(c,b);null!=k.statusContainer?m.insertBefore(c,k.statusContainer):m.appendChild(c);return c}function f(){for(var c=m.firstChild;null!=c;){var f=c.nextSibling;"geMenuItem"!=c.className&&"geItem"!=c.className||c.parentNode.removeChild(c);c=f}n=m.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(c=1E3>d)||a("diagram");e([c?a("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,b(mxResources.get("shapes"),k.actions.get("toggleShapes").funct,
+b&&mxUtils.setOpacity(c,b);null!=k.statusContainer?l.insertBefore(c,k.statusContainer):l.appendChild(c);return c}function f(){for(var c=l.firstChild;null!=c;){var f=c.nextSibling;"geMenuItem"!=c.className&&"geItem"!=c.className||c.parentNode.removeChild(c);c=f}n=l.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(c=1E3>d)||a("diagram");e([c?a("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,b(mxResources.get("shapes"),k.actions.get("toggleShapes").funct,
null,mxResources.get("shapes"),k.actions.get("image"),c?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),b(mxResources.get("format"),k.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+k.actions.get("formatPanel").shortcut+")",k.actions.get("image"),
c?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
null)],c?60:null);f=a("insert",!0,c?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null);e([f,b(mxResources.get("delete"),k.actions.get("delete").funct,null,mxResources.get("delete"),k.actions.get("delete"),c?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
null)],c?60:null);if(411<=d&&(f=k.actions.get("undo"),c=k.actions.get("redo"),f=b("",f.funct,null,mxResources.get("undo")+" ("+f.shortcut+")",f,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),c=b("",
c.funct,null,mxResources.get("redo")+" ("+c.shortcut+")",c,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),e([f,c],60),480<=d)){var c=k.actions.get("zoomIn"),f=k.actions.get("zoomOut"),g=k.actions.get("resetView");
-e([b("",function(){l.popupMenuHandler.hideMenu();var a=l.view.scale,b=l.view.translate.x,c=l.view.translate.y;k.actions.get("resetView").funct();1E-5>Math.abs(a-l.view.scale)&&b==l.view.translate.x&&c==l.view.translate.y&&k.actions.get(l.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
+e([b("",function(){m.popupMenuHandler.hideMenu();var a=m.view.scale,b=m.view.translate.x,c=m.view.translate.y;k.actions.get("resetView").funct();1E-5>Math.abs(a-m.view.scale)&&b==m.view.translate.x&&c==m.view.translate.y&&k.actions.get(m.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
640<=d?b("",c.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",c,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
null,640<=d?b("",f.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",f,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
null],60)}c=k.menus.get("language");null!=c&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=d?(null==N&&(f=p.addMenu("",c.funct),f.setAttribute("title",mxResources.get("language")),f.className="geToolbarButton",f.style.backgroundImage="url("+Editor.globeImage+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.position="absolute",f.style.height="24px",f.style.width="24px",f.style.zIndex="1",f.style.right="8px",f.style.cursor=
-"pointer",f.style.top="1"==urlParams.embed?"12px":"11px",m.appendChild(f),N=f),k.buttonContainer.style.paddingRight="34px"):(k.buttonContainer.style.paddingRight="4px",null!=N&&(N.parentNode.removeChild(N),N=null))}v.apply(this,arguments);var g=document.createElement("div");g.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";g.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(g);null==urlParams.clibs&&
-null==urlParams.libs||c(this);var k=this,l=k.editor.graph;k.toolbar=this.createToolbar(k.createDiv("geToolbar"));k.defaultLibraryName=mxResources.get("untitledLibrary");var m=document.createElement("div");m.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var n=null,p=new Menubar(k,m);k.statusContainer=k.createStatusContainer();k.statusContainer.style.position="relative";
-k.statusContainer.style.maxWidth="";k.statusContainer.style.marginTop="7px";k.statusContainer.style.marginLeft="6px";k.statusContainer.style.color="gray";k.statusContainer.style.cursor="default";k.editor.addListener("statusChanged",mxUtils.bind(this,function(){k.setStatusText(k.editor.getStatus())}));var t=k.descriptorChanged;k.descriptorChanged=function(){t.apply(this,arguments);var a=k.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":
-"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);m.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else m.removeAttribute("title")};k.setStatusText(k.editor.getStatus());m.appendChild(k.statusContainer);k.buttonContainer=document.createElement("div");k.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";m.appendChild(k.buttonContainer);k.menubarContainer=k.buttonContainer;
+"pointer",f.style.top="1"==urlParams.embed?"12px":"11px",l.appendChild(f),N=f),k.buttonContainer.style.paddingRight="34px"):(k.buttonContainer.style.paddingRight="4px",null!=N&&(N.parentNode.removeChild(N),N=null))}v.apply(this,arguments);var g=document.createElement("div");g.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";g.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(g);null==urlParams.clibs&&
+null==urlParams.libs||c(this);var k=this,m=k.editor.graph;k.toolbar=this.createToolbar(k.createDiv("geToolbar"));k.defaultLibraryName=mxResources.get("untitledLibrary");var l=document.createElement("div");l.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var n=null,p=new Menubar(k,l);k.statusContainer=k.createStatusContainer();k.statusContainer.style.position="relative";
+k.statusContainer.style.maxWidth="";k.statusContainer.style.marginTop="7px";k.statusContainer.style.marginLeft="6px";k.statusContainer.style.color="gray";k.statusContainer.style.cursor="default";k.editor.addListener("statusChanged",mxUtils.bind(this,function(){k.setStatusText(k.editor.getStatus())}));var q=k.descriptorChanged;k.descriptorChanged=function(){q.apply(this,arguments);var a=k.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":
+"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);l.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else l.removeAttribute("title")};k.setStatusText(k.editor.getStatus());l.appendChild(k.statusContainer);k.buttonContainer=document.createElement("div");k.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";l.appendChild(k.buttonContainer);k.menubarContainer=k.buttonContainer;
k.tabContainer=document.createElement("div");k.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var g=k.diagramContainer.parentNode,u=document.createElement("div");u.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";k.diagramContainer.style.top="47px";var H=k.menus.get("viewZoom");
if(null!=H){this.tabContainer.style.right="70px";var E=p.addMenu("100%",H.funct);E.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");E.style.whiteSpace="nowrap";E.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";E.style.backgroundPosition="right 6px center";E.style.backgroundRepeat="no-repeat";E.style.backgroundColor="#ffffff";E.style.paddingRight="10px";E.style.display="block";E.style.position="absolute";E.style.textDecoration="none";E.style.textDecoration="none";
E.style.right="0px";E.style.bottom="0px";E.style.overflow="hidden";E.style.visibility="hidden";E.style.textAlign="center";E.style.color="#000";E.style.fontSize="12px";E.style.color="#707070";E.style.width="59px";E.style.cursor="pointer";E.style.borderTop="1px solid lightgray";E.style.borderLeft="1px solid lightgray";E.style.height=parseInt(k.tabContainerHeight)-1+"px";E.style.lineHeight=parseInt(k.tabContainerHeight)+1+"px";u.appendChild(E);H=mxUtils.bind(this,function(){E.innerHTML=Math.round(100*
-k.editor.graph.view.scale)+"%"});k.editor.graph.view.addListener(mxEvent.EVENT_SCALE,H);k.editor.addListener("resetGraphView",H);k.editor.addListener("pageSelected",H);var K=k.setGraphEnabled;k.setGraphEnabled=function(){K.apply(this,arguments);null!=this.tabContainer&&(E.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}u.appendChild(k.tabContainer);u.appendChild(m);u.appendChild(k.diagramContainer);
+k.editor.graph.view.scale)+"%"});k.editor.graph.view.addListener(mxEvent.EVENT_SCALE,H);k.editor.addListener("resetGraphView",H);k.editor.addListener("pageSelected",H);var K=k.setGraphEnabled;k.setGraphEnabled=function(){K.apply(this,arguments);null!=this.tabContainer&&(E.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}u.appendChild(k.tabContainer);u.appendChild(l);u.appendChild(k.diagramContainer);
g.appendChild(u);k.updateTabContainer();var N=null;f();mxEvent.addListener(window,"resize",function(){f();null!=k.sidebarWindow&&k.sidebarWindow.window.fit();null!=k.formatWindow&&k.formatWindow.window.fit();null!=k.actions.outlineWindow&&k.actions.outlineWindow.window.fit();null!=k.actions.layersWindow&&k.actions.layersWindow.window.fit();null!=k.menus.tagsWindow&&k.menus.tagsWindow.window.fit();null!=k.menus.findWindow&&k.menus.findWindow.window.fit()})}}};
-(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,d,k){var e=c.y,g=c.x,t=!1,f=!1;if(null!=this.states&&null!=b&&null!=c){var l=this,p=new mxCellState,u=this.graph.getView().scale,v=Math.max(2,this.getGuideTolerance()/2);p.x=b.x+g;p.y=b.y+e;p.width=b.width;p.height=b.height;for(var q=[],x=[],y=0;y<this.states.length;y++){var D=this.states[y];D instanceof mxCellState&&(k||!this.graph.isCellSelected(D.cell))&&((p.x>=D.x&&p.x<=D.x+D.width||D.x>=p.x&&D.x<=p.x+p.width)&&(p.y>
-D.y+D.height+4||p.y+p.height+4<D.y)?q.push(D):(p.y>=D.y&&p.y<=D.y+D.height||D.y>=p.y&&D.y<=p.y+p.height)&&(p.x>D.x+D.width+4||p.x+p.width+4<D.x)&&x.push(D))}var I=0,z=0,B=D=0,C=0,A=0,G=0,F=0,J=5*u;if(1<q.length){q.push(p);q.sort(function(a,b){return a.y-b.y});var H=!1,y=p==q[0],u=p==q[q.length-1];if(!y&&!u)for(y=1;y<q.length-1;y++)if(p==q[y]){u=q[y-1];y=q[y+1];D=z=B=(y.y-u.y-u.height-p.height)/2;break}for(y=0;y<q.length-1;y++){var u=q[y],E=q[y+1],K=p==u||p==E,E=E.y-u.y-u.height,H=H|p==u;if(0==z&&
-0==I)z=E,I=1;else if(Math.abs(z-E)<=(K||1==y&&H?v:0))I+=1;else if(1<I&&H){q=q.slice(0,y+1);break}else if(3<=q.length-y&&!H)I=0,D=z=0!=B?B:0,q.splice(0,0==y?1:y),y=-1;else break;0!=D||K||(z=D=E)}3==q.length&&q[1]==p&&(D=0)}if(1<x.length){x.push(p);x.sort(function(a,b){return a.x-b.x});H=!1;y=p==x[0];u=p==x[x.length-1];if(!y&&!u)for(y=1;y<x.length-1;y++)if(p==x[y]){u=x[y-1];y=x[y+1];G=A=F=(y.x-u.x-u.width-p.width)/2;break}for(y=0;y<x.length-1;y++){u=x[y];E=x[y+1];K=p==u||p==E;E=E.x-u.x-u.width;H|=p==
+(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,d,k){var e=c.y,g=c.x,q=!1,f=!1;if(null!=this.states&&null!=b&&null!=c){var l=this,p=new mxCellState,u=this.graph.getView().scale,v=Math.max(2,this.getGuideTolerance()/2);p.x=b.x+g;p.y=b.y+e;p.width=b.width;p.height=b.height;for(var t=[],x=[],y=0;y<this.states.length;y++){var D=this.states[y];D instanceof mxCellState&&(k||!this.graph.isCellSelected(D.cell))&&((p.x>=D.x&&p.x<=D.x+D.width||D.x>=p.x&&D.x<=p.x+p.width)&&(p.y>
+D.y+D.height+4||p.y+p.height+4<D.y)?t.push(D):(p.y>=D.y&&p.y<=D.y+D.height||D.y>=p.y&&D.y<=p.y+p.height)&&(p.x>D.x+D.width+4||p.x+p.width+4<D.x)&&x.push(D))}var I=0,z=0,B=D=0,C=0,A=0,G=0,F=0,J=5*u;if(1<t.length){t.push(p);t.sort(function(a,b){return a.y-b.y});var H=!1,y=p==t[0],u=p==t[t.length-1];if(!y&&!u)for(y=1;y<t.length-1;y++)if(p==t[y]){u=t[y-1];y=t[y+1];D=z=B=(y.y-u.y-u.height-p.height)/2;break}for(y=0;y<t.length-1;y++){var u=t[y],E=t[y+1],K=p==u||p==E,E=E.y-u.y-u.height,H=H|p==u;if(0==z&&
+0==I)z=E,I=1;else if(Math.abs(z-E)<=(K||1==y&&H?v:0))I+=1;else if(1<I&&H){t=t.slice(0,y+1);break}else if(3<=t.length-y&&!H)I=0,D=z=0!=B?B:0,t.splice(0,0==y?1:y),y=-1;else break;0!=D||K||(z=D=E)}3==t.length&&t[1]==p&&(D=0)}if(1<x.length){x.push(p);x.sort(function(a,b){return a.x-b.x});H=!1;y=p==x[0];u=p==x[x.length-1];if(!y&&!u)for(y=1;y<x.length-1;y++)if(p==x[y]){u=x[y-1];y=x[y+1];G=A=F=(y.x-u.x-u.width-p.width)/2;break}for(y=0;y<x.length-1;y++){u=x[y];E=x[y+1];K=p==u||p==E;E=E.x-u.x-u.width;H|=p==
u;if(0==A&&0==C)A=E,C=1;else if(Math.abs(A-E)<=(K||1==y&&H?v:0))C+=1;else if(1<C&&H){x=x.slice(0,y+1);break}else if(3<=x.length-y&&!H)C=0,G=A=0!=F?F:0,x.splice(0,0==y?1:y),y=-1;else break;0!=G||K||(A=G=E)}3==x.length&&x[1]==p&&(G=0)}v=function(a,b,c,d){var e=[],f;d?(d=J,f=0):(d=0,f=J);e.push(new mxPoint(a.x-d,a.y-f));e.push(new mxPoint(a.x+d,a.y+f));e.push(a);e.push(b);e.push(new mxPoint(b.x-d,b.y-f));e.push(new mxPoint(b.x+d,b.y+f));if(null!=c)return c.points=e,c;a=new mxPolyline(e,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(l.graph.getView().getOverlayPane());return a};A=function(a,b){if(a&&null!=l.guidesArrHor)for(var c=0;c<l.guidesArrHor.length;c++)l.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=l.guidesArrVer)for(c=0;c<l.guidesArrVer.length;c++)l.guidesArrVer[c].node.style.visibility="hidden"};if(1<C&&C==x.length-1){C=[];F=l.guidesArrHor;t=[];g=0;y=x[0]==p?1:0;H=x[y].y+x[y].height;if(0<G)for(y=0;y<x.length-1;y++)u=
-x[y],E=x[y+1],p==u?(g=E.x-u.width-G,t.push(new mxPoint(g+u.width+J,H)),t.push(new mxPoint(E.x-J,H))):p==E?(t.push(new mxPoint(u.x+u.width+J,H)),g=u.x+u.width+G,t.push(new mxPoint(g-J,H))):(t.push(new mxPoint(u.x+u.width+J,H)),t.push(new mxPoint(E.x-J,H)));else u=x[0],y=x[2],g=u.x+u.width+(y.x-u.x-u.width-p.width)/2,t.push(new mxPoint(u.x+u.width+J,H)),t.push(new mxPoint(g-J,H)),t.push(new mxPoint(g+p.width+J,H)),t.push(new mxPoint(y.x-J,H));for(y=0;y<t.length;y+=2)x=t[y],G=t[y+1],x=v(x,G,null!=F?
-F[y/2]:null),x.node.style.visibility="visible",x.redraw(),C.push(x);for(y=t.length/2;null!=F&&y<F.length;y++)F[y].destroy();l.guidesArrHor=C;g-=b.x;t=!0}else A(!0);if(1<I&&I==q.length-1){C=[];F=l.guidesArrVer;f=[];e=0;y=q[0]==p?1:0;I=q[y].x+q[y].width;if(0<D)for(y=0;y<q.length-1;y++)u=q[y],E=q[y+1],p==u?(e=E.y-u.height-D,f.push(new mxPoint(I,e+u.height+J)),f.push(new mxPoint(I,E.y-J))):p==E?(f.push(new mxPoint(I,u.y+u.height+J)),e=u.y+u.height+D,f.push(new mxPoint(I,e-J))):(f.push(new mxPoint(I,u.y+
-u.height+J)),f.push(new mxPoint(I,E.y-J)));else u=q[0],y=q[2],e=u.y+u.height+(y.y-u.y-u.height-p.height)/2,f.push(new mxPoint(I,u.y+u.height+J)),f.push(new mxPoint(I,e-J)),f.push(new mxPoint(I,e+p.height+J)),f.push(new mxPoint(I,y.y-J));for(y=0;y<f.length;y+=2)x=f[y],G=f[y+1],x=v(x,G,null!=F?F[y/2]:null,!0),x.node.style.visibility="visible",x.redraw(),C.push(x);for(y=f.length/2;null!=F&&y<F.length;y++)F[y].destroy();l.guidesArrVer=C;e-=b.y;f=!0}else A(!1,!0)}if(t||f)return p=new mxPoint(g,e),q=a.call(this,
-b,p,d,k),t&&!f?p.y=q.y:f&&!t&&(p.x=q.x),q.y!=p.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),q.x!=p.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),p;A(!0,!0);return a.apply(this,arguments)};var c=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){c.call(this,a);var b=this.guidesArrVer,d=this.guidesArrHor;if(null!=b)for(var k=0;k<b.length;k++)b[k].node.style.visibility=a?"visible":"hidden";if(null!=
-d)for(k=0;k<d.length;k++)d[k].node.style.visibility=a?"visible":"hidden"};var d=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){d.call(this);var a=this.guidesArrVer,c=this.guidesArrHor;if(null!=a){for(var e=0;e<a.length;e++)a[e].destroy();this.guidesArrVer=null}if(null!=c){for(e=0;e<c.length;e++)c[e].destroy();this.guidesArrHor=null}}})();function mxRuler(a,c,d,b){function g(){var b=a.diagramContainer;t.style.top=b.offsetTop-k+"px";t.style.left=b.offsetLeft-k+"px";t.style.width=(d?0:b.offsetWidth)+k+"px";t.style.height=(d?b.offsetHeight:0)+k+"px"}function e(a,b,c){var d;return function(){var e=this,f=arguments,g=c&&!d;clearTimeout(d);d=setTimeout(function(){d=null;c||a.apply(e,f)},b);g&&a.apply(e,f)}}var k=this.RULER_THICKNESS,n=this;this.unit=c;var m="dark"!=window.uiTheme?{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",
-strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"}:{bkgClr:"#202020",outBkgClr:"#2a2a2a",cornerClr:"#2a2a2a",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"},t=document.createElement("div");t.style.position="absolute";t.style.background=m.bkgClr;t.style[d?"borderRight":"borderBottom"]="0.5px solid "+m.strokeClr;t.style.borderLeft="0.5px solid "+m.strokeClr;document.body.appendChild(t);mxEvent.disableContextMenu(t);this.editorUiRefresh=a.refresh;a.refresh=function(b){n.editorUiRefresh.apply(a,
-arguments);g()};g();var f=document.createElement("canvas");f.width=t.offsetWidth;f.height=t.offsetHeight;t.style.overflow="hidden";f.style.position="relative";t.appendChild(f);var l=f.getContext("2d");this.ui=a;var p=a.editor.graph;this.graph=p;this.container=t;this.canvas=f;var u=function(a,b,c,e,f){a=Math.round(a);b=Math.round(b);c=Math.round(c);e=Math.round(e);l.beginPath();l.moveTo(a+.5,b+.5);l.lineTo(c+.5,e+.5);l.stroke();f&&(d?(l.save(),l.translate(a,b),l.rotate(-Math.PI/2),l.fillText(f,0,0),
-l.restore()):l.fillText(f,a,b))},v=function(){l.clearRect(0,0,f.width,f.height);l.beginPath();l.lineWidth=.7;l.strokeStyle=m.strokeClr;l.setLineDash([]);l.font="9px Arial";l.textAlign="center";var a=p.view.scale,b=p.view.getBackgroundPageBounds(),c=p.view.translate,e=p.view.getGraphBounds(),g=p.pageVisible,t=g?k+(d?b.y-p.container.scrollTop:b.x-p.container.scrollLeft):k+(d?c.y-p.container.scrollTop:c.x-p.container.scrollLeft),v=0;g&&(v=d?Math.floor(((e.y+1)/a-c.y)/p.pageFormat.height)*p.pageFormat.height*
-a:Math.floor(((e.x+1)/a-c.x)/p.pageFormat.width)*p.pageFormat.width*a);var C,A,G;switch(n.unit){case mxConstants.POINTS:C=G=10;A=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:G=10;C=mxConstants.PIXELS_PER_MM;A=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:G=.5>=a||4<=a?8:16,C=mxConstants.PIXELS_PER_INCH/G,A=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}c=C;2<=a?c=C/(2*Math.floor(a/2)):.5>=a&&(c=C*Math.floor(1/a/2)*(n.unit==mxConstants.MILLIMETERS?2:1));C=null;b=g?Math.min(t+(d?b.height:b.width),
-d?f.height:f.width):d?f.height:f.width;g&&(l.fillStyle=m.outBkgClr,d?(l.fillRect(0,k,k,t-k),l.fillRect(0,b,k,f.height)):(l.fillRect(k,0,t-k,k),l.fillRect(b,0,f.width,k)));l.fillStyle=m.fontClr;for(g=g?t:t%(c*a);g<=b;g+=c*a)if(e=Math.round((g-t)/a/c),!(g<k||e==C)){C=e;var F=null;0==e%G&&(F=n.formatText(v+e*c)+"");d?u(k-A[Math.abs(e)%G],g,k,g,F):u(g,k-A[Math.abs(e)%G],g,k,F)}l.lineWidth=1;u(d?0:k,d?k:0,k,k);l.fillStyle=m.cornerClr;l.fillRect(0,0,k,k)};this.drawRuler=v;this.sizeListener=c=e(function(){var a=
-p.container;d?(a=a.offsetHeight+k,f.height!=a&&(f.height=a,t.style.height=a+"px",v())):(a=a.offsetWidth+k,f.width!=a&&(f.width=a,t.style.width=a+"px",v()))},10);this.pageListener=function(){v()};this.scrollListener=b=e(function(){var a=d?p.container.scrollTop:p.container.scrollLeft;n.lastScroll!=a&&(n.lastScroll=a,v())},10);this.unitListener=function(a,b){n.setUnit(b.getProperty("unit"))};p.addListener(mxEvent.SIZE,c);p.container.addEventListener("scroll",b);p.view.addListener("unitChanged",this.unitListener);
-a.addListener("pageViewChanged",this.pageListener);a.addListener("pageScaleChanged",this.pageListener);a.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(a){m=a;t.style.background=m.bkgClr;v()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(a,b,c,e){var f;if(d&&4<a.height||!d&&4<a.width){if(null!=n.guidePart)try{l.putImageData(n.guidePart.imgData1,n.guidePart.x1,n.guidePart.y1),l.putImageData(n.guidePart.imgData2,n.guidePart.x2,n.guidePart.y2),l.putImageData(n.guidePart.imgData3,
-n.guidePart.x3,n.guidePart.y3)}catch(K){}f=n.origGuideMove.apply(this,arguments);try{var g,p,t,q,v,x,y,D,E;l.lineWidth=.5;l.strokeStyle=m.guideClr;l.setLineDash([2]);d?(p=a.y+f.y+k-this.graph.container.scrollTop,g=0,v=p+a.height/2,q=k/2,D=p+a.height,y=0,t=l.getImageData(g,p-1,k,3),u(g,p,k,p),p--,x=l.getImageData(q,v-1,k,3),u(q,v,k,v),v--,E=l.getImageData(y,D-1,k,3),u(y,D,k,D),D--):(p=0,g=a.x+f.x+k-this.graph.container.scrollLeft,v=k/2,q=g+a.width/2,D=0,y=g+a.width,t=l.getImageData(g-1,p,3,k),u(g,
-p,g,k),g--,x=l.getImageData(q-1,v,3,k),u(q,v,q,k),q--,E=l.getImageData(y-1,D,3,k),u(y,D,y,k),y--);if(null==n.guidePart||n.guidePart.x1!=g||n.guidePart.y1!=p)n.guidePart={imgData1:t,x1:g,y1:p,imgData2:x,x2:q,y2:v,imgData3:E,x3:y,y3:D}}catch(K){}}else f=n.origGuideMove.apply(this,arguments);return f};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var a=n.origGuideDestroy.apply(this,arguments);if(null!=n.guidePart)try{l.putImageData(n.guidePart.imgData1,n.guidePart.x1,
+mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(l.graph.getView().getOverlayPane());return a};A=function(a,b){if(a&&null!=l.guidesArrHor)for(var c=0;c<l.guidesArrHor.length;c++)l.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=l.guidesArrVer)for(c=0;c<l.guidesArrVer.length;c++)l.guidesArrVer[c].node.style.visibility="hidden"};if(1<C&&C==x.length-1){C=[];F=l.guidesArrHor;q=[];g=0;y=x[0]==p?1:0;H=x[y].y+x[y].height;if(0<G)for(y=0;y<x.length-1;y++)u=
+x[y],E=x[y+1],p==u?(g=E.x-u.width-G,q.push(new mxPoint(g+u.width+J,H)),q.push(new mxPoint(E.x-J,H))):p==E?(q.push(new mxPoint(u.x+u.width+J,H)),g=u.x+u.width+G,q.push(new mxPoint(g-J,H))):(q.push(new mxPoint(u.x+u.width+J,H)),q.push(new mxPoint(E.x-J,H)));else u=x[0],y=x[2],g=u.x+u.width+(y.x-u.x-u.width-p.width)/2,q.push(new mxPoint(u.x+u.width+J,H)),q.push(new mxPoint(g-J,H)),q.push(new mxPoint(g+p.width+J,H)),q.push(new mxPoint(y.x-J,H));for(y=0;y<q.length;y+=2)x=q[y],G=q[y+1],x=v(x,G,null!=F?
+F[y/2]:null),x.node.style.visibility="visible",x.redraw(),C.push(x);for(y=q.length/2;null!=F&&y<F.length;y++)F[y].destroy();l.guidesArrHor=C;g-=b.x;q=!0}else A(!0);if(1<I&&I==t.length-1){C=[];F=l.guidesArrVer;f=[];e=0;y=t[0]==p?1:0;I=t[y].x+t[y].width;if(0<D)for(y=0;y<t.length-1;y++)u=t[y],E=t[y+1],p==u?(e=E.y-u.height-D,f.push(new mxPoint(I,e+u.height+J)),f.push(new mxPoint(I,E.y-J))):p==E?(f.push(new mxPoint(I,u.y+u.height+J)),e=u.y+u.height+D,f.push(new mxPoint(I,e-J))):(f.push(new mxPoint(I,u.y+
+u.height+J)),f.push(new mxPoint(I,E.y-J)));else u=t[0],y=t[2],e=u.y+u.height+(y.y-u.y-u.height-p.height)/2,f.push(new mxPoint(I,u.y+u.height+J)),f.push(new mxPoint(I,e-J)),f.push(new mxPoint(I,e+p.height+J)),f.push(new mxPoint(I,y.y-J));for(y=0;y<f.length;y+=2)x=f[y],G=f[y+1],x=v(x,G,null!=F?F[y/2]:null,!0),x.node.style.visibility="visible",x.redraw(),C.push(x);for(y=f.length/2;null!=F&&y<F.length;y++)F[y].destroy();l.guidesArrVer=C;e-=b.y;f=!0}else A(!1,!0)}if(q||f)return p=new mxPoint(g,e),t=a.call(this,
+b,p,d,k),q&&!f?p.y=t.y:f&&!q&&(p.x=t.x),t.y!=p.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),t.x!=p.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),p;A(!0,!0);return a.apply(this,arguments)};var c=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){c.call(this,a);var b=this.guidesArrVer,d=this.guidesArrHor;if(null!=b)for(var k=0;k<b.length;k++)b[k].node.style.visibility=a?"visible":"hidden";if(null!=
+d)for(k=0;k<d.length;k++)d[k].node.style.visibility=a?"visible":"hidden"};var d=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){d.call(this);var a=this.guidesArrVer,c=this.guidesArrHor;if(null!=a){for(var e=0;e<a.length;e++)a[e].destroy();this.guidesArrVer=null}if(null!=c){for(e=0;e<c.length;e++)c[e].destroy();this.guidesArrHor=null}}})();function mxRuler(a,c,d,b){function g(){var b=a.diagramContainer;q.style.top=b.offsetTop-k+"px";q.style.left=b.offsetLeft-k+"px";q.style.width=(d?0:b.offsetWidth)+k+"px";q.style.height=(d?b.offsetHeight:0)+k+"px"}function e(a,b,c){var d;return function(){var e=this,f=arguments,k=c&&!d;clearTimeout(d);d=setTimeout(function(){d=null;c||a.apply(e,f)},b);k&&a.apply(e,f)}}var k=this.RULER_THICKNESS,n=this;this.unit=c;var m="dark"!=window.uiTheme?{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",
+strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"}:{bkgClr:"#202020",outBkgClr:"#2a2a2a",cornerClr:"#2a2a2a",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"},q=document.createElement("div");q.style.position="absolute";q.style.background=m.bkgClr;q.style[d?"borderRight":"borderBottom"]="0.5px solid "+m.strokeClr;q.style.borderLeft="0.5px solid "+m.strokeClr;document.body.appendChild(q);mxEvent.disableContextMenu(q);this.editorUiRefresh=a.refresh;a.refresh=function(b){n.editorUiRefresh.apply(a,
+arguments);g()};g();var f=document.createElement("canvas");f.width=q.offsetWidth;f.height=q.offsetHeight;q.style.overflow="hidden";f.style.position="relative";q.appendChild(f);var l=f.getContext("2d");this.ui=a;var p=a.editor.graph;this.graph=p;this.container=q;this.canvas=f;var u=function(a,b,c,e,f){a=Math.round(a);b=Math.round(b);c=Math.round(c);e=Math.round(e);l.beginPath();l.moveTo(a+.5,b+.5);l.lineTo(c+.5,e+.5);l.stroke();f&&(d?(l.save(),l.translate(a,b),l.rotate(-Math.PI/2),l.fillText(f,0,0),
+l.restore()):l.fillText(f,a,b))},v=function(){l.clearRect(0,0,f.width,f.height);l.beginPath();l.lineWidth=.7;l.strokeStyle=m.strokeClr;l.setLineDash([]);l.font="9px Arial";l.textAlign="center";var a=p.view.scale,b=p.view.getBackgroundPageBounds(),c=p.view.translate,e=p.view.getGraphBounds(),g=p.pageVisible,q=g?k+(d?b.y-p.container.scrollTop:b.x-p.container.scrollLeft):k+(d?c.y-p.container.scrollTop:c.x-p.container.scrollLeft),v=0;g&&(v=d?Math.floor(((e.y+1)/a-c.y)/p.pageFormat.height)*p.pageFormat.height*
+a:Math.floor(((e.x+1)/a-c.x)/p.pageFormat.width)*p.pageFormat.width*a);var C,A,G;switch(n.unit){case mxConstants.POINTS:C=G=10;A=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:G=10;C=mxConstants.PIXELS_PER_MM;A=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:G=.5>=a||4<=a?8:16,C=mxConstants.PIXELS_PER_INCH/G,A=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}c=C;2<=a?c=C/(2*Math.floor(a/2)):.5>=a&&(c=C*Math.floor(1/a/2)*(n.unit==mxConstants.MILLIMETERS?2:1));C=null;b=g?Math.min(q+(d?b.height:b.width),
+d?f.height:f.width):d?f.height:f.width;g&&(l.fillStyle=m.outBkgClr,d?(l.fillRect(0,k,k,q-k),l.fillRect(0,b,k,f.height)):(l.fillRect(k,0,q-k,k),l.fillRect(b,0,f.width,k)));l.fillStyle=m.fontClr;for(g=g?q:q%(c*a);g<=b;g+=c*a)if(e=Math.round((g-q)/a/c),!(g<k||e==C)){C=e;var F=null;0==e%G&&(F=n.formatText(v+e*c)+"");d?u(k-A[Math.abs(e)%G],g,k,g,F):u(g,k-A[Math.abs(e)%G],g,k,F)}l.lineWidth=1;u(d?0:k,d?k:0,k,k);l.fillStyle=m.cornerClr;l.fillRect(0,0,k,k)};this.drawRuler=v;this.sizeListener=c=e(function(){var a=
+p.container;d?(a=a.offsetHeight+k,f.height!=a&&(f.height=a,q.style.height=a+"px",v())):(a=a.offsetWidth+k,f.width!=a&&(f.width=a,q.style.width=a+"px",v()))},10);this.pageListener=function(){v()};this.scrollListener=b=e(function(){var a=d?p.container.scrollTop:p.container.scrollLeft;n.lastScroll!=a&&(n.lastScroll=a,v())},10);this.unitListener=function(a,b){n.setUnit(b.getProperty("unit"))};p.addListener(mxEvent.SIZE,c);p.container.addEventListener("scroll",b);p.view.addListener("unitChanged",this.unitListener);
+a.addListener("pageViewChanged",this.pageListener);a.addListener("pageScaleChanged",this.pageListener);a.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(a){m=a;q.style.background=m.bkgClr;v()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(a,b,c,e){var f;if(d&&4<a.height||!d&&4<a.width){if(null!=n.guidePart)try{l.putImageData(n.guidePart.imgData1,n.guidePart.x1,n.guidePart.y1),l.putImageData(n.guidePart.imgData2,n.guidePart.x2,n.guidePart.y2),l.putImageData(n.guidePart.imgData3,
+n.guidePart.x3,n.guidePart.y3)}catch(K){}f=n.origGuideMove.apply(this,arguments);try{var g,p,q,t,v,x,y,D,E;l.lineWidth=.5;l.strokeStyle=m.guideClr;l.setLineDash([2]);d?(p=a.y+f.y+k-this.graph.container.scrollTop,g=0,v=p+a.height/2,t=k/2,D=p+a.height,y=0,q=l.getImageData(g,p-1,k,3),u(g,p,k,p),p--,x=l.getImageData(t,v-1,k,3),u(t,v,k,v),v--,E=l.getImageData(y,D-1,k,3),u(y,D,k,D),D--):(p=0,g=a.x+f.x+k-this.graph.container.scrollLeft,v=k/2,t=g+a.width/2,D=0,y=g+a.width,q=l.getImageData(g-1,p,3,k),u(g,
+p,g,k),g--,x=l.getImageData(t-1,v,3,k),u(t,v,t,k),t--,E=l.getImageData(y-1,D,3,k),u(y,D,y,k),y--);if(null==n.guidePart||n.guidePart.x1!=g||n.guidePart.y1!=p)n.guidePart={imgData1:q,x1:g,y1:p,imgData2:x,x2:t,y2:v,imgData3:E,x3:y,y3:D}}catch(K){}}else f=n.origGuideMove.apply(this,arguments);return f};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var a=n.origGuideDestroy.apply(this,arguments);if(null!=n.guidePart)try{l.putImageData(n.guidePart.imgData1,n.guidePart.x1,
n.guidePart.y1),l.putImageData(n.guidePart.imgData2,n.guidePart.x2,n.guidePart.y2),l.putImageData(n.guidePart.imgData3,n.guidePart.x3,n.guidePart.y3),n.guidePart=null}catch(x){}return a}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(a){this.unit=a;this.drawRuler()};
mxRuler.prototype.formatText=function(a){switch(this.unit){case mxConstants.POINTS:return Math.round(a);case mxConstants.MILLIMETERS:return(a/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.INCHES:return(a/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(a,c){var d=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=a.getDiagramContainerOffset;a.getDiagramContainerOffset=function(){return d};this.editorUiRefresh=a.refresh;this.ui=a;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(a,c,!0);this.hRuler=new mxRuler(a,c,!1,!0);var b=mxUtils.bind(this,function(b){var c=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,
function(b){c=null!=a.currentMenu;mxEvent.consume(b)}),null,mxUtils.bind(this,function(d){if(a.editor.graph.isEnabled()&&!a.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(d)||mxEvent.isPopupTrigger(d))){a.editor.graph.popupMenuHandler.hideMenu();a.hideCurrentMenu();if(!mxEvent.isTouchEvent(d)||!c){var e=new mxPopupMenu(mxUtils.bind(this,function(b,c){a.menus.addMenuItems(b,["points","millimeters"],c)}));e.div.className+=" geMenubarMenu";e.smartSeparators=!0;e.showDisabled=!0;e.autoExpand=!0;e.hideMenu=
-mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);a.resetCurrentMenu();e.destroy()});var g=mxEvent.getClientX(d),k=mxEvent.getClientY(d);e.popup(g,k,null,d);a.setCurrentMenu(e,b)}mxEvent.consume(d)}}))});b(this.hRuler.container);b(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.setUnit=function(a){this.vRuler.setUnit(a);this.hRuler.setUnit(a)};mxDualRuler.prototype.setStyle=function(a){this.vRuler.setStyle(a);this.hRuler.setStyle(a)};
-mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(a){var c=null!=a.view&&null!=a.view.canvas?a.view.canvas.ownerSVGElement:null;if(null!=a.container&&null!=c){var d=mxFreehand.prototype.NORMAL_SMOOTHING,b=null,g=[],e,k=[],n,m=!1,t=!0,f=[],l=!1,p=!1;this.setClosedPath=function(a){m=a};this.setAutoClose=function(a){t=a};this.setStopClickEnabled=function(a){p=a};this.setSmoothing=function(a){d=a};var u=function(b){l=b;a.getRubberband().setEnabled(!b);a.graphHandler.setSelectEnabled(!b);a.graphHandler.setMoveEnabled(!b);a.container.style.cursor=
+mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);a.resetCurrentMenu();e.destroy()});var k=mxEvent.getClientX(d),g=mxEvent.getClientY(d);e.popup(k,g,null,d);a.setCurrentMenu(e,b)}mxEvent.consume(d)}}))});b(this.hRuler.container);b(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.setUnit=function(a){this.vRuler.setUnit(a);this.hRuler.setUnit(a)};mxDualRuler.prototype.setStyle=function(a){this.vRuler.setStyle(a);this.hRuler.setStyle(a)};
+mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(a){var c=null!=a.view&&null!=a.view.canvas?a.view.canvas.ownerSVGElement:null;if(null!=a.container&&null!=c){var d=mxFreehand.prototype.NORMAL_SMOOTHING,b=null,g=[],e,k=[],n,m=!1,q=!0,f=[],l=!1,p=!1;this.setClosedPath=function(a){m=a};this.setAutoClose=function(a){q=a};this.setStopClickEnabled=function(a){p=a};this.setSmoothing=function(a){d=a};var u=function(b){l=b;a.getRubberband().setEnabled(!b);a.graphHandler.setSelectEnabled(!b);a.graphHandler.setMoveEnabled(!b);a.container.style.cursor=
b?"crosshair":"";a.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){u(!0)};this.isDrawing=function(){return l};var v=mxUtils.bind(this,function(a){if(b){var c=p&&0<k.length&&null!=n&&2>n.length;c||k.push.apply(k,n);n=[];k.push(null);g.push(b);b=null;c&&this.stopDrawing();mxEvent.consume(a)}});this.stopDrawing=function(){if(0<g.length){for(var c=k[0].x,d=k[0].x,e=k[0].y,f=k[0].y,l=1;l<k.length;l++)null!=k[l]&&(c=Math.max(c,k[l].x),d=Math.min(d,k[l].x),e=Math.max(e,
-k[l].y),f=Math.min(f,k[l].y));c-=d;e-=f;if(0<c&&0<e){var n=100/c,p=100/e;k.map(function(a){if(null==a)return a;a.x=(a.x-d)*n;a.y=(a.y-f)*p;return a});for(var q='<shape strokewidth="inherit"><foreground>',v=0,l=0;l<k.length;l++){var x=k[l];if(null==x){var x=!1,v=k[v],y=k[l-1];!m&&t&&(x=v.x-y.x,y=v.y-y.y,x=Math.sqrt(x*x+y*y)<=a.tolerance);if(m||x)q+='<line x="'+v.x.toFixed(2)+'" y="'+v.y.toFixed(2)+'"/>';q+="</path>"+(m||x?"<fillstroke/>":"<stroke/>");v=l+1}else q=l==v?q+('<path><move x="'+x.x.toFixed(2)+
-'" y="'+x.y.toFixed(2)+'"/>'):q+('<line x="'+x.x.toFixed(2)+'" y="'+x.y.toFixed(2)+'"/>')}var l=mxConstants.STYLE_SHAPE+"=stencil("+Graph.compress(q+"</foreground></shape>")+");fillColor=none;",q=a.view.scale,v=a.view.translate,K=new mxCell("",new mxGeometry(d/q-v.x,f/q-v.y,c/q,e/q),l);K.vertex=1;a.model.beginUpdate();try{K=a.addCell(K)}finally{a.model.endUpdate()}a.fireEvent(new mxEventObject("cellsInserted","cells",[K]));a.fireEvent(new mxEventObject("freehandInserted","cell",K));setTimeout(function(){a.setSelectionCells([K])},
+k[l].y),f=Math.min(f,k[l].y));c-=d;e-=f;if(0<c&&0<e){var n=100/c,p=100/e;k.map(function(a){if(null==a)return a;a.x=(a.x-d)*n;a.y=(a.y-f)*p;return a});for(var t='<shape strokewidth="inherit"><foreground>',v=0,l=0;l<k.length;l++){var x=k[l];if(null==x){var x=!1,v=k[v],y=k[l-1];!m&&q&&(x=v.x-y.x,y=v.y-y.y,x=Math.sqrt(x*x+y*y)<=a.tolerance);if(m||x)t+='<line x="'+v.x.toFixed(2)+'" y="'+v.y.toFixed(2)+'"/>';t+="</path>"+(m||x?"<fillstroke/>":"<stroke/>");v=l+1}else t=l==v?t+('<path><move x="'+x.x.toFixed(2)+
+'" y="'+x.y.toFixed(2)+'"/>'):t+('<line x="'+x.x.toFixed(2)+'" y="'+x.y.toFixed(2)+'"/>')}var l=mxConstants.STYLE_SHAPE+"=stencil("+Graph.compress(t+"</foreground></shape>")+");fillColor=none;",t=a.view.scale,v=a.view.translate,K=new mxCell("",new mxGeometry(d/t-v.x,f/t-v.y,c/t,e/t),l);K.vertex=1;a.model.beginUpdate();try{K=a.addCell(K)}finally{a.model.endUpdate()}a.fireEvent(new mxEventObject("cellsInserted","cells",[K]));a.fireEvent(new mxEventObject("freehandInserted","cell",K));setTimeout(function(){a.setSelectionCells([K])},
10)}for(l=0;l<g.length;l++)g[l].parentNode.removeChild(g[l]);b=null;g=[];k=[]}u(!1)};mxEvent.addGestureListeners(c,function(d){if(l){var g=parseFloat(a.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1),g=Math.max(1,g*a.view.scale);b=document.createElementNS("http://www.w3.org/2000/svg","path");b.setAttribute("fill","none");b.setAttribute("stroke",a.currentVertexStyle[mxConstants.STYLE_STROKECOLOR]||"#000");b.setAttribute("stroke-width",g);if("1"==a.currentVertexStyle[mxConstants.STYLE_DASHED]){var m=
-a.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",m=m.split(" ").map(function(a){return parseFloat(a)*g}).join(" ");b.setAttribute("stroke-dasharray",m)}f=[];m=q(d);x(m);e="M"+m.x+" "+m.y;k.push(m);n=[];b.setAttribute("d",e);c.appendChild(b);mxEvent.consume(d)}},function(a){if(b){x(q(a));var c=y(0);if(c){e+=" L"+c.x+" "+c.y;k.push(c);var d="";n=[];for(var g=2;g<f.length;g+=2)c=y(g),d+=" L"+c.x+" "+c.y,n.push(c);b.setAttribute("d",e+d)}mxEvent.consume(a)}},v);var q=function(b){return mxUtils.convertPoint(a.container,
+a.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",m=m.split(" ").map(function(a){return parseFloat(a)*g}).join(" ");b.setAttribute("stroke-dasharray",m)}f=[];m=t(d);x(m);e="M"+m.x+" "+m.y;k.push(m);n=[];b.setAttribute("d",e);c.appendChild(b);mxEvent.consume(d)}},function(a){if(b){x(t(a));var c=y(0);if(c){e+=" L"+c.x+" "+c.y;k.push(c);var d="";n=[];for(var g=2;g<f.length;g+=2)c=y(g),d+=" L"+c.x+" "+c.y,n.push(c);b.setAttribute("d",e+d)}mxEvent.consume(a)}},v);var t=function(b){return mxUtils.convertPoint(a.container,
mxEvent.getClientX(b),mxEvent.getClientY(b))},x=function(a){for(f.push(a);f.length>d;)f.shift()},y=function(a){var b=f.length;if(1===b%2||b>=d){var c=0,e=0,g,k=0;for(g=a;g<b;g++)k++,a=f[g],c+=a.x,e+=a.y;return{x:c/k,y:e/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/App.js b/src/main/webapp/js/diagramly/App.js
index 8b526a1f..cc5c11ef 100644
--- a/src/main/webapp/js/diagramly/App.js
+++ b/src/main/webapp/js/diagramly/App.js
@@ -1437,6 +1437,95 @@ App.prototype.init = function()
this.mode = App.mode;
}
+ if (!mxClient.IS_CHROMEAPP && !EditorUi.isElectronApp && (!this.editor.chromeless || this.editor.editable))
+ {
+ this.editor.addListener('fileLoaded', mxUtils.bind(this, function()
+ {
+ var file = this.getCurrentFile();
+
+ if (file.mode == App.MODE_DEVICE && (!isLocalStorage || mxSettings.settings == null ||
+ mxSettings.settings.closeDesktopFooter == null) && !this.footerShowing && urlParams['open'] == null)
+ {
+ var footer = createFooter('<img border="0" align="absmiddle" style="margin-top:-6px;cursor:pointer;margin-left:8px;margin-right:12px;width:24px;height:24px;" src="' +
+ IMAGE_PATH + '/logo.png' + '"><font size="3">' + mxResources.get('downloadDesktop') + '...</font>', 'https://get.draw.io/', 'geStatusMessage',
+ mxUtils.bind(this, function()
+ {
+ footer.parentNode.removeChild(footer);
+ this.hideFooter();
+
+ // Close permanently
+ if (isLocalStorage && mxSettings.settings != null)
+ {
+ mxSettings.settings.closeDesktopFooter = Date.now();
+ mxSettings.save();
+ }
+ }));
+
+ document.body.appendChild(footer);
+ this.footerShowing = true;
+
+ window.setTimeout(mxUtils.bind(this, function()
+ {
+ mxUtils.setPrefixedStyle(footer.style, 'transform', 'translate(-50%,0%)');
+ }), 500);
+
+ window.setTimeout(mxUtils.bind(this, function()
+ {
+ mxUtils.setPrefixedStyle(footer.style, 'transform', 'translate(-50%,110%)');
+ this.footerShowing = false;
+ }), 15000);
+ }
+ // else if ((!isLocalStorage || mxSettings.settings == null ||
+ // mxSettings.settings.closeRateFooter == null) &&
+ // (!this.editor.chromeless || this.editor.editable) &&
+ // !this.footerShowing && urlParams['open'] == null)
+ // {
+ // var star = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZ' +
+ // 'XdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8i' +
+ // 'IHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDI' +
+ // 'vMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZW' +
+ // 'F0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZ' +
+ // 'nlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJo' +
+ // 'dHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgo' +
+ // 'gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgIC' +
+ // 'AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI' +
+ // 'CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab2' +
+ // '7VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMa' +
+ // 'SQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf' +
+ // '8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV' +
+ // '0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==';
+ // var rate = '<a style="cursor:default;" title="Please Rate Us"><b>Please Rate Us:</b></a>' +
+ // '<img border="0" align="absmiddle" title="1 star" style="margin-top:-6px;cursor:pointer;margin-left:8px;" src="' + star + '">' +
+ // '<img border="0" align="absmiddle" title="2 stars" style="margin-top:-6px;margin-left:3px;cursor:pointer;" src="' + star + '">' +
+ // '<img border="0" align="absmiddle" title="3 stars" style="margin-top:-6px;margin-left:3px;cursor:pointer;" src="' + star + '">' +
+ // '<img border="0" align="absmiddle" title="4 stars" style="margin-top:-6px;margin-left:3px;cursor:pointer;" src="' + star + '" ' +
+ // 'onclick="javascript:window.open(\'https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=cloud&tab=reviews\');">';
+ //
+ // var footer = createFooter(rate, null, 'geStatusMessage', null, null,
+ // mxUtils.bind(this, function()
+ // {
+ // footer.parentNode.removeChild(footer);
+ // this.hideFooter();
+ //
+ // // Close permanently
+ // if (isLocalStorage && mxSettings.settings != null)
+ // {
+ // mxSettings.settings.closeRateFooter = Date.now();
+ // mxSettings.save();
+ // }
+ // }));
+ //
+ // document.body.appendChild(footer);
+ // this.footerShowing = true;
+ //
+ // window.setTimeout(mxUtils.bind(this, function()
+ // {
+ // mxUtils.setPrefixedStyle(footer.style, 'transform', 'translate(-50%,0%)');
+ // }), 1500);
+ // }
+ }));
+ }
+
if (!mxClient.IS_CHROMEAPP && !EditorUi.isElectronApp && urlParams['embed'] != '1' && DrawioFile.SYNC == 'auto' &&
urlParams['local'] != '1' && urlParams['stealth'] != '1' && urlParams['offline'] != '1' &&
(!this.editor.chromeless || this.editor.editable))
@@ -1473,95 +1562,6 @@ App.prototype.init = function()
{
window.clearTimeout(timeoutThread);
}));
-
- this.editor.addListener('fileLoaded', mxUtils.bind(this, function()
- {
- var file = this.getCurrentFile();
-
- if (file.mode == App.MODE_DEVICE && (!isLocalStorage || mxSettings.settings == null ||
- mxSettings.settings.closeDesktopFooter == null) &&
- (!this.editor.chromeless || this.editor.editable) &&
- !this.footerShowing && urlParams['open'] == null)
- {
- var footer = createFooter(mxResources.get('downloadDesktop') + '...',
- 'https://get.draw.io/',
- 'geStatusMessage',
- mxUtils.bind(this, function()
- {
- footer.parentNode.removeChild(footer);
- this.hideFooter();
-
- // Close permanently
- if (isLocalStorage && mxSettings.settings != null)
- {
- mxSettings.settings.closeDesktopFooter = Date.now();
- mxSettings.save();
- }
- }));
-
- document.body.appendChild(footer);
- this.footerShowing = true;
-
- window.setTimeout(mxUtils.bind(this, function()
- {
- mxUtils.setPrefixedStyle(footer.style, 'transform', 'translate(-50%,0%)');
- }), 1500);
-
- window.setTimeout(mxUtils.bind(this, function()
- {
- mxUtils.setPrefixedStyle(footer.style, 'transform', 'translate(-50%,110%)');
- this.footerShowing = false;
- }), 15000);
- }
-// else if ((!isLocalStorage || mxSettings.settings == null ||
-// mxSettings.settings.closeRateFooter == null) &&
-// (!this.editor.chromeless || this.editor.editable) &&
-// !this.footerShowing && urlParams['open'] == null)
-// {
-// var star = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZ' +
-// 'XdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8i' +
-// 'IHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDI' +
-// 'vMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZW' +
-// 'F0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZ' +
-// 'nlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJo' +
-// 'dHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgo' +
-// 'gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgIC' +
-// 'AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI' +
-// 'CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab2' +
-// '7VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMa' +
-// 'SQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf' +
-// '8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV' +
-// '0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==';
-// var rate = '<a style="cursor:default;" title="Please Rate Us"><b>Please Rate Us:</b></a>' +
-// '<img border="0" align="absmiddle" title="1 star" style="margin-top:-6px;cursor:pointer;margin-left:8px;" src="' + star + '">' +
-// '<img border="0" align="absmiddle" title="2 stars" style="margin-top:-6px;margin-left:3px;cursor:pointer;" src="' + star + '">' +
-// '<img border="0" align="absmiddle" title="3 stars" style="margin-top:-6px;margin-left:3px;cursor:pointer;" src="' + star + '">' +
-// '<img border="0" align="absmiddle" title="4 stars" style="margin-top:-6px;margin-left:3px;cursor:pointer;" src="' + star + '" ' +
-// 'onclick="javascript:window.open(\'https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=cloud&tab=reviews\');">';
-//
-// var footer = createFooter(rate, null, 'geStatusMessage', null, null,
-// mxUtils.bind(this, function()
-// {
-// footer.parentNode.removeChild(footer);
-// this.hideFooter();
-//
-// // Close permanently
-// if (isLocalStorage && mxSettings.settings != null)
-// {
-// mxSettings.settings.closeRateFooter = Date.now();
-// mxSettings.save();
-// }
-// }));
-//
-// document.body.appendChild(footer);
-// this.footerShowing = true;
-//
-// window.setTimeout(mxUtils.bind(this, function()
-// {
-// mxUtils.setPrefixedStyle(footer.style, 'transform', 'translate(-50%,0%)');
-// }), 1500);
-// }
- }));
}
}
else if (this.menubar != null)
diff --git a/src/main/webapp/js/diagramly/DrawioClient.js b/src/main/webapp/js/diagramly/DrawioClient.js
index 2e726b72..735d89ec 100644
--- a/src/main/webapp/js/diagramly/DrawioClient.js
+++ b/src/main/webapp/js/diagramly/DrawioClient.js
@@ -118,35 +118,42 @@ DrawioClient.prototype.getPersistentToken = function(trySessionStorage)
*/
DrawioClient.prototype.setPersistentToken = function(token, sessionOnly)
{
- if (token != null)
+ try
{
- if (isLocalStorage)
+ if (token != null)
{
- if (sessionOnly)
+ if (isLocalStorage)
{
- sessionStorage.setItem('.' + this.cookieName, token);
+ if (sessionOnly)
+ {
+ sessionStorage.setItem('.' + this.cookieName, token);
+ }
+ else
+ {
+ localStorage.setItem('.' + this.cookieName, token);
+ }
}
- else
+ else if (typeof(Storage) != 'undefined')
{
- localStorage.setItem('.' + this.cookieName, token);
+ var expiration = new Date();
+ expiration.setYear(expiration.getFullYear() + 10);
+ var cookie = this.cookieName + '=' + token + '; path=/' + (sessionOnly? '' : '; expires=' + expiration.toUTCString());
+
+ if (document.location.protocol.toLowerCase() == 'https')
+ {
+ cookie = cookie + ';secure';
+ }
+
+ document.cookie = cookie;
}
}
- else if (typeof(Storage) != 'undefined')
+ else
{
- var expiration = new Date();
- expiration.setYear(expiration.getFullYear() + 10);
- var cookie = this.cookieName + '=' + token + '; path=/' + (sessionOnly? '' : '; expires=' + expiration.toUTCString());
-
- if (document.location.protocol.toLowerCase() == 'https')
- {
- cookie = cookie + ';secure';
- }
-
- document.cookie = cookie;
+ this.clearPersistentToken();
}
}
- else
+ catch (e)
{
- this.clearPersistentToken();
+ this.ui.handleError(e);
}
};
diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js
index e78c64f8..3238cdcc 100644
--- a/src/main/webapp/js/diagramly/EditorUi.js
+++ b/src/main/webapp/js/diagramly/EditorUi.js
@@ -54,8 +54,13 @@
/**
* Specifies the URL for the diffsync cache.
*/
- EditorUi.cacheUrl = (urlParams['dev'] == '1') ? '/cache' : 'https://rt.draw.io/cache';
+ EditorUi.cacheUrl = (urlParams['dev'] == '1') ? '/cache' : window.REALTIME_URL;
+ if (EditorUi.cacheUrl == null && typeof DrawioFile !== 'undefined')
+ {
+ DrawioFile.SYNC = 'none'; //Disable real-time sync
+ }
+
/**
* Cache timeout is 10 seconds.
*/
@@ -10226,67 +10231,74 @@
// ignore
}
- var graph = this.editor.graph;
-
- if (xml != null && xml.length > 0)
+ try
{
- if (graph.lastPasteXml == xml)
- {
- graph.pasteCounter++;
- }
- else
- {
- graph.lastPasteXml = xml;
- graph.pasteCounter = 0;
- }
-
- var dx = graph.pasteCounter * graph.gridSize;
-
- if (compat || this.isCompatibleString(xml))
- {
- graph.setSelectionCells(this.importXml(xml, dx, dx));
- }
- else
+ var graph = this.editor.graph;
+
+ if (xml != null && xml.length > 0)
{
- var pt = graph.getInsertPoint();
-
- if (graph.isMouseInsertPoint())
+ if (graph.lastPasteXml == xml)
+ {
+ graph.pasteCounter++;
+ }
+ else
{
- dx = 0;
+ graph.lastPasteXml = xml;
+ graph.pasteCounter = 0;
+ }
+
+ var dx = graph.pasteCounter * graph.gridSize;
+
+ if (compat || this.isCompatibleString(xml))
+ {
+ graph.setSelectionCells(this.importXml(xml, dx, dx));
+ }
+ else
+ {
+ var pt = graph.getInsertPoint();
- // No offset for insert at mouse position
- if (graph.lastPasteXml == xml && graph.pasteCounter > 0)
+ if (graph.isMouseInsertPoint())
{
- graph.pasteCounter--;
+ dx = 0;
+
+ // No offset for insert at mouse position
+ if (graph.lastPasteXml == xml && graph.pasteCounter > 0)
+ {
+ graph.pasteCounter--;
+ }
}
+
+ graph.setSelectionCells(this.insertTextAt(xml, pt.x + dx, pt.y + dx, true));
}
- graph.setSelectionCells(this.insertTextAt(xml, pt.x + dx, pt.y + dx, true));
- }
-
- if (!graph.isSelectionEmpty())
- {
- graph.scrollCellToVisible(graph.getSelectionCell());
-
- if (this.hoverIcons != null)
+ if (!graph.isSelectionEmpty())
{
- this.hoverIcons.update(graph.view.getState(graph.getSelectionCell()));
- }
+ graph.scrollCellToVisible(graph.getSelectionCell());
- try
- {
- mxEvent.consume(evt);
- }
- catch (e)
- {
- // ignore event no longer exists in async handler in IE8-
+ if (this.hoverIcons != null)
+ {
+ this.hoverIcons.update(graph.view.getState(graph.getSelectionCell()));
+ }
+
+ try
+ {
+ mxEvent.consume(evt);
+ }
+ catch (e)
+ {
+ // ignore event no longer exists in async handler in IE8-
+ }
}
}
+ else if (!useEvent)
+ {
+ graph.lastPasteXml = null;
+ graph.pasteCounter = 0;
+ }
}
- else if (!useEvent)
+ catch (e)
{
- graph.lastPasteXml = null;
- graph.pasteCounter = 0;
+ this.handleError(e);
}
}
}
diff --git a/src/main/webapp/js/diagramly/Init.js b/src/main/webapp/js/diagramly/Init.js
index 990e2ff1..5754fa3a 100644
--- a/src/main/webapp/js/diagramly/Init.js
+++ b/src/main/webapp/js/diagramly/Init.js
@@ -19,9 +19,10 @@ window.isSvgBrowser = window.isSvgBrowser || (navigator.userAgent.indexOf('MSIE'
window.EXPORT_URL = window.EXPORT_URL || 'https://exp.draw.io/ImageExport4/export';
window.PLANT_URL = window.PLANT_URL || 'https://exp-plant.draw.io/plantuml4';
window.DRAW_MATH_URL = window.DRAW_MATH_URL || 'https://www.draw.io/math';
-window.VSD_CONVERT_URL = window.VSD_CONVERT_URL || "https://convert.draw.io/VsdConverter/api/converter";
-window.EMF_CONVERT_URL = window.EMF_CONVERT_URL || "https://convert.draw.io/emf2png/convertEMF";
-window.DRAWIO_GITLAB_URL = window.DRAWIO_GITLAB_URL || "https://gitlab.com";
+window.VSD_CONVERT_URL = window.VSD_CONVERT_URL || 'https://convert.draw.io/VsdConverter/api/converter';
+window.EMF_CONVERT_URL = window.EMF_CONVERT_URL || 'https://convert.draw.io/emf2png/convertEMF';
+window.REALTIME_URL = window.REALTIME_URL || 'https://rt.draw.io/cache';
+window.DRAWIO_GITLAB_URL = window.DRAWIO_GITLAB_URL || 'https://gitlab.com';
window.DRAWIO_GITLAB_ID = window.DRAWIO_GITLAB_ID || '5cdc018a32acddf6eba37592d9374945241e644b8368af847422d74c8709bc44';
window.SAVE_URL = window.SAVE_URL || 'save';
window.OPEN_URL = window.OPEN_URL || 'open';
diff --git a/src/main/webapp/js/diagramly/Menus.js b/src/main/webapp/js/diagramly/Menus.js
index e0b88288..b8b2d357 100644
--- a/src/main/webapp/js/diagramly/Menus.js
+++ b/src/main/webapp/js/diagramly/Menus.js
@@ -1085,19 +1085,7 @@
this.addMenuItems(menu, ['feedback'], parent);
}
- this.addMenuItems(menu, ['support', '-'], parent);
-
- if (!EditorUi.isElectronApp && !navigator.standalone && urlParams['embed'] != '1')
- {
- this.addMenuItems(menu, ['downloadDesktop'], parent);
- }
-
- if (!navigator.standalone && urlParams['embed'] != '1')
- {
- this.addMenuItems(menu, ['useOffline'], parent);
- }
-
- this.addMenuItems(menu, ['-', 'about'], parent);
+ this.addMenuItems(menu, ['support', '-', 'about'], parent);
}
if (urlParams['test'] == '1')
diff --git a/src/main/webapp/js/diagramly/Pages.js b/src/main/webapp/js/diagramly/Pages.js
index 6e3227ea..d014c1d0 100644
--- a/src/main/webapp/js/diagramly/Pages.js
+++ b/src/main/webapp/js/diagramly/Pages.js
@@ -1577,6 +1577,28 @@ EditorUi.prototype.addTabListeners = function(page, tab)
};
/**
+ * Returns an absolute URL to the given page or null of absolute links
+ * to pages are not supported in this file.
+ */
+EditorUi.prototype.getLinkForPage = function(page)
+{
+ if (!mxClient.IS_CHROMEAPP && !EditorUi.isElectronApp)
+ {
+ var file = this.getCurrentFile();
+
+ if (file != null && file.constructor != LocalFile && this.getServiceName() == 'draw.io')
+ {
+ var search = this.getSearch(['create', 'title', 'mode', 'url', 'drive', 'splash', 'state']);
+ search += ((search.length == 0) ? '?' : '&') + 'page-id=' + page.getId();
+
+ return window.location.protocol + '//' + window.location.host + '/' + search + '#' + file.getHash();
+ }
+ }
+
+ return null;
+};
+
+/**
* Returns true if the given string contains an mxfile.
*/
EditorUi.prototype.createPageMenu = function(page, label)
@@ -1600,18 +1622,15 @@ EditorUi.prototype.createPageMenu = function(page, label)
{
this.renamePage(page, label);
}), parent);
-
- var file = this.getCurrentFile();
- if (file != null && file.constructor != LocalFile)
+ var url = this.getLinkForPage(page);
+
+ if (url != null)
{
menu.addSeparator(parent);
menu.addItem(mxResources.get('link'), null, mxUtils.bind(this, function()
{
- var search = this.getSearch(['create', 'title', 'mode', 'url', 'drive', 'splash', 'state']);
- search += ((search.length == 0) ? '?' : '&') + 'page-id=' + page.getId();
- var url = window.location.protocol + '//' + window.location.host + '/' + search + '#' + file.getHash();
var dlg = new EmbedDialog(this, url);
this.showDialog(dlg.container, 440, 240, true, true);
dlg.init();
diff --git a/src/main/webapp/js/diagramly/sidebar/Sidebar-ER.js b/src/main/webapp/js/diagramly/sidebar/Sidebar-ER.js
index 61d49d91..ad16cb0d 100644
--- a/src/main/webapp/js/diagramly/sidebar/Sidebar-ER.js
+++ b/src/main/webapp/js/diagramly/sidebar/Sidebar-ER.js
@@ -17,6 +17,35 @@
// Default tags
var dt = 'er entity relation ';
+ function createEdge(style, m, n)
+ {
+ var edge = new mxCell('', new mxGeometry(0, 0, 0, 0), style);
+ edge.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+ edge.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+ edge.geometry.relative = true;
+ edge.edge = true;
+
+ if (m != null)
+ {
+ var cell1 = new mxCell(m, new mxGeometry(-1, 0, 0, 0), 'resizable=0;html=1;align=left;verticalAlign=bottom;');
+ cell1.geometry.relative = true;
+ cell1.setConnectable(false);
+ cell1.vertex = true;
+ edge.insert(cell1);
+ }
+
+ if (n != null)
+ {
+ var cell2 = new mxCell(n, new mxGeometry(1, 0, 0, 0), 'resizable=0;html=1;align=right;verticalAlign=bottom;');
+ cell2.geometry.relative = true;
+ cell2.setConnectable(false);
+ cell2.vertex = true;
+ edge.insert(cell2);
+ }
+
+ return edge;
+ };
+
var fns = [
this.addEntry(dt + 'table', function()
{
@@ -156,32 +185,105 @@
cell.insert(cell1);
- return sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Entity 2');
- }),
- this.createVertexTemplateEntry('ellipse;shape=doubleEllipse;margin=10;strokeWidth=2;fontSize=14;whiteSpace=wrap;html=1;align=center;', w, h, 'Attribute', 'Attribute', null, null, dt + 'attribute'),
- this.createVertexTemplateEntry('ellipse;shape=cloud;strokeWidth=2;fontSize=14;whiteSpace=wrap;html=1;align=center;', w, h, 'Cloud', 'Cloud', null, null, dt + 'cloud'),
- this.createVertexTemplateEntry('strokeWidth=2;rounded=1;arcSize=10;whiteSpace=wrap;html=1;align=center;fontSize=14;', w, h, 'Entity', 'Entity 3', null, null, dt),
- this.createVertexTemplateEntry('strokeWidth=2;whiteSpace=wrap;html=1;align=center;fontSize=14;', w, h, 'Entity', 'Entity 4', null, null, dt),
- this.createVertexTemplateEntry('shape=ext;strokeWidth=2;margin=10;double=1;whiteSpace=wrap;html=1;align=center;fontSize=14;', w, h, 'Entity', 'Entity 5', null, null, dt),
- this.createVertexTemplateEntry('shape=rhombus;strokeWidth=2;fontSize=17;perimeter=rhombusPerimeter;whiteSpace=wrap;html=1;align=center;fontSize=14;', w, h, 'Has', 'Has', null, null, dt + 'has'),
- this.createVertexTemplateEntry('shape=rhombus;double=1;strokeWidth=2;fontSize=17;perimeter=rhombusPerimeter;whiteSpace=wrap;html=1;align=center;fontSize=14;', w, h, 'Has', 'Has', null, null, dt + 'has'),
+ return sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Entity');
+ }),
+ this.createVertexTemplateEntry('whiteSpace=wrap;html=1;align=center;', 100, 40, 'Entity', 'Entity', null, null, dt),
+ this.createVertexTemplateEntry('rounded=1;arcSize=10;whiteSpace=wrap;html=1;align=center;', 100, 40, 'Entity', 'Entity (Rounded)', null, null, dt + 'chen'),
+ this.createVertexTemplateEntry('shape=ext;margin=3;double=1;whiteSpace=wrap;html=1;align=center;', 100, 40, 'Entity', 'Weak Entity', null, null, dt + 'chen'),
+ this.createVertexTemplateEntry('ellipse;whiteSpace=wrap;html=1;align=center;',
+ 100, 40, 'Attribute', 'Attribute', null, null, dt + 'attribute chen'),
+ this.createVertexTemplateEntry('ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;',
+ 100, 40, 'Attribute', 'Key Attribute', null, null, dt + 'attribute key chen'),
+ this.createVertexTemplateEntry('ellipse;whiteSpace=wrap;html=1;align=center;',
+ 100, 40, '<span style="border-bottom: 1px dotted">Attribute</span>', 'Weak Key Attribute', null, null, dt + 'attribute key weak chen'),
+ this.createVertexTemplateEntry('ellipse;whiteSpace=wrap;html=1;align=center;dashed=1;',
+ 100, 40, 'Attribute', 'Derived Attribute', null, null, dt + 'attribute derived chen'),
+ this.createVertexTemplateEntry('ellipse;shape=doubleEllipse;margin=3;whiteSpace=wrap;html=1;align=center;',
+ 100, 40, 'Attribute', 'Multivalue Attribute', null, null, dt + 'attribute multivalue chen'),
+ this.createVertexTemplateEntry('shape=associativeEntity;whiteSpace=wrap;html=1;align=center;',
+ 140, 60, 'Associative\nEntity', 'Associative Entity', null, null, dt + 'associative entity chen'),
+ this.createVertexTemplateEntry('shape=rhombus;perimeter=rhombusPerimeter;whiteSpace=wrap;html=1;align=center;',
+ 120, 60, 'Relationship', 'Relationship', null, null, dt + 'chen'),
+ this.createVertexTemplateEntry('shape=rhombus;double=1;perimeter=rhombusPerimeter;whiteSpace=wrap;html=1;align=center;',
+ 120, 60, 'Relationship', 'Identifying Relationship', null, null, dt + 'chen'),
+ this.createVertexTemplateEntry('ellipse;shape=cloud;whiteSpace=wrap;html=1;align=center;', 100, 60, 'Cloud', 'Cloud', null, null, dt + 'cloud'),
this.addEntry(dt + 'hierarchy', function()
{
- var cell = new mxCell('', new mxGeometry(0, 0, 100, 100), 'rounded=1;absoluteArcSize=1;html=1;strokeWidth=2;arcSize=10;fontSize=14;');
+ var cell = new mxCell('', new mxGeometry(0, 0, 100, 100), 'rounded=1;absoluteArcSize=1;html=1;arcSize=10;');
cell.vertex = true;
- var cell1 = new mxCell('main', new mxGeometry(0, 0, 50, 100), 'html=1;strokeWidth=2;shape=mxgraph.er.anchor;fontSize=14;whiteSpace=wrap;');
+ var cell1 = new mxCell('main', new mxGeometry(0, 0, 50, 100), 'html=1;shape=mxgraph.er.anchor;whiteSpace=wrap;');
cell1.vertex = true;
cell.insert(cell1);
- var cell2 = new mxCell('sub', new mxGeometry(50, 5, 45, 90), 'rounded=1;absoluteArcSize=1;html=1;strokeWidth=2;arcSize=10;fontSize=14;whiteSpace=wrap;points=[];strokeColor=inherit;fillColor=inherit;');
+ var cell2 = new mxCell('sub', new mxGeometry(50, 5, 45, 90), 'rounded=1;absoluteArcSize=1;html=1;arcSize=10;whiteSpace=wrap;points=[];strokeColor=inherit;fillColor=inherit;');
cell2.vertex = true;
cell.insert(cell2);
return sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Hierarchy');
}),
- this.createVertexTemplateEntry('shape=note;strokeWidth=2;fontSize=14;size=20;whiteSpace=wrap;html=1;', w, h, 'Note', 'Note', null, null, dt + 'note'),
- this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToMany;endFill=1;', w, h, '', '0 to Many Optional', null, dt + 'zero many optional'),
+ this.createVertexTemplateEntry('shape=note;size=20;whiteSpace=wrap;html=1;', w, h, 'Note', 'Note', null, null, dt + 'note'),
+ this.addEntry(dt + 'relation chen', function()
+ {
+ return sb.createEdgeTemplateFromCells(
+ [createEdge('endArrow=none;html=1;rounded=0;')],
+ 160, 0, 'Untitled Relation');
+ }),
+ this.addEntry(dt + 'mandatory participation chen', function()
+ {
+ return sb.createEdgeTemplateFromCells(
+ [createEdge('endArrow=none;html=1;rounded=0;', null, '1')],
+ 160, 0, 'Mandatory Participation (0:1)');
+ }),
+ this.addEntry(dt + 'mandatory participation chen', function()
+ {
+ return sb.createEdgeTemplateFromCells(
+ [createEdge('endArrow=none;html=1;rounded=0;', null, 'N')],
+ 160, 0, 'Mandatory Participation (0:N)');
+ }),
+ this.addEntry(dt + 'mandatory participation chen', function()
+ {
+ return sb.createEdgeTemplateFromCells(
+ [createEdge('endArrow=none;html=1;rounded=0;', 'M', 'N')],
+ 160, 0, 'Mandatory Participation (M:N)');
+ }),
+ this.addEntry(dt + 'optional participation chen', function()
+ {
+ return sb.createEdgeTemplateFromCells(
+ [createEdge('endArrow=none;html=1;rounded=0;dashed=1;dashPattern=1 2;', null, '1')],
+ 160, 0, 'Optional Participation (0:1)');
+ }),
+ this.addEntry(dt + 'optional participation chen', function()
+ {
+ return sb.createEdgeTemplateFromCells(
+ [createEdge('endArrow=none;html=1;rounded=0;dashed=1;dashPattern=1 2;', null, 'N')],
+ 160, 0, 'Optional Participation (0:N)');
+ }),
+ this.addEntry(dt + 'optional participation chen', function()
+ {
+ return sb.createEdgeTemplateFromCells(
+ [createEdge('endArrow=none;html=1;rounded=0;dashed=1;dashPattern=1 2;', 'M', 'N')],
+ 160, 0, 'Optional Participation (M:N)');
+ }),
+ this.addEntry(dt + 'recursive relationship chen', function()
+ {
+ return sb.createEdgeTemplateFromCells(
+ [createEdge('shape=link;html=1;rounded=0;', null, '1')],
+ 160, 0, 'Recursive Relationship (0:1)');
+ }),
+ this.addEntry(dt + 'recursive relationship chen', function()
+ {
+ return sb.createEdgeTemplateFromCells(
+ [createEdge('shape=link;html=1;rounded=0;', null, 'N')],
+ 160, 0, 'Recursive Relationship (0:N)');
+ }),
+ this.addEntry(dt + 'recursive relationship chen', function()
+ {
+ return sb.createEdgeTemplateFromCells(
+ [createEdge('shape=link;html=1;rounded=0;', 'M', 'N')],
+ 160, 0, 'Recursive Relationship (M:N)');
+ }),
+ this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToMany;endFill=1;', w, h, '', '0 to Many Optional', null, dt + 'zero many optional'),
this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERoneToMany;', w, h, '', '1 to Many', null, dt + 'one many'),
this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERmandOne;', w, h, '', '1 Mandatory', null, dt + 'one mandatory'),
this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERmandOne;startArrow=ERmandOne;', w, h, '', '1 to 1', null, dt + 'one'),
diff --git a/src/main/webapp/js/mxgraph/Actions.js b/src/main/webapp/js/mxgraph/Actions.js
index b7bb2743..b46a9ac0 100644
--- a/src/main/webapp/js/mxgraph/Actions.js
+++ b/src/main/webapp/js/mxgraph/Actions.js
@@ -80,7 +80,17 @@ Actions.prototype.init = function()
this.addAction('undo', function() { ui.undo(); }, null, 'sprite-undo', Editor.ctrlKey + '+Z');
this.addAction('redo', function() { ui.redo(); }, null, 'sprite-redo', (!mxClient.IS_WIN) ? Editor.ctrlKey + '+Shift+Z' : Editor.ctrlKey + '+Y');
this.addAction('cut', function() { mxClipboard.cut(graph); }, null, 'sprite-cut', Editor.ctrlKey + '+X');
- this.addAction('copy', function() { mxClipboard.copy(graph); }, null, 'sprite-copy', Editor.ctrlKey + '+C');
+ this.addAction('copy', function()
+ {
+ try
+ {
+ mxClipboard.copy(graph);
+ }
+ catch (e)
+ {
+ ui.handleError(e);
+ }
+ }, null, 'sprite-copy', Editor.ctrlKey + '+C');
this.addAction('paste', function()
{
if (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent()))
diff --git a/src/main/webapp/js/mxgraph/Editor.js b/src/main/webapp/js/mxgraph/Editor.js
index a9a15696..bdc51da6 100644
--- a/src/main/webapp/js/mxgraph/Editor.js
+++ b/src/main/webapp/js/mxgraph/Editor.js
@@ -852,9 +852,18 @@ function Dialog(editorUi, elt, w, h, modal, closable, onClose, noScroll, transpa
if (!ignoreBgClick)
{
- mxEvent.addGestureListeners(this.bg, null, null, mxUtils.bind(this, function(evt)
+ var mouseDownSeen = false;
+
+ mxEvent.addGestureListeners(this.bg, mxUtils.bind(this, function(evt)
+ {
+ mouseDownSeen = true;
+ }), null, mxUtils.bind(this, function(evt)
{
- editorUi.hideDialog(true);
+ if (mouseDownSeen)
+ {
+ editorUi.hideDialog(true);
+ mouseDownSeen = false;
+ }
}));
}
}
diff --git a/src/main/webapp/js/mxgraph/EditorUi.js b/src/main/webapp/js/mxgraph/EditorUi.js
index 3a9b6861..be390c00 100644
--- a/src/main/webapp/js/mxgraph/EditorUi.js
+++ b/src/main/webapp/js/mxgraph/EditorUi.js
@@ -4303,7 +4303,20 @@ EditorUi.prototype.createKeyHandler = function(editor)
{
keyHandler.bindControlKey(36, function() { if (graph.isEnabled()) { graph.foldCells(true); }}); // Ctrl+Home
keyHandler.bindControlKey(35, function() { if (graph.isEnabled()) { graph.foldCells(false); }}); // Ctrl+End
- keyHandler.bindControlKey(13, function() { if (graph.isEnabled()) { graph.setSelectionCells(graph.duplicateCells(graph.getSelectionCells(), false)); }}); // Ctrl+Enter
+ keyHandler.bindControlKey(13, function()
+ {
+ if (graph.isEnabled())
+ {
+ try
+ {
+ graph.setSelectionCells(graph.duplicateCells(graph.getSelectionCells(), false));
+ }
+ catch (e)
+ {
+ ui.handleError(e);
+ }
+ }
+ }); // Ctrl+Enter
keyHandler.bindAction(8, false, 'delete'); // Backspace
keyHandler.bindAction(8, true, 'deleteAll'); // Backspace
keyHandler.bindAction(46, false, 'delete'); // Delete
diff --git a/src/main/webapp/js/mxgraph/Shapes.js b/src/main/webapp/js/mxgraph/Shapes.js
index 0e76130c..bd644ad2 100644
--- a/src/main/webapp/js/mxgraph/Shapes.js
+++ b/src/main/webapp/js/mxgraph/Shapes.js
@@ -1956,6 +1956,28 @@
mxCellRenderer.registerShape('component', ComponentShape);
+ // Associative entity derived from rectangle shape
+ function AssociativeEntity()
+ {
+ mxRectangleShape.call(this);
+ };
+ mxUtils.extend(AssociativeEntity, mxRectangleShape);
+ AssociativeEntity.prototype.paintForeground = function(c, x, y, w, h)
+ {
+ var hw = w / 2;
+ var hh = h / 2;
+
+ var arcSize = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2;
+ c.begin();
+ this.addPoints(c, [new mxPoint(x + hw, y), new mxPoint(x + w, y + hh), new mxPoint(x + hw, y + h),
+ new mxPoint(x, y + hh)], this.isRounded, arcSize, true);
+ c.stroke();
+
+ mxRectangleShape.prototype.paintForeground.apply(this, arguments);
+ };
+
+ mxCellRenderer.registerShape('associativeEntity', AssociativeEntity);
+
// State Shapes derives from double ellipse
function StateShape()
{
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index b423850e..ad2dc879 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -97,9 +97,10 @@ ea;m.wa=m.normalizeRCData=e;m.xa=m.sanitize=function(a,b,d,e){return Q(a,ea(b,d,
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a,b){var c="",d,e,f,g,k,l,m=0;for(null!=b&&b||(a=Base64._utf8_encode(a));m<a.length;)d=a.charCodeAt(m++),e=a.charCodeAt(m++),f=a.charCodeAt(m++),g=d>>2,d=(d&3)<<4|e>>4,k=(e&15)<<2|f>>6,l=f&63,isNaN(e)?k=l=64:isNaN(f)&&(l=64),c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return c},decode:function(a,b){b=null!=b?b:!1;var c="",d,e,f,g,k,l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,
"");l<a.length;)d=this._keyStr.indexOf(a.charAt(l++)),e=this._keyStr.indexOf(a.charAt(l++)),g=this._keyStr.indexOf(a.charAt(l++)),k=this._keyStr.indexOf(a.charAt(l++)),d=d<<2|e>>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|k,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=k&&(c+=String.fromCharCode(f));b||(c=Base64._utf8_decode(c));return c},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):(127<d&&2048>d?b+=
String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){var b="",c=0,d;for(c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.mxLoadSettings=window.mxLoadSettings||"1"!=urlParams.configure;window.isSvgBrowser=window.isSvgBrowser||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";window.PLANT_URL=window.PLANT_URL||"https://exp-plant.draw.io/plantuml4";window.DRAW_MATH_URL=window.DRAW_MATH_URL||"https://www.draw.io/math";
-window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.draw.io/VsdConverter/api/converter";window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"https://convert.draw.io/emf2png/convertEMF";window.DRAWIO_GITLAB_URL=window.DRAWIO_GITLAB_URL||"https://gitlab.com";window.DRAWIO_GITLAB_ID=window.DRAWIO_GITLAB_ID||"5cdc018a32acddf6eba37592d9374945241e644b8368af847422d74c8709bc44";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"open";window.PROXY_URL=window.PROXY_URL||"proxy";
-window.VIEWER_URL=null;window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":"https://www.draw.io/iconSearch");window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";
-window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||function(){var a="1"==urlParams.offline?"en":urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}();
+window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.draw.io/VsdConverter/api/converter";window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"https://convert.draw.io/emf2png/convertEMF";window.REALTIME_URL=window.REALTIME_URL||"https://rt.draw.io/cache";window.DRAWIO_GITLAB_URL=window.DRAWIO_GITLAB_URL||"https://gitlab.com";window.DRAWIO_GITLAB_ID=window.DRAWIO_GITLAB_ID||"5cdc018a32acddf6eba37592d9374945241e644b8368af847422d74c8709bc44";window.SAVE_URL=window.SAVE_URL||"save";
+window.OPEN_URL=window.OPEN_URL||"open";window.PROXY_URL=window.PROXY_URL||"proxy";window.VIEWER_URL=null;window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":"https://www.draw.io/iconSearch");window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";
+window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1;
+window.mxLanguage=window.mxLanguage||function(){var a="1"==urlParams.offline?"en":urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}();
window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Bahasa Melayu",bs:"Bosanski",bg:"Bulgarian",ca:"Català",cs:"Čeština",da:"Dansk",de:"Deutsch",et:"Eesti",en:"English",es:"Español",fil:"Filipino",fr:"Français",it:"Italiano",hu:"Magyar",nl:"Nederlands",no:"Norsk",pl:"Polski","pt-br":"Português (Brasil)",pt:"Português (Portugal)",ro:"Română",fi:"Suomi",sv:"Svenska",vi:"Tiếng Việt",tr:"Türkçe",el:"Ελληνικά",ru:"Русский",sr:"Српски",uk:"Українська",he:"עברית",ar:"العربية",th:"ไทย",
ko:"한국어",ja:"日本語",zh:"简体中文","zh-tw":"繁體中文"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph");if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMap)"en"!=lang&&window.mxLanguages.push(lang)}
window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&"undefined"!==typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}try{null==a&&414>=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(a="min")}catch(c){}return a}();function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
@@ -1986,7 +1987,7 @@ x.style.color=.5>.213*this.rgb[0]+.715*this.rgb[1]+.072*this.rgb[2]?"#FFF":"#000
this.rgb[1]=b;var e=null===c?this.rgb[2]:this.rgb[2]=c,f=Math.min(Math.min(a,b),e);c=Math.max(Math.max(a,b),e);var g=c-f;0===g?a=[null,0,c]:(a=a===f?3+(e-b)/g:b===f?5+(a-e)/g:1+(b-a)/g,a=[6===a?0:a,g/c,c]);null!==a[0]&&(this.hsv[0]=a[0]);0!==a[2]&&(this.hsv[1]=a[1]);this.hsv[2]=a[2];this.exportColor(d)};this.fromString=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=jscolor.fetchElement(this.valueElement),x=jscolor.fetchElement(this.styleElement),
y=!1,A=!1,z=1,v=2,B=4,C=8;u&&(q=function(){r.fromString(u.value,z);p()},jscolor.addEvent(u,"keyup",q),jscolor.addEvent(u,"input",q),jscolor.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:jscolor.requireImage("hs.png");break;case 1:jscolor.requireImage("hv.png")}this.importColor()}};jscolor.install();
-Editor=function(a,b,f,d,l){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=d||this.createGraph(b,f);this.editable=null!=l?l:!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=
+Editor=function(a,b,e,d,k){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=d||this.createGraph(b,e);this.editable=null!=k?k:!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 d=null!=b?b.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 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(b){}})();Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
Editor.helpImage=mxClient.IS_SVG?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTExIDE4aDJ2LTJoLTJ2MnptMS0xNkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTAtMTRjLTIuMjEgMC00IDEuNzktNCA0aDJjMC0xLjEuOS0yIDItMnMyIC45IDIgMmMwIDItMyAxLjc1LTMgNWgyYzAtMi4yNSAzLTIuNSAzLTUgMC0yLjIxLTEuNzktNC00LTR6Ii8+PC9zdmc+":IMAGE_PATH+
@@ -2010,186 +2011,187 @@ Editor.fullscreenLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAA
Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";Editor.popupsAllowed=!0;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(a){this.autosave=a;this.fireEvent(new mxEventObject("autosaveChanged"))};
Editor.prototype.getEditBlankUrl=function(a){return this.editBlankUrl+a};
-Editor.prototype.editAsNew=function(a,b){var f=null!=b?"?title="+encodeURIComponent(b):"";null!=urlParams.ui&&(f+=(0<f.length?"&":"?")+"ui="+urlParams.ui);null==this.editorWindow||this.editorWindow.closed?"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?(null==this.editorWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(b){"ready"==b.data&&b.source==this.editorWindow&&this.editorWindow.postMessage(a,"*")})),this.editorWindow=this.graph.openLink(this.getEditBlankUrl(f+
-(0<f.length?"&":"?")+"client=1"),null,!0)):this.editorWindow=this.graph.openLink(this.getEditBlankUrl(f)+"#R"+encodeURIComponent(a)):this.editorWindow.focus()};Editor.prototype.createGraph=function(a,b){var f=new Graph(null,b,null,null,a);f.transparentBackground=!1;this.chromeless||(f.isBlankLink=function(a){return!this.isExternalProtocol(a)});return f};
+Editor.prototype.editAsNew=function(a,b){var e=null!=b?"?title="+encodeURIComponent(b):"";null!=urlParams.ui&&(e+=(0<e.length?"&":"?")+"ui="+urlParams.ui);null==this.editorWindow||this.editorWindow.closed?"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?(null==this.editorWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(b){"ready"==b.data&&b.source==this.editorWindow&&this.editorWindow.postMessage(a,"*")})),this.editorWindow=this.graph.openLink(this.getEditBlankUrl(e+
+(0<e.length?"&":"?")+"client=1"),null,!0)):this.editorWindow=this.graph.openLink(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(a)):this.editorWindow.focus()};Editor.prototype.createGraph=function(a,b){var e=new Graph(null,b,null,null,a);e.transparentBackground=!1;this.chromeless||(e.isBlankLink=function(a){return!this.isExternalProtocol(a)});return e};
Editor.prototype.resetGraph=function(){this.graph.gridEnabled=!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)};
Editor.prototype.readGraphState=function(a){this.graph.gridEnabled="0"!=a.getAttribute("grid")&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=a.getAttribute("guides");this.graph.setTooltips("0"!=a.getAttribute("tooltips"));this.graph.setConnectable("0"!=a.getAttribute("connect"));this.graph.connectionArrowsEnabled="0"!=a.getAttribute("arrows");this.graph.foldingEnabled=
"0"!=a.getAttribute("fold");this.isChromelessView()&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);var b=parseFloat(a.getAttribute("pageScale"));!isNaN(b)&&0<b?this.graph.pageScale=b:this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.isLightboxView()||this.graph.isViewer()?this.graph.pageVisible=!1:(b=a.getAttribute("page"),this.graph.pageVisible=null!=b?"0"!=b:this.graph.defaultPageVisible);
-this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;var b=parseFloat(a.getAttribute("pageWidth")),f=parseFloat(a.getAttribute("pageHeight"));isNaN(b)||isNaN(f)||(this.graph.pageFormat=new mxRectangle(0,0,b,f));a=a.getAttribute("background");this.graph.background=null!=a&&0<a.length?a:null};
-Editor.prototype.setGraphXml=function(a){if(null!=a){var b=new mxCodec(a.ownerDocument);if("mxGraphModel"==a.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(a),this.updateGraphComponents(),b.decode(a,this.graph.getModel())}finally{this.graph.model.endUpdate()}this.fireEvent(new mxEventObject("resetGraphView"))}else if("root"==a.nodeName){this.resetGraph();var f=b.document.createElement("mxGraphModel");f.appendChild(a);b.decode(f,this.graph.getModel());
+this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;var b=parseFloat(a.getAttribute("pageWidth")),e=parseFloat(a.getAttribute("pageHeight"));isNaN(b)||isNaN(e)||(this.graph.pageFormat=new mxRectangle(0,0,b,e));a=a.getAttribute("background");this.graph.background=null!=a&&0<a.length?a:null};
+Editor.prototype.setGraphXml=function(a){if(null!=a){var b=new mxCodec(a.ownerDocument);if("mxGraphModel"==a.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(a),this.updateGraphComponents(),b.decode(a,this.graph.getModel())}finally{this.graph.model.endUpdate()}this.fireEvent(new mxEventObject("resetGraphView"))}else if("root"==a.nodeName){this.resetGraph();var e=b.document.createElement("mxGraphModel");e.appendChild(a);b.decode(e,this.graph.getModel());
this.updateGraphComponents();this.fireEvent(new mxEventObject("resetGraphView"))}else throw{message:mxResources.get("cannotOpenFile"),node:a,toString:function(){return this.message}};}else this.resetGraph(),this.graph.model.clear(),this.fireEvent(new mxEventObject("resetGraphView"))};
Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.createXmlDocument())).encode(this.graph.getModel()):this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(this.graph.getSelectionCells())));if(0!=this.graph.view.translate.x||0!=this.graph.view.translate.y)a.setAttribute("dx",Math.round(100*this.graph.view.translate.x)/100),a.setAttribute("dy",Math.round(100*this.graph.view.translate.y)/100);a.setAttribute("grid",this.graph.isGridEnabled()?"1":"0");a.setAttribute("gridSize",
this.graph.gridSize);a.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");a.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");a.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");a.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");a.setAttribute("fold",this.graph.foldingEnabled?"1":"0");a.setAttribute("page",this.graph.pageVisible?"1":"0");a.setAttribute("pageScale",this.graph.pageScale);a.setAttribute("pageWidth",this.graph.pageFormat.width);
a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&a.setAttribute("background",this.graph.background);return a};Editor.prototype.updateGraphComponents=function(){var a=this.graph;null!=a.container&&(a.view.validateBackground(),a.container.style.overflow=a.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(a){this.modified=a};
Editor.prototype.setFilename=function(a){this.filename=a};
-Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,f){b.undoableEditHappened(f.getProperty("edit"))};var f=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,f);a.getView().addListener(mxEvent.UNDO,f);f=function(b,f){var d=a.getSelectionCellsForChanges(f.getProperty("edit").changes);a.getModel();for(var l=[],u=0;u<d.length;u++)null!=a.view.getState(d[u])&&l.push(d[u]);a.setSelectionCells(l)};
-b.addListener(mxEvent.UNDO,f);b.addListener(mxEvent.REDO,f);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};
+Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(b,e){var d=a.getSelectionCellsForChanges(e.getProperty("edit").changes);a.getModel();for(var k=[],u=0;u<d.length;u++)null!=a.view.getState(d[u])&&k.push(d[u]);a.setSelectionCells(k)};
+b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};
OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,b,f,d,l,m,p,u,v,B,c){var e=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(e=80);f+=e;d+=e;var k=f,q=d,n=mxUtils.getDocumentSize(),g=n.height,x=Math.max(1,Math.round((n.width-f-64)/2)),A=Math.max(1,Math.round((g-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");f=null!=document.body?Math.min(f,document.body.scrollWidth-64):f;d=Math.min(d,g-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),
-this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=g+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));n=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=n.x+"px";this.bg.style.top=n.y+"px";x+=n.x;A+=n.y;l&&document.body.appendChild(this.bg);var t=a.createDiv(v?"geTransDialog":"geDialog");l=this.getPosition(x,A,f,d);x=l.x;A=l.y;t.style.width=
-f+"px";t.style.height=d+"px";t.style.left=x+"px";t.style.top=A+"px";t.style.zIndex=this.zIndex;t.appendChild(b);document.body.appendChild(t);!u&&b.clientHeight>t.clientHeight-64&&(b.style.overflowY="auto");m&&(m=document.createElement("img"),m.setAttribute("src",Dialog.prototype.closeImage),m.setAttribute("title",mxResources.get("close")),m.className="geDialogClose",m.style.top=A+14+"px",m.style.left=x+f+38-e+"px",m.style.zIndex=this.zIndex,mxEvent.addListener(m,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),
-document.body.appendChild(m),this.dialogImg=m,c||mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(c){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){if(null!=B){var c=B();null!=c&&(k=f=c.w,q=d=c.h)}c=mxUtils.getDocumentSize();g=c.height;this.bg.style.height=g+"px";x=Math.max(1,Math.round((c.width-f-64)/2));A=Math.max(1,Math.round((g-d-a.footerHeight)/3));f=null!=document.body?Math.min(k,document.body.scrollWidth-64):k;d=Math.min(q,g-64);c=this.getPosition(x,
-A,f,d);x=c.x;A=c.y;t.style.left=x+"px";t.style.top=A+"px";t.style.width=f+"px";t.style.height=d+"px";!u&&b.clientHeight>t.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=A+14+"px",this.dialogImg.style.left=x+f+38-e+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=p;this.container=t;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
-Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":
-IMAGE_PATH+"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
+function Dialog(a,b,e,d,k,m,p,u,x,B,c){var f=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(f=80);e+=f;d+=f;var g=e,t=d,n=mxUtils.getDocumentSize(),l=n.height,y=Math.max(1,Math.round((n.width-e-64)/2)),A=Math.max(1,Math.round((l-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=null!=document.body?Math.min(e,document.body.scrollWidth-64):e;d=Math.min(d,l-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),
+this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=l+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));n=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=n.x+"px";this.bg.style.top=n.y+"px";y+=n.x;A+=n.y;k&&document.body.appendChild(this.bg);var q=a.createDiv(x?"geTransDialog":"geDialog");k=this.getPosition(y,A,e,d);y=k.x;A=k.y;q.style.width=
+e+"px";q.style.height=d+"px";q.style.left=y+"px";q.style.top=A+"px";q.style.zIndex=this.zIndex;q.appendChild(b);document.body.appendChild(q);!u&&b.clientHeight>q.clientHeight-64&&(b.style.overflowY="auto");if(m&&(m=document.createElement("img"),m.setAttribute("src",Dialog.prototype.closeImage),m.setAttribute("title",mxResources.get("close")),m.className="geDialogClose",m.style.top=A+14+"px",m.style.left=y+e+38-f+"px",m.style.zIndex=this.zIndex,mxEvent.addListener(m,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),
+document.body.appendChild(m),this.dialogImg=m,!c)){var E=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){E=!0}),null,mxUtils.bind(this,function(c){E&&(a.hideDialog(!0),E=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=B){var c=B();null!=c&&(g=e=c.w,t=d=c.h)}c=mxUtils.getDocumentSize();l=c.height;this.bg.style.height=l+"px";y=Math.max(1,Math.round((c.width-e-64)/2));A=Math.max(1,Math.round((l-d-a.footerHeight)/3));e=null!=document.body?Math.min(g,document.body.scrollWidth-
+64):g;d=Math.min(t,l-64);c=this.getPosition(y,A,e,d);y=c.x;A=c.y;q.style.left=y+"px";q.style.top=A+"px";q.style.width=e+"px";q.style.height=d+"px";!u&&b.clientHeight>q.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=A+14+"px",this.dialogImg.style.left=y+e+38-f+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=p;this.container=q;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";
+Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
+Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
+"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
"/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,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,b))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,b,f,d,l,m,p,u,v,B,c){v=null!=v?v:!0;var e=document.createElement("div");e.style.textAlign="center";if(null!=b){var k=document.createElement("div");k.style.padding="0px";k.style.margin="0px";k.style.fontSize="18px";k.style.paddingBottom="16px";k.style.marginBottom="10px";k.style.borderBottom="1px solid #c0c0c0";k.style.color="gray";k.style.whiteSpace="nowrap";k.style.textOverflow="ellipsis";k.style.overflow="hidden";mxUtils.write(k,b);k.setAttribute("title",b);e.appendChild(k)}b=
-document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=f;e.appendChild(b);f=document.createElement("div");f.style.marginTop="12px";f.style.textAlign="center";null!=m&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),b.className="geBtn",f.appendChild(b),f.style.textAlign="center");null!=B&&(B=mxUtils.button(B,function(){null!=c&&c()}),B.className="geBtn",f.appendChild(B));var q=mxUtils.button(d,function(){v&&a.hideDialog();null!=l&&l()});
-q.className="geBtn";f.appendChild(q);null!=p&&(d=mxUtils.button(p,function(){v&&a.hideDialog();null!=u&&u()}),d.className="geBtn gePrimaryBtn",f.appendChild(d));this.init=function(){q.focus()};e.appendChild(f);this.container=e},PrintDialog=function(a,b){this.create(a,b)};
-PrintDialog.prototype.create=function(a){function b(a){var b=u.checked||B.checked,d=parseInt(e.value)/100;isNaN(d)&&(d=1,e.value="100%");var d=.75*d,k=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,q=1/f.pageScale;if(b){var t=u.checked?1:parseInt(c.value);isNaN(t)||(q=mxUtils.getScaleForPageCount(t,f,k))}f.getGraphBounds();var l=t=0,k=mxRectangle.fromRectangle(k);k.width=Math.ceil(k.width*d);k.height=Math.ceil(k.height*d);q*=d;!b&&f.pageVisible?(d=f.getPageLayout(),t-=d.x*k.width,l-=d.y*k.height):
-b=!0;b=PrintDialog.createPrintPreview(f,q,k,0,t,l,b);b.open();a&&PrintDialog.printPreview(b)}var f=a.editor.graph,d,l,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var p=document.createElement("tbody");d=document.createElement("tr");var u=document.createElement("input");u.setAttribute("type","checkbox");l=document.createElement("td");l.setAttribute("colspan","2");l.style.fontSize="10pt";l.appendChild(u);var v=document.createElement("span");mxUtils.write(v," "+mxResources.get("fitPage"));
-l.appendChild(v);mxEvent.addListener(v,"click",function(a){u.checked=!u.checked;B.checked=!u.checked;mxEvent.consume(a)});mxEvent.addListener(u,"change",function(){B.checked=!u.checked});d.appendChild(l);p.appendChild(d);d=d.cloneNode(!1);var B=document.createElement("input");B.setAttribute("type","checkbox");l=document.createElement("td");l.style.fontSize="10pt";l.appendChild(B);v=document.createElement("span");mxUtils.write(v," "+mxResources.get("posterPrint")+":");l.appendChild(v);mxEvent.addListener(v,
-"click",function(a){B.checked=!B.checked;u.checked=!B.checked;mxEvent.consume(a)});d.appendChild(l);var c=document.createElement("input");c.setAttribute("value","1");c.setAttribute("type","number");c.setAttribute("min","1");c.setAttribute("size","4");c.setAttribute("disabled","disabled");c.style.width="50px";l=document.createElement("td");l.style.fontSize="10pt";l.appendChild(c);mxUtils.write(l," "+mxResources.get("pages")+" (max)");d.appendChild(l);p.appendChild(d);mxEvent.addListener(B,"change",
-function(){B.checked?c.removeAttribute("disabled"):c.setAttribute("disabled","disabled");u.checked=!B.checked});d=d.cloneNode(!1);l=document.createElement("td");mxUtils.write(l,mxResources.get("pageScale")+":");d.appendChild(l);l=document.createElement("td");var e=document.createElement("input");e.setAttribute("value","100 %");e.setAttribute("size","5");e.style.width="50px";l.appendChild(e);d.appendChild(l);p.appendChild(d);d=document.createElement("tr");l=document.createElement("td");l.colSpan=2;
-l.style.paddingTop="20px";l.setAttribute("align","right");v=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});v.className="geBtn";a.editor.cancelFirst&&l.appendChild(v);if(PrintDialog.previewEnabled){var k=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});k.className="geBtn";l.appendChild(k)}k=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});k.className="geBtn gePrimaryBtn";l.appendChild(k);a.editor.cancelFirst||
-l.appendChild(v);d.appendChild(l);p.appendChild(d);m.appendChild(p);this.container=m};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(f){}};
-PrintDialog.createPrintPreview=function(a,b,f,d,l,m,p){b=new mxPrintPreview(a,b,f,d,l,m);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=p;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var u=b.writeHead;b.writeHead=function(a){u.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
+var ErrorDialog=function(a,b,e,d,k,m,p,u,x,B,c){x=null!=x?x:!0;var f=document.createElement("div");f.style.textAlign="center";if(null!=b){var g=document.createElement("div");g.style.padding="0px";g.style.margin="0px";g.style.fontSize="18px";g.style.paddingBottom="16px";g.style.marginBottom="10px";g.style.borderBottom="1px solid #c0c0c0";g.style.color="gray";g.style.whiteSpace="nowrap";g.style.textOverflow="ellipsis";g.style.overflow="hidden";mxUtils.write(g,b);g.setAttribute("title",b);f.appendChild(g)}b=
+document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=e;f.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=m&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=B&&(B=mxUtils.button(B,function(){null!=c&&c()}),B.className="geBtn",e.appendChild(B));var t=mxUtils.button(d,function(){x&&a.hideDialog();null!=k&&k()});
+t.className="geBtn";e.appendChild(t);null!=p&&(d=mxUtils.button(p,function(){x&&a.hideDialog();null!=u&&u()}),d.className="geBtn gePrimaryBtn",e.appendChild(d));this.init=function(){t.focus()};f.appendChild(e);this.container=f},PrintDialog=function(a,b){this.create(a,b)};
+PrintDialog.prototype.create=function(a){function b(a){var b=u.checked||B.checked,d=parseInt(f.value)/100;isNaN(d)&&(d=1,f.value="100%");var d=.75*d,g=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,t=1/e.pageScale;if(b){var q=u.checked?1:parseInt(c.value);isNaN(q)||(t=mxUtils.getScaleForPageCount(q,e,g))}e.getGraphBounds();var k=q=0,g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*d);g.height=Math.ceil(g.height*d);t*=d;!b&&e.pageVisible?(d=e.getPageLayout(),q-=d.x*g.width,k-=d.y*g.height):
+b=!0;b=PrintDialog.createPrintPreview(e,t,g,0,q,k,b);b.open();a&&PrintDialog.printPreview(b)}var e=a.editor.graph,d,k,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var p=document.createElement("tbody");d=document.createElement("tr");var u=document.createElement("input");u.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(u);var x=document.createElement("span");mxUtils.write(x," "+mxResources.get("fitPage"));
+k.appendChild(x);mxEvent.addListener(x,"click",function(a){u.checked=!u.checked;B.checked=!u.checked;mxEvent.consume(a)});mxEvent.addListener(u,"change",function(){B.checked=!u.checked});d.appendChild(k);p.appendChild(d);d=d.cloneNode(!1);var B=document.createElement("input");B.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(B);x=document.createElement("span");mxUtils.write(x," "+mxResources.get("posterPrint")+":");k.appendChild(x);mxEvent.addListener(x,
+"click",function(a){B.checked=!B.checked;u.checked=!B.checked;mxEvent.consume(a)});d.appendChild(k);var c=document.createElement("input");c.setAttribute("value","1");c.setAttribute("type","number");c.setAttribute("min","1");c.setAttribute("size","4");c.setAttribute("disabled","disabled");c.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(c);mxUtils.write(k," "+mxResources.get("pages")+" (max)");d.appendChild(k);p.appendChild(d);mxEvent.addListener(B,"change",
+function(){B.checked?c.removeAttribute("disabled"):c.setAttribute("disabled","disabled");u.checked=!B.checked});d=d.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");d.appendChild(k);k=document.createElement("td");var f=document.createElement("input");f.setAttribute("value","100 %");f.setAttribute("size","5");f.style.width="50px";k.appendChild(f);d.appendChild(k);p.appendChild(d);d=document.createElement("tr");k=document.createElement("td");k.colSpan=2;
+k.style.paddingTop="20px";k.setAttribute("align","right");x=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});x.className="geBtn";a.editor.cancelFirst&&k.appendChild(x);if(PrintDialog.previewEnabled){var g=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});g.className="geBtn";k.appendChild(g)}g=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});g.className="geBtn gePrimaryBtn";k.appendChild(g);a.editor.cancelFirst||
+k.appendChild(x);d.appendChild(k);p.appendChild(d);m.appendChild(p);this.container=m};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(e){}};
+PrintDialog.createPrintPreview=function(a,b,e,d,k,m,p){b=new mxPrintPreview(a,b,e,d,k,m);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=p;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var u=b.writeHead;b.writeHead=function(a){u.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function b(){null==c||c==mxConstants.NONE?(B.style.backgroundColor="",B.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(B.style.backgroundColor=c,B.style.backgroundImage="")}function f(){null==q?(k.removeAttribute("title"),k.style.fontSize="",k.innerHTML=mxResources.get("change")+"..."):(k.setAttribute("title",q.src),k.style.fontSize="11px",k.innerHTML=q.src.substring(0,42)+"...")}var d=a.editor.graph,l,m,p=document.createElement("table");p.style.width=
-"100%";p.style.height="100%";var u=document.createElement("tbody");l=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");l.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var v=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",d.pageFormat);l.appendChild(m);u.appendChild(l);l=document.createElement("tr");m=document.createElement("td");
-mxUtils.write(m,mxResources.get("background")+":");l.appendChild(m);m=document.createElement("td");m.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var B=document.createElement("button");B.style.width="18px";B.style.height="18px";B.style.marginRight="20px";B.style.backgroundPosition="center center";B.style.backgroundRepeat="no-repeat";var c=d.background;b();mxEvent.addListener(B,"click",function(e){a.pickColor(c||"none",function(a){c=a;b()});mxEvent.consume(e)});
-m.appendChild(B);mxUtils.write(m,mxResources.get("gridSize")+":");var e=document.createElement("input");e.setAttribute("type","number");e.setAttribute("min","0");e.style.width="40px";e.style.marginLeft="6px";e.value=d.getGridSize();m.appendChild(e);mxEvent.addListener(e,"change",function(){var a=parseInt(e.value);e.value=Math.max(1,isNaN(a)?d.getGridSize():a)});l.appendChild(m);u.appendChild(l);l=document.createElement("tr");m=document.createElement("td");mxUtils.write(m,mxResources.get("image")+
-":");l.appendChild(m);m=document.createElement("td");var k=document.createElement("a");k.style.textDecoration="underline";k.style.cursor="pointer";k.style.color="#a0a0a0";var q=d.backgroundImage;mxEvent.addListener(k,"click",function(c){a.showBackgroundImageDialog(function(a){q=a;f()});mxEvent.consume(c)});f();m.appendChild(k);l.appendChild(m);u.appendChild(l);l=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align","right");var n=
-mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&m.appendChild(n);var g=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==e.value&&d.setGridSize(parseInt(e.value));var b=new ChangePageSetup(a,c,q,v.get());b.ignoreColor=d.background==c;b.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=q?q.src:null);d.pageFormat.width==b.previousFormat.width&&d.pageFormat.height==b.previousFormat.height&&
-b.ignoreColor&&b.ignoreImage||d.model.execute(b)});g.className="geBtn gePrimaryBtn";m.appendChild(g);a.editor.cancelFirst||m.appendChild(n);l.appendChild(m);u.appendChild(l);p.appendChild(u);this.container=p};
-PageSetupDialog.addPageFormatPanel=function(a,b,f,d){function l(a,b,d){if(d||e!=document.activeElement&&k!=document.activeElement){a=!1;for(b=0;b<n.length;b++)d=n[b],t?"custom"==d.key&&(u.value=d.key,t=!1):null!=d.format&&("a4"==d.key?826==f.width?(f=mxRectangle.fromRectangle(f),f.width=827):826==f.height&&(f=mxRectangle.fromRectangle(f),f.height=827):"a5"==d.key&&(584==f.width?(f=mxRectangle.fromRectangle(f),f.width=583):584==f.height&&(f=mxRectangle.fromRectangle(f),f.height=583)),f.width==d.format.width&&
-f.height==d.format.height?(u.value=d.key,m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):f.width==d.format.height&&f.height==d.format.width&&(u.value=d.key,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(v.style.display="",c.style.display="none"):(e.value=f.width/100,k.value=f.height/100,m.setAttribute("checked","checked"),
-u.value="custom",v.style.display="none",c.style.display="")}}b="format-"+b;var m=document.createElement("input");m.setAttribute("name",b);m.setAttribute("type","radio");m.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",b);p.setAttribute("type","radio");p.setAttribute("value","landscape");var u=document.createElement("select");u.style.marginBottom="8px";u.style.width="202px";var v=document.createElement("div");v.style.marginLeft="4px";v.style.width="210px";
-v.style.height="24px";m.style.marginRight="6px";v.appendChild(m);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));v.appendChild(b);p.style.marginLeft="10px";p.style.marginRight="6px";v.appendChild(p);var B=document.createElement("span");B.style.width="100px";mxUtils.write(B,mxResources.get("landscape"));v.appendChild(B);var c=document.createElement("div");c.style.marginLeft="4px";c.style.width="210px";c.style.height="24px";var e=document.createElement("input");
-e.setAttribute("size","7");e.style.textAlign="right";c.appendChild(e);mxUtils.write(c," in x ");var k=document.createElement("input");k.setAttribute("size","7");k.style.textAlign="right";c.appendChild(k);mxUtils.write(c," in");v.style.display="none";c.style.display="none";for(var q={},n=PageSetupDialog.getFormats(),g=0;g<n.length;g++){var x=n[g];q[x.key]=x;var A=document.createElement("option");A.setAttribute("value",x.key);mxUtils.write(A,x.title);u.appendChild(A)}var t=!1;l();a.appendChild(u);mxUtils.br(a);
-a.appendChild(v);a.appendChild(c);var F=f,y=function(a,b){var g=q[u.value];null!=g.format?(e.value=g.format.width/100,k.value=g.format.height/100,c.style.display="none",v.style.display=""):(v.style.display="none",c.style.display="");g=parseFloat(e.value);if(isNaN(g)||0>=g)e.value=f.width/100;g=parseFloat(k.value);if(isNaN(g)||0>=g)k.value=f.height/100;g=new mxRectangle(0,0,Math.floor(100*parseFloat(e.value)),Math.floor(100*parseFloat(k.value)));"custom"!=u.value&&p.checked&&(g=new mxRectangle(0,0,
-g.height,g.width));b&&t||g.width==F.width&&g.height==F.height||(F=g,null!=d&&d(F))};mxEvent.addListener(b,"click",function(a){m.checked=!0;y(a);mxEvent.consume(a)});mxEvent.addListener(B,"click",function(a){p.checked=!0;y(a);mxEvent.consume(a)});mxEvent.addListener(e,"blur",y);mxEvent.addListener(e,"click",y);mxEvent.addListener(k,"blur",y);mxEvent.addListener(k,"click",y);mxEvent.addListener(p,"change",y);mxEvent.addListener(m,"change",y);mxEvent.addListener(u,"change",function(a){t="custom"==u.value;
-y(a,!0)});y();return{set:function(a){f=a;l(null,null,!0)},get:function(){return F},widthInput:e,heightInput:k}};
+var PageSetupDialog=function(a){function b(){null==c||c==mxConstants.NONE?(B.style.backgroundColor="",B.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(B.style.backgroundColor=c,B.style.backgroundImage="")}function e(){null==t?(g.removeAttribute("title"),g.style.fontSize="",g.innerHTML=mxResources.get("change")+"..."):(g.setAttribute("title",t.src),g.style.fontSize="11px",g.innerHTML=t.src.substring(0,42)+"...")}var d=a.editor.graph,k,m,p=document.createElement("table");p.style.width=
+"100%";p.style.height="100%";var u=document.createElement("tbody");k=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");k.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var x=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",d.pageFormat);k.appendChild(m);u.appendChild(k);k=document.createElement("tr");m=document.createElement("td");
+mxUtils.write(m,mxResources.get("background")+":");k.appendChild(m);m=document.createElement("td");m.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var B=document.createElement("button");B.style.width="18px";B.style.height="18px";B.style.marginRight="20px";B.style.backgroundPosition="center center";B.style.backgroundRepeat="no-repeat";var c=d.background;b();mxEvent.addListener(B,"click",function(f){a.pickColor(c||"none",function(a){c=a;b()});mxEvent.consume(f)});
+m.appendChild(B);mxUtils.write(m,mxResources.get("gridSize")+":");var f=document.createElement("input");f.setAttribute("type","number");f.setAttribute("min","0");f.style.width="40px";f.style.marginLeft="6px";f.value=d.getGridSize();m.appendChild(f);mxEvent.addListener(f,"change",function(){var a=parseInt(f.value);f.value=Math.max(1,isNaN(a)?d.getGridSize():a)});k.appendChild(m);u.appendChild(k);k=document.createElement("tr");m=document.createElement("td");mxUtils.write(m,mxResources.get("image")+
+":");k.appendChild(m);m=document.createElement("td");var g=document.createElement("a");g.style.textDecoration="underline";g.style.cursor="pointer";g.style.color="#a0a0a0";var t=d.backgroundImage;mxEvent.addListener(g,"click",function(c){a.showBackgroundImageDialog(function(a){t=a;e()});mxEvent.consume(c)});e();m.appendChild(g);k.appendChild(m);u.appendChild(k);k=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align","right");var n=
+mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&m.appendChild(n);var l=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==f.value&&d.setGridSize(parseInt(f.value));var b=new ChangePageSetup(a,c,t,x.get());b.ignoreColor=d.background==c;b.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=t?t.src:null);d.pageFormat.width==b.previousFormat.width&&d.pageFormat.height==b.previousFormat.height&&
+b.ignoreColor&&b.ignoreImage||d.model.execute(b)});l.className="geBtn gePrimaryBtn";m.appendChild(l);a.editor.cancelFirst||m.appendChild(n);k.appendChild(m);u.appendChild(k);p.appendChild(u);this.container=p};
+PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function k(a,b,d){if(d||f!=document.activeElement&&g!=document.activeElement){a=!1;for(b=0;b<n.length;b++)d=n[b],q?"custom"==d.key&&(u.value=d.key,q=!1):null!=d.format&&("a4"==d.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==d.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==d.format.width&&
+e.height==d.format.height?(u.value=d.key,m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):e.width==d.format.height&&e.height==d.format.width&&(u.value=d.key,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(x.style.display="",c.style.display="none"):(f.value=e.width/100,g.value=e.height/100,m.setAttribute("checked","checked"),
+u.value="custom",x.style.display="none",c.style.display="")}}b="format-"+b;var m=document.createElement("input");m.setAttribute("name",b);m.setAttribute("type","radio");m.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",b);p.setAttribute("type","radio");p.setAttribute("value","landscape");var u=document.createElement("select");u.style.marginBottom="8px";u.style.width="202px";var x=document.createElement("div");x.style.marginLeft="4px";x.style.width="210px";
+x.style.height="24px";m.style.marginRight="6px";x.appendChild(m);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));x.appendChild(b);p.style.marginLeft="10px";p.style.marginRight="6px";x.appendChild(p);var B=document.createElement("span");B.style.width="100px";mxUtils.write(B,mxResources.get("landscape"));x.appendChild(B);var c=document.createElement("div");c.style.marginLeft="4px";c.style.width="210px";c.style.height="24px";var f=document.createElement("input");
+f.setAttribute("size","7");f.style.textAlign="right";c.appendChild(f);mxUtils.write(c," in x ");var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";c.appendChild(g);mxUtils.write(c," in");x.style.display="none";c.style.display="none";for(var t={},n=PageSetupDialog.getFormats(),l=0;l<n.length;l++){var y=n[l];t[y.key]=y;var A=document.createElement("option");A.setAttribute("value",y.key);mxUtils.write(A,y.title);u.appendChild(A)}var q=!1;k();a.appendChild(u);mxUtils.br(a);
+a.appendChild(x);a.appendChild(c);var E=e,z=function(a,b){var l=t[u.value];null!=l.format?(f.value=l.format.width/100,g.value=l.format.height/100,c.style.display="none",x.style.display=""):(x.style.display="none",c.style.display="");l=parseFloat(f.value);if(isNaN(l)||0>=l)f.value=e.width/100;l=parseFloat(g.value);if(isNaN(l)||0>=l)g.value=e.height/100;l=new mxRectangle(0,0,Math.floor(100*parseFloat(f.value)),Math.floor(100*parseFloat(g.value)));"custom"!=u.value&&p.checked&&(l=new mxRectangle(0,0,
+l.height,l.width));b&&q||l.width==E.width&&l.height==E.height||(E=l,null!=d&&d(E))};mxEvent.addListener(b,"click",function(a){m.checked=!0;z(a);mxEvent.consume(a)});mxEvent.addListener(B,"click",function(a){p.checked=!0;z(a);mxEvent.consume(a)});mxEvent.addListener(f,"blur",z);mxEvent.addListener(f,"click",z);mxEvent.addListener(g,"blur",z);mxEvent.addListener(g,"click",z);mxEvent.addListener(p,"change",z);mxEvent.addListener(m,"change",z);mxEvent.addListener(u,"change",function(a){q="custom"==u.value;
+z(a,!0)});z();return{set:function(a){e=a;k(null,null,!0)},get:function(){return E},widthInput:f,heightInput:g}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,1600,900)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1920,1200)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1600,1200)},{key:"custom",title:mxResources.get("custom"),format:null}]};
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var b=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var d=a.container.firstChild;null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.nextSibling;null!=d&&(this.backgroundPageShape=this.createBackgroundPageShape(b),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect=
mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(a.container),d.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,d),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(c){a.dblClick(c)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c))}),
mxUtils.bind(this,function(c){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(c)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(c))}),mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(c))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=b,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=
-null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,b=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,d=null!=b&&this.gridColor!=b.toLowerCase()?this.gridColor:"#ffffff",c="none",e="";if(a.isGridEnabled()){e=10;mxClient.IS_SVG?(c=unescape(encodeURIComponent(this.createSvgGrid(d))),c=window.btoa?btoa(c):Base64.encode(c,!0),c="url(data:image/svg+xml;base64,"+c+")",e=a.gridSize*this.scale*this.gridSteps):
-c="url("+this.gridImage+")";var k=d=0;null!=a.view.backgroundPageShape&&(k=this.getBackgroundPageBounds(),d=1+k.x,k=1+k.y);e=-Math.round(e-mxUtils.mod(this.translate.x*this.scale-d,e))+"px "+-Math.round(e-mxUtils.mod(this.translate.y*this.scale-k,e))+"px"}d=a.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=e,a.view.backgroundPageShape.node.style.backgroundImage=c,a.view.backgroundPageShape.node.style.backgroundColor=
-b,a.container.className="geDiagramContainer geDiagramBackdrop",d.style.backgroundImage="none",d.style.backgroundColor=""):(a.container.className="geDiagramContainer",d.style.backgroundPosition=e,d.style.backgroundColor=b,d.style.backgroundImage=c)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var d=this.gridSteps*b,c=[],e=1;e<this.gridSteps;e++){var k=e*b;c.push("M 0 "+k+" L "+d+" "+k+" M "+k+" 0 L "+k+" "+d)}return'<svg width="'+
-d+'" height="'+d+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+d+'" height="'+d+'" patternUnits="userSpaceOnUse"><path d="'+c.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+d+" 0 L 0 0 0 "+d+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,d){a.apply(this,arguments);if(null!=this.shiftPreview1){var f=
-this.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);var c=this.gridSize*this.view.scale*this.view.gridSteps,c=-Math.round(c-mxUtils.mod(this.view.translate.x*this.view.scale+b,c))+"px "+-Math.round(c-mxUtils.mod(this.view.translate.y*this.view.scale+d,c))+"px";f.style.backgroundPosition=c}};mxGraph.prototype.updatePageBreaks=function(a,b,d){var c=this.view.scale,e=this.view.translate,k=this.pageFormat,f=c*this.pageScale,n=this.view.getBackgroundPageBounds();b=n.width;d=n.height;var g=
-new mxRectangle(c*e.x,c*e.y,k.width*f,k.height*f),x=(a=a&&Math.min(g.width,g.height)>this.minPageBreakDist)?Math.ceil(d/g.height)-1:0,A=a?Math.ceil(b/g.width)-1:0,t=n.x+b,l=n.y+d;null==this.horizontalPageBreaks&&0<x&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<A&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?x:A,e=0;e<=c;e++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(n.x),Math.round(n.y+(e+1)*g.height)),
-new mxPoint(Math.round(t),Math.round(n.y+(e+1)*g.height))]:[new mxPoint(Math.round(n.x+(e+1)*g.width),Math.round(n.y)),new mxPoint(Math.round(n.x+(e+1)*g.width),Math.round(l))];null!=a[e]?(a[e].points=b,a[e].redraw()):(b=new mxPolyline(b,this.pageBreakColor),b.dialect=this.dialect,b.isDashed=this.pageBreakDashed,b.pointerEvents=!1,b.init(this.view.backgroundPane),b.redraw(),a[e]=b)}for(e=c;e<a.length;e++)a[e].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
-var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,d,f){for(var c=0;c<d.length;c++)if(this.graph.getModel().isVertex(d[c])){var e=this.graph.getCellGeometry(d[c]);if(null!=e&&e.relative)return!1}return b.apply(this,arguments)};var f=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=f.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,d){return this.isConnecting()?
-!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,d=0<a.height?a.y/this.scale-this.translate.y:0,c=this.graph.pageFormat,e=this.graph.pageScale,k=c.width*e,c=c.height*e,e=Math.floor(Math.min(0,b)/k),f=Math.floor(Math.min(0,
-d)/c);return new mxRectangle(this.scale*(this.translate.x+e*k),this.scale*(this.translate.y+f*c),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/k)-e)*k,this.scale*(Math.ceil(Math.max(1,d+a.height/this.scale)/c)-f)*c)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=
-a+"px",this.view.backgroundPageShape.node.style.marginTop=b+"px")};var l=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,d,c,e,k){var f=l.apply(this,arguments);null==k||k||mxEvent.addListener(f,"mousedown",function(a){mxEvent.consume(a)});return f};var m=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=this.graph.getModel(),d=b.getParent(this.graph.getSelectionCell()),c=m.apply(this,arguments),e=b.getParent(c);
-if(null==d||d!=c&&d!=e)for(;!this.graph.isCellSelected(c)&&!this.graph.isCellSelected(e)&&b.isVertex(e)&&!this.graph.isContainer(e);)c=e,e=this.graph.getModel().getParent(c);return c};var p=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,b){var d=p.apply(this,arguments);if(!d)for(var c=this.graph.getModel(),e=c.getParent(a);null!=e;){if(this.graph.isCellSelected(e)&&c.isVertex(e)){d=!0;break}e=c.getParent(e)}return d};mxGraphHandler.prototype.selectDelayed=
+null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,b=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,d=null!=b&&this.gridColor!=b.toLowerCase()?this.gridColor:"#ffffff",c="none",f="";if(a.isGridEnabled()){f=10;mxClient.IS_SVG?(c=unescape(encodeURIComponent(this.createSvgGrid(d))),c=window.btoa?btoa(c):Base64.encode(c,!0),c="url(data:image/svg+xml;base64,"+c+")",f=a.gridSize*this.scale*this.gridSteps):
+c="url("+this.gridImage+")";var g=d=0;null!=a.view.backgroundPageShape&&(g=this.getBackgroundPageBounds(),d=1+g.x,g=1+g.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-d,f))+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale-g,f))+"px"}d=a.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=f,a.view.backgroundPageShape.node.style.backgroundImage=c,a.view.backgroundPageShape.node.style.backgroundColor=
+b,a.container.className="geDiagramContainer geDiagramBackdrop",d.style.backgroundImage="none",d.style.backgroundColor=""):(a.container.className="geDiagramContainer",d.style.backgroundPosition=f,d.style.backgroundColor=b,d.style.backgroundImage=c)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var d=this.gridSteps*b,c=[],f=1;f<this.gridSteps;f++){var g=f*b;c.push("M 0 "+g+" L "+d+" "+g+" M "+g+" 0 L "+g+" "+d)}return'<svg width="'+
+d+'" height="'+d+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+d+'" height="'+d+'" patternUnits="userSpaceOnUse"><path d="'+c.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+d+" 0 L 0 0 0 "+d+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,d){a.apply(this,arguments);if(null!=this.shiftPreview1){var e=
+this.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);var c=this.gridSize*this.view.scale*this.view.gridSteps,c=-Math.round(c-mxUtils.mod(this.view.translate.x*this.view.scale+b,c))+"px "+-Math.round(c-mxUtils.mod(this.view.translate.y*this.view.scale+d,c))+"px";e.style.backgroundPosition=c}};mxGraph.prototype.updatePageBreaks=function(a,b,d){var c=this.view.scale,f=this.view.translate,g=this.pageFormat,e=c*this.pageScale,n=this.view.getBackgroundPageBounds();b=n.width;d=n.height;var l=
+new mxRectangle(c*f.x,c*f.y,g.width*e,g.height*e),y=(a=a&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(d/l.height)-1:0,A=a?Math.ceil(b/l.width)-1:0,q=n.x+b,k=n.y+d;null==this.horizontalPageBreaks&&0<y&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<A&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?y:A,b=0;b<=c;b++){var f=a==this.horizontalPageBreaks?[new mxPoint(Math.round(n.x),Math.round(n.y+(b+1)*l.height)),
+new mxPoint(Math.round(q),Math.round(n.y+(b+1)*l.height))]:[new mxPoint(Math.round(n.x+(b+1)*l.width),Math.round(n.y)),new mxPoint(Math.round(n.x+(b+1)*l.width),Math.round(k))];null!=a[b]?(a[b].points=f,a[b].redraw()):(f=new mxPolyline(f,this.pageBreakColor),f.dialect=this.dialect,f.isDashed=this.pageBreakDashed,f.pointerEvents=!1,f.init(this.view.backgroundPane),f.redraw(),a[b]=f)}for(b=c;b<a.length;b++)a[b].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
+var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,d,e){for(var c=0;c<d.length;c++)if(this.graph.getModel().isVertex(d[c])){var f=this.graph.getCellGeometry(d[c]);if(null!=f&&f.relative)return!1}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,d){return this.isConnecting()?
+!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,d=0<a.height?a.y/this.scale-this.translate.y:0,c=this.graph.pageFormat,f=this.graph.pageScale,g=c.width*f,c=c.height*f,f=Math.floor(Math.min(0,b)/g),e=Math.floor(Math.min(0,
+d)/c);return new mxRectangle(this.scale*(this.translate.x+f*g),this.scale*(this.translate.y+e*c),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/g)-f)*g,this.scale*(Math.ceil(Math.max(1,d+a.height/this.scale)/c)-e)*c)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=
+a+"px",this.view.backgroundPageShape.node.style.marginTop=b+"px")};var k=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,d,c,f,g){var e=k.apply(this,arguments);null==g||g||mxEvent.addListener(e,"mousedown",function(a){mxEvent.consume(a)});return e};var m=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=this.graph.getModel(),d=b.getParent(this.graph.getSelectionCell()),c=m.apply(this,arguments),f=b.getParent(c);
+if(null==d||d!=c&&d!=f)for(;!this.graph.isCellSelected(c)&&!this.graph.isCellSelected(f)&&b.isVertex(f)&&!this.graph.isContainer(f);)c=f,f=this.graph.getModel().getParent(c);return c};var p=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,b){var d=p.apply(this,arguments);if(!d)for(var c=this.graph.getModel(),f=c.getParent(a);null!=f;){if(this.graph.isCellSelected(f)&&c.isVertex(f)){d=!0;break}f=c.getParent(f)}return d};mxGraphHandler.prototype.selectDelayed=
function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var b=a.getCell();null==b&&(b=this.cell);var d=this.graph.view.getState(b);if(null==d||!a.isSource(d.control))for(var d=this.graph.getModel(),c=d.getParent(b);!this.graph.isCellSelected(c)&&d.isVertex(c);)b=c,c=d.getParent(b);this.graph.selectCellForEvent(b,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var b=this.graph.getModel(),d=b.getParent(a);b.isVertex(d)&&!this.graph.isContainer(d);)this.graph.isCellSelected(d)&&
-(a=d),d=b.getParent(d);return a}})();EditorUi=function(a,b,f){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var d=this.editor.graph;d.lightbox=f;d.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);
-this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,d.isEnabled=function(){return!1},d.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!d.standalone){this.createDivs();this.createUi();this.refresh();var l=mxUtils.bind(this,function(a){null==a&&(a=window.event);return d.isEditing()||null!=a&&this.isSelectionAllowed(a)});this.container==document.body&&(this.menubarContainer.onselectstart=
-l,this.menubarContainer.onmousedown=l,this.toolbarContainer.onselectstart=l,this.toolbarContainer.onmousedown=l,this.diagramContainer.onselectstart=l,this.diagramContainer.onmousedown=l,this.sidebarContainer.onselectstart=l,this.sidebarContainer.onmousedown=l,this.formatContainer.onselectstart=l,this.formatContainer.onmousedown=l,this.footerContainer.onselectstart=l,this.footerContainer.onmousedown=l,null!=this.tabContainer&&(this.tabContainer.onselectstart=l));!this.editor.chromeless||this.editor.editable?
-(b=function(a){if(null!=a){var c=mxEvent.getSource(a);if("A"==c.nodeName)for(;null!=c;){if("geHint"==c.className)return!0;c=c.parentNode}}return l(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):d.panningHandler.usePopupTrigger=!1;d.init(this.diagramContainer);mxClient.IS_SVG&&null!=d.view.getDrawPane()&&(b=d.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position=
+(a=d),d=b.getParent(d);return a}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var d=this.editor.graph;d.lightbox=e;d.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);
+this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,d.isEnabled=function(){return!1},d.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!d.standalone){this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(a){null==a&&(a=window.event);return d.isEditing()||null!=a&&this.isSelectionAllowed(a)});this.container==document.body&&(this.menubarContainer.onselectstart=
+k,this.menubarContainer.onmousedown=k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=k));!this.editor.chromeless||this.editor.editable?
+(b=function(a){if(null!=a){var c=mxEvent.getSource(a);if("A"==c.nodeName)for(;null!=c;){if("geHint"==c.className)return!0;c=c.parentNode}}return k(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):d.panningHandler.usePopupTrigger=!1;d.init(this.diagramContainer);mxClient.IS_SVG&&null!=d.view.getDrawPane()&&(b=d.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position=
"absolute"));this.hoverIcons=this.createHoverIcons();mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var c=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-c.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-c.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var m=!1,p=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=
function(a,c){return m||p.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32!=a.which||d.isEditing()?mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0):(m=!0,this.hoverIcons.reset(),d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(a)!=d.container||mxEvent.consume(a))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";m=!1});mxEvent.addListener(document,"keyup",
-this.keyupHandler);var u=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return u.apply(this,arguments)||m||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var v=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return v.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&
-mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var B=!1,c=null,e=null,k=null,q=mxUtils.bind(this,function(){if(null!=this.toolbar&&B!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var g=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=g}a=this.toolbar.fontMenu;g=this.toolbar.sizeMenu;if(null==k)this.toolbar.createTextToolbar();else{for(var f=
-0;f<k.length;f++)this.toolbar.container.appendChild(k[f]);this.toolbar.fontMenu=c;this.toolbar.sizeMenu=e}B=d.cellEditor.isContentEditing();c=a;e=g;k=b}}),n=this,g=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){g.apply(this,arguments);q();if(d.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&
-null!=n.toolbar)){var e=c.fontFamily;"'"==e.charAt(0)&&(e=e.substring(1));"'"==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1));n.toolbar.setFontName(e);n.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",c);mxEvent.addListener(d.cellEditor.textarea,"touchend",c);mxEvent.addListener(d.cellEditor.textarea,"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var x=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,
-c){x.apply(this,arguments);q()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(L){}var A=d.fireMouseEvent;d.fireMouseEvent=function(a,c,e){a==mxEvent.MOUSE_DOWN&&this.container.focus();A.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,e){this.menus.createPopupMenu(a,c,e)}));mxEvent.addGestureListeners(document,
-mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var t="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),F="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){try{var c=d.view.getState(a);if(null!=c){var e=a.clone();e.style="";var b=d.getCellStyle(e);a=[];var e=[],k;for(k in c.style)b[k]!=c.style[k]&&(a.push(c.style[k]),
-e.push(k));for(var g=d.getModel().getStyle(c.cell),f=null!=g?g.split(";"):[],g=0;g<f.length;g++){var n=f[g],q=n.indexOf("=");if(0<=q){k=n.substring(0,q);var z=n.substring(q+1);null!=b[k]&&"none"==z&&(a.push(z),e.push(k))}}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",e,"values",a,"cells",[c.cell]))}}catch(G){this.handleError(G)}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);
-d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var y=["fontFamily","fontSize","fontColor"],E="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),D=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],y,["opacity"],["align"],["html"]];for(a=0;a<D.length;a++)for(b=
-0;b<D[a].length;b++)t.push(D[a][b]);for(a=0;a<F.length;a++)0>mxUtils.indexOf(t,F[a])&&t.push(F[a]);var z=function(a,c){var e=d.getModel();e.beginUpdate();try{if(c)for(var b=e.isEdge(n),k=b?d.currentEdgeStyle:d.currentVertexStyle,b=["fontSize","fontFamily","fontColor"],g=0;g<b.length;g++){var f=k[b[g]];null!=f&&d.setCellStyles(b[g],f,a)}else for(f=0;f<a.length;f++){for(var n=a[f],q=e.getStyle(n),z=null!=q?q.split(";"):[],O=t.slice(),g=0;g<z.length;g++){var x=z[g],A=x.indexOf("=");if(0<=A){var l=x.substring(0,
-A),Q=mxUtils.indexOf(O,l);0<=Q&&O.splice(Q,1);for(var y=0;y<D.length;y++){var L=D[y];if(0<=mxUtils.indexOf(L,l))for(var m=0;m<L.length;m++){var u=mxUtils.indexOf(O,L[m]);0<=u&&O.splice(u,1)}}}}for(var k=(b=e.isEdge(n))?d.currentEdgeStyle:d.currentVertexStyle,p=e.getStyle(n),g=0;g<O.length;g++){var l=O[g],E=k[l];null==E||"shape"==l&&!b||b&&!(0>mxUtils.indexOf(F,l))||(p=mxUtils.setStyle(p,l,E))}e.setStyle(n,p)}}finally{e.endUpdate()}};d.addListener("cellsInserted",function(a,c){z(c.getProperty("cells"))});
-d.addListener("textInserted",function(a,c){z(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var e=[c.getProperty("cell")];c.getProperty("terminalInserted")&&e.push(c.getProperty("terminal"));z(e)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var e=c.getProperty("cells"),b=!1,k=!1;if(0<e.length)for(var g=0;g<e.length&&(b=d.getModel().isVertex(e[g])||b,!(k=d.getModel().isEdge(e[g])||k)||!b);g++);else k=b=!0;for(var e=c.getProperty("keys"),
-f=c.getProperty("values"),g=0;g<e.length;g++){var n=0<=mxUtils.indexOf(y,e[g]);if("strokeColor"!=e[g]||null!=f[g]&&"none"!=f[g])if(0<=mxUtils.indexOf(F,e[g]))k||0<=mxUtils.indexOf(E,e[g])?null==f[g]?delete d.currentEdgeStyle[e[g]]:d.currentEdgeStyle[e[g]]=f[g]:b&&0<=mxUtils.indexOf(t,e[g])&&(null==f[g]?delete d.currentVertexStyle[e[g]]:d.currentVertexStyle[e[g]]=f[g]);else if(0<=mxUtils.indexOf(t,e[g])){if(b||n)null==f[g]?delete d.currentVertexStyle[e[g]]:d.currentVertexStyle[e[g]]=f[g];if(k||n||
-0<=mxUtils.indexOf(E,e[g]))null==f[g]?delete d.currentEdgeStyle[e[g]]:d.currentEdgeStyle[e[g]]=f[g]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":
+this.keyupHandler);var u=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return u.apply(this,arguments)||m||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var x=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return x.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&
+mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var B=!1,c=null,f=null,g=null,t=mxUtils.bind(this,function(){if(null!=this.toolbar&&B!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var l=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=l}a=this.toolbar.fontMenu;l=this.toolbar.sizeMenu;if(null==g)this.toolbar.createTextToolbar();else{for(var e=
+0;e<g.length;e++)this.toolbar.container.appendChild(g[e]);this.toolbar.fontMenu=c;this.toolbar.sizeMenu=f}B=d.cellEditor.isContentEditing();c=a;f=l;g=b}}),n=this,l=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){l.apply(this,arguments);t();if(d.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&
+null!=n.toolbar)){var b=c.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1));n.toolbar.setFontName(b);n.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",c);mxEvent.addListener(d.cellEditor.textarea,"touchend",c);mxEvent.addListener(d.cellEditor.textarea,"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var y=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,
+c){y.apply(this,arguments);t()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(H){}var A=d.fireMouseEvent;d.fireMouseEvent=function(a,c,b){a==mxEvent.MOUSE_DOWN&&this.container.focus();A.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,b){this.menus.createPopupMenu(a,c,b)}));mxEvent.addGestureListeners(document,
+mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var q="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),E="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){try{var c=d.view.getState(a);if(null!=c){var b=a.clone();b.style="";var f=d.getCellStyle(b);a=[];var b=[],g;for(g in c.style)f[g]!=c.style[g]&&(a.push(c.style[g]),
+b.push(g));for(var l=d.getModel().getStyle(c.cell),e=null!=l?l.split(";"):[],l=0;l<e.length;l++){var n=e[l],v=n.indexOf("=");if(0<=v){g=n.substring(0,v);var t=n.substring(v+1);null!=f[g]&&"none"==t&&(a.push(t),b.push(g))}}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",b,"values",a,"cells",[c.cell]))}}catch(F){this.handleError(F)}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);
+d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var z=["fontFamily","fontSize","fontColor"],G="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),D=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],z,["opacity"],["align"],["html"]];for(a=0;a<D.length;a++)for(b=
+0;b<D[a].length;b++)q.push(D[a][b]);for(a=0;a<E.length;a++)0>mxUtils.indexOf(q,E[a])&&q.push(E[a]);var v=function(a,c){var b=d.getModel();b.beginUpdate();try{if(c)for(var f=b.isEdge(n),g=f?d.currentEdgeStyle:d.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],l=0;l<f.length;l++){var e=g[f[l]];null!=e&&d.setCellStyles(f[l],e,a)}else for(e=0;e<a.length;e++){for(var n=a[e],v=b.getStyle(n),t=null!=v?v.split(";"):[],M=q.slice(),l=0;l<t.length;l++){var y=t[l],A=y.indexOf("=");if(0<=A){var k=y.substring(0,
+A),Z=mxUtils.indexOf(M,k);0<=Z&&M.splice(Z,1);for(var z=0;z<D.length;z++){var H=D[z];if(0<=mxUtils.indexOf(H,k))for(var m=0;m<H.length;m++){var u=mxUtils.indexOf(M,H[m]);0<=u&&M.splice(u,1)}}}}for(var g=(f=b.isEdge(n))?d.currentEdgeStyle:d.currentVertexStyle,p=b.getStyle(n),l=0;l<M.length;l++){var k=M[l],G=g[k];null==G||"shape"==k&&!f||f&&!(0>mxUtils.indexOf(E,k))||(p=mxUtils.setStyle(p,k,G))}b.setStyle(n,p)}}finally{b.endUpdate()}};d.addListener("cellsInserted",function(a,c){v(c.getProperty("cells"))});
+d.addListener("textInserted",function(a,c){v(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var b=[c.getProperty("cell")];c.getProperty("terminalInserted")&&b.push(c.getProperty("terminal"));v(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var b=c.getProperty("cells"),f=!1,g=!1;if(0<b.length)for(var l=0;l<b.length&&(f=d.getModel().isVertex(b[l])||f,!(g=d.getModel().isEdge(b[l])||g)||!f);l++);else g=f=!0;for(var b=c.getProperty("keys"),
+e=c.getProperty("values"),l=0;l<b.length;l++){var n=0<=mxUtils.indexOf(z,b[l]);if("strokeColor"!=b[l]||null!=e[l]&&"none"!=e[l])if(0<=mxUtils.indexOf(E,b[l]))g||0<=mxUtils.indexOf(G,b[l])?null==e[l]?delete d.currentEdgeStyle[b[l]]:d.currentEdgeStyle[b[l]]=e[l]:f&&0<=mxUtils.indexOf(q,b[l])&&(null==e[l]?delete d.currentVertexStyle[b[l]]:d.currentVertexStyle[b[l]]=e[l]);else if(0<=mxUtils.indexOf(q,b[l])){if(f||n)null==e[l]?delete d.currentVertexStyle[b[l]]:d.currentVertexStyle[b[l]]=e[l];if(g||n||
+0<=mxUtils.indexOf(G,b[l]))null==e[l]?delete d.currentEdgeStyle[b[l]]:d.currentEdgeStyle[b[l]]=e[l]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":
"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):
"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",d.currentEdgeStyle.shape,
d.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(d.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(d.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var a=d.currentVertexStyle.fontFamily||"Helvetica",c=String(d.currentVertexStyle.fontSize||
-"12"),e=d.getView().getState(d.getSelectionCell());null!=e&&(a=e.style[mxConstants.STYLE_FONTFAMILY]||a,c=e.style[mxConstants.STYLE_FONTSIZE]||c,10<a.length&&(a=a.substring(0,8)+"..."));this.toolbar.setFontName(a);this.toolbar.setFontSize(c)}),d.getSelectionModel().addListener(mxEvent.CHANGE,a),d.getModel().addListener(mxEvent.CHANGE,a));d.addListener(mxEvent.CELLS_ADDED,function(a,c){var e=c.getProperty("cells"),b=c.getProperty("parent");d.getModel().isLayer(b)&&!d.isCellVisible(b)&&null!=e&&0<e.length&&
-d.getModel().setVisible(b,!0)});this.gestureHandler=mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=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()});
+"12"),b=d.getView().getState(d.getSelectionCell());null!=b&&(a=b.style[mxConstants.STYLE_FONTFAMILY]||a,c=b.style[mxConstants.STYLE_FONTSIZE]||c,10<a.length&&(a=a.substring(0,8)+"..."));this.toolbar.setFontName(a);this.toolbar.setFontSize(c)}),d.getSelectionModel().addListener(mxEvent.CHANGE,a),d.getModel().addListener(mxEvent.CHANGE,a));d.addListener(mxEvent.CELLS_ADDED,function(a,c){var b=c.getProperty("cells"),f=c.getProperty("parent");d.getModel().isLayer(f)&&!d.isCellVisible(f)&&null!=b&&0<b.length&&
+d.getModel().setVisible(f,!0)});this.gestureHandler=mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=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(){d.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,
function(){d.view.validateBackground()}));d.addListener("gridSizeChanged",mxUtils.bind(this,function(){d.isGridEnabled()&&d.view.validateBackground()}));this.editor.resetGraph()}this.init();d.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;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.hsplitPosition=640>=screen.width?118:"large"!=urlParams["sidebar-entries"]?212:240;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1;
EditorUi.prototype.init=function(){var a=this.editor.graph;if(!a.standalone){mxEvent.addListener(a.container,"keydown",mxUtils.bind(this,function(a){this.onKeyDown(a)}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(a){this.onKeyPress(a)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));
-var b=a.setDefaultParent,f=this;this.editor.graph.setDefaultParent=function(){b.apply(this,arguments);f.updateActionStates()};a.editLink=f.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.onKeyDown=function(a){var b=this.editor.graph;9==a.which&&b.isEnabled()&&!mxEvent.isAltDown(a)&&(b.isEditing()?b.stopEditing(!1):b.selectCell(!mxEvent.isShiftDown(a)),mxEvent.consume(a))};
+var b=a.setDefaultParent,e=this;this.editor.graph.setDefaultParent=function(){b.apply(this,arguments);e.updateActionStates()};a.editLink=e.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.onKeyDown=function(a){var b=this.editor.graph;9==a.which&&b.isEnabled()&&!mxEvent.isAltDown(a)&&(b.isEditing()?b.stopEditing(!1):b.selectCell(!mxEvent.isShiftDown(a)),mxEvent.consume(a))};
EditorUi.prototype.onKeyPress=function(a){var b=this.editor.graph;!this.isImmediateEditingEvent(a)||b.isEditing()||b.isSelectionEmpty()||0===a.which||27===a.which||mxEvent.isAltDown(a)||mxEvent.isControlDown(a)||mxEvent.isMetaDown(a)||(b.escape(),b.startEditing(),mxClient.IS_FF&&(b=b.cellEditor,b.textarea.innerHTML=String.fromCharCode(a.which),a=document.createRange(),a.selectNodeContents(b.textarea),a.collapse(!1),b=window.getSelection(),b.removeAllRanges(),b.addRange(a)))};
EditorUi.prototype.isImmediateEditingEvent=function(a){return!0};
-EditorUi.prototype.getCssClassForMarker=function(a,b,f,d){return"flexArrow"==b?null!=f&&f!=mxConstants.NONE?"geSprite geSprite-"+a+"blocktrans":"geSprite geSprite-noarrow":f==mxConstants.ARROW_CLASSIC?"1"==d?"geSprite geSprite-"+a+"classic":"geSprite geSprite-"+a+"classictrans":f==mxConstants.ARROW_CLASSIC_THIN?"1"==d?"geSprite geSprite-"+a+"classicthin":"geSprite geSprite-"+a+"classicthintrans":f==mxConstants.ARROW_OPEN?"geSprite geSprite-"+a+"open":f==mxConstants.ARROW_OPEN_THIN?"geSprite geSprite-"+
-a+"openthin":f==mxConstants.ARROW_BLOCK?"1"==d?"geSprite geSprite-"+a+"block":"geSprite geSprite-"+a+"blocktrans":f==mxConstants.ARROW_BLOCK_THIN?"1"==d?"geSprite geSprite-"+a+"blockthin":"geSprite geSprite-"+a+"blockthintrans":f==mxConstants.ARROW_OVAL?"1"==d?"geSprite geSprite-"+a+"oval":"geSprite geSprite-"+a+"ovaltrans":f==mxConstants.ARROW_DIAMOND?"1"==d?"geSprite geSprite-"+a+"diamond":"geSprite geSprite-"+a+"diamondtrans":f==mxConstants.ARROW_DIAMOND_THIN?"1"==d?"geSprite geSprite-"+a+"thindiamond":
-"geSprite geSprite-"+a+"thindiamondtrans":"openAsync"==f?"geSprite geSprite-"+a+"openasync":"dash"==f?"geSprite geSprite-"+a+"dash":"cross"==f?"geSprite geSprite-"+a+"cross":"async"==f?"1"==d?"geSprite geSprite-"+a+"async":"geSprite geSprite-"+a+"asynctrans":"circle"==f||"circlePlus"==f?"1"==d||"circle"==f?"geSprite geSprite-"+a+"circle":"geSprite geSprite-"+a+"circleplus":"ERone"==f?"geSprite geSprite-"+a+"erone":"ERmandOne"==f?"geSprite geSprite-"+a+"eronetoone":"ERmany"==f?"geSprite geSprite-"+
-a+"ermany":"ERoneToMany"==f?"geSprite geSprite-"+a+"eronetomany":"ERzeroToOne"==f?"geSprite geSprite-"+a+"eroneopt":"ERzeroToMany"==f?"geSprite geSprite-"+a+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null};
-EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=this.actions.get("paste"),f=this.actions.get("pasteHere");b.setEnabled(this.editor.graph.cellEditor.isContentEditing()||!mxClipboard.isEmpty()&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));f.setEnabled(b.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(b){var d=null;if(b.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var d=d||b.getSelectionCells(),d=b.getExportableCells(b.model.getTopmostCells(d)),f={},l=b.createCellLookup(d),m=b.cloneCells(d,null,f),c=new mxGraphModel,e=c.getChildAt(c.getRoot(),
-0),k=0;k<m.length;k++)c.add(e,m[k]);b.updateCustomLinks(b.createCellMapping(f,l),m);mxClipboard.insertCount=1;mxClipboard.setCells(m)}a.updatePasteActionStates();return d};var f=mxClipboard.paste;mxClipboard.paste=function(b){var d=null;b.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):d=f.apply(this,arguments);a.updatePasteActionStates();return d};var d=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){d.apply(this,arguments);a.updatePasteActionStates()};
-var l=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,d){l.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;
+EditorUi.prototype.getCssClassForMarker=function(a,b,e,d){return"flexArrow"==b?null!=e&&e!=mxConstants.NONE?"geSprite geSprite-"+a+"blocktrans":"geSprite geSprite-noarrow":e==mxConstants.ARROW_CLASSIC?"1"==d?"geSprite geSprite-"+a+"classic":"geSprite geSprite-"+a+"classictrans":e==mxConstants.ARROW_CLASSIC_THIN?"1"==d?"geSprite geSprite-"+a+"classicthin":"geSprite geSprite-"+a+"classicthintrans":e==mxConstants.ARROW_OPEN?"geSprite geSprite-"+a+"open":e==mxConstants.ARROW_OPEN_THIN?"geSprite geSprite-"+
+a+"openthin":e==mxConstants.ARROW_BLOCK?"1"==d?"geSprite geSprite-"+a+"block":"geSprite geSprite-"+a+"blocktrans":e==mxConstants.ARROW_BLOCK_THIN?"1"==d?"geSprite geSprite-"+a+"blockthin":"geSprite geSprite-"+a+"blockthintrans":e==mxConstants.ARROW_OVAL?"1"==d?"geSprite geSprite-"+a+"oval":"geSprite geSprite-"+a+"ovaltrans":e==mxConstants.ARROW_DIAMOND?"1"==d?"geSprite geSprite-"+a+"diamond":"geSprite geSprite-"+a+"diamondtrans":e==mxConstants.ARROW_DIAMOND_THIN?"1"==d?"geSprite geSprite-"+a+"thindiamond":
+"geSprite geSprite-"+a+"thindiamondtrans":"openAsync"==e?"geSprite geSprite-"+a+"openasync":"dash"==e?"geSprite geSprite-"+a+"dash":"cross"==e?"geSprite geSprite-"+a+"cross":"async"==e?"1"==d?"geSprite geSprite-"+a+"async":"geSprite geSprite-"+a+"asynctrans":"circle"==e||"circlePlus"==e?"1"==d||"circle"==e?"geSprite geSprite-"+a+"circle":"geSprite geSprite-"+a+"circleplus":"ERone"==e?"geSprite geSprite-"+a+"erone":"ERmandOne"==e?"geSprite geSprite-"+a+"eronetoone":"ERmany"==e?"geSprite geSprite-"+
+a+"ermany":"ERoneToMany"==e?"geSprite geSprite-"+a+"eronetomany":"ERzeroToOne"==e?"geSprite geSprite-"+a+"eroneopt":"ERzeroToMany"==e?"geSprite geSprite-"+a+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null};
+EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=this.actions.get("paste"),e=this.actions.get("pasteHere");b.setEnabled(this.editor.graph.cellEditor.isContentEditing()||!mxClipboard.isEmpty()&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));e.setEnabled(b.isEnabled())};
+EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(b){var d=null;if(b.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var d=d||b.getSelectionCells(),d=b.getExportableCells(b.model.getTopmostCells(d)),e={},k=b.createCellLookup(d),m=b.cloneCells(d,null,e),c=new mxGraphModel,f=c.getChildAt(c.getRoot(),
+0),g=0;g<m.length;g++)c.add(f,m[g]);b.updateCustomLinks(b.createCellMapping(e,k),m);mxClipboard.insertCount=1;mxClipboard.setCells(m)}a.updatePasteActionStates();return d};var e=mxClipboard.paste;mxClipboard.paste=function(b){var d=null;b.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):d=e.apply(this,arguments);a.updatePasteActionStates();return d};var d=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){d.apply(this,arguments);a.updatePasteActionStates()};
+var k=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,d){k.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),c=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*c.width),this.scale*(this.translate.y+a.y*c.height),this.scale*a.width*c.width,
-this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,e){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,e,b,d){if(null!=a.container&&!a.isViewer()){b=null!=b?b:0;d=null!=d?d:0;var k=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),g=mxUtils.hasScrollbars(a.container),f=a.view.translate,n=a.view.scale,q=mxRectangle.fromRectangle(k);
-q.x=q.x/n-f.x;q.y=q.y/n-f.y;q.width/=n;q.height/=n;var f=a.container.scrollTop,z=a.container.scrollLeft,C=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)C+=3;var t=a.container.offsetWidth-C,C=a.container.offsetHeight-C;c=c?Math.max(.3,Math.min(e||1,t/q.width)):n;e=(t-c*q.width)/2/c;var x=0==this.lightboxVerticalDivider?0:(C-c*q.height)/this.lightboxVerticalDivider/c;g&&(e=Math.max(e,0),x=Math.max(x,0));if(g||k.width<t||k.height<C)a.view.scaleAndTranslate(c,
-Math.floor(e-q.x),Math.floor(x-q.y)),a.container.scrollTop=f*c/n,a.container.scrollLeft=z*c/n;else if(0!=b||0!=d)k=a.view.translate,a.view.setTranslate(Math.floor(k.x+b/n),Math.floor(k.y+d/n))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView",
-mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(c){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(c){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var l=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";
+this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,b){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,b,f,d){if(null!=a.container&&!a.isViewer()){f=null!=f?f:0;d=null!=d?d:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),l=mxUtils.hasScrollbars(a.container),e=a.view.translate,n=a.view.scale,v=mxRectangle.fromRectangle(g);
+v.x=v.x/n-e.x;v.y=v.y/n-e.y;v.width/=n;v.height/=n;var e=a.container.scrollTop,t=a.container.scrollLeft,C=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)C+=3;var q=a.container.offsetWidth-C,C=a.container.offsetHeight-C;c=c?Math.max(.3,Math.min(b||1,q/v.width)):n;b=(q-c*v.width)/2/c;var y=0==this.lightboxVerticalDivider?0:(C-c*v.height)/this.lightboxVerticalDivider/c;l&&(b=Math.max(b,0),y=Math.max(y,0));if(l||g.width<q||g.height<C)a.view.scaleAndTranslate(c,
+Math.floor(b-v.x),Math.floor(y-v.y)),a.container.scrollTop=e*c/n,a.container.scrollLeft=t*c/n;else if(0!=f||0!=d)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+f/n),Math.floor(g.y+d/n))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView",
+mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(c){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(c){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var k=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=a.isViewer()?"0":"50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var m=mxUtils.bind(this,function(){var c=
-mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=c?parseInt(c["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",m);m();var p=0,m=mxUtils.bind(this,function(a,c,e){p++;var b=document.createElement("span");b.style.paddingLeft="8px";b.style.paddingRight="8px";b.style.cursor="pointer";mxEvent.addListener(b,"click",a);null!=e&&b.setAttribute("title",
-e);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",c);b.appendChild(a);this.chromelessToolbar.appendChild(b);return b});null!=l.backBtn&&m(mxUtils.bind(this,function(a){window.location.href=l.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));var u=m(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),v=document.createElement("div");
-v.style.display="inline-block";v.style.verticalAlign="top";v.style.fontFamily="Helvetica,Arial";v.style.marginTop="8px";v.style.fontSize="14px";v.style.color="#ffffff";this.chromelessToolbar.appendChild(v);var B=m(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(v.innerHTML="",mxUtils.write(v,mxUtils.indexOf(this.pages,
-this.currentPage)+1+" / "+this.pages.length))});u.style.paddingLeft="0px";u.style.paddingRight="4px";B.style.paddingLeft="4px";B.style.paddingRight="0px";var e=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(B.style.display="",u.style.display="",v.style.display="inline-block"):(B.style.display="none",u.style.display="none",v.style.display="none");c()});this.editor.addListener("resetGraphView",e);this.editor.addListener("pageSelected",c);m(mxUtils.bind(this,
+mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=c?parseInt(c["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",m);m();var p=0,m=mxUtils.bind(this,function(a,c,b){p++;var f=document.createElement("span");f.style.paddingLeft="8px";f.style.paddingRight="8px";f.style.cursor="pointer";mxEvent.addListener(f,"click",a);null!=b&&f.setAttribute("title",
+b);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",c);f.appendChild(a);this.chromelessToolbar.appendChild(f);return f});null!=k.backBtn&&m(mxUtils.bind(this,function(a){window.location.href=k.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));var u=m(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),x=document.createElement("div");
+x.style.display="inline-block";x.style.verticalAlign="top";x.style.fontFamily="Helvetica,Arial";x.style.marginTop="8px";x.style.fontSize="14px";x.style.color="#ffffff";this.chromelessToolbar.appendChild(x);var B=m(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(x.innerHTML="",mxUtils.write(x,mxUtils.indexOf(this.pages,
+this.currentPage)+1+" / "+this.pages.length))});u.style.paddingLeft="0px";u.style.paddingRight="4px";B.style.paddingLeft="4px";B.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(B.style.display="",u.style.display="",x.style.display="inline-block"):(B.style.display="none",u.style.display="none",x.style.display="none");c()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",c);m(mxUtils.bind(this,
function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(c){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,
-mxResources.get("fit"));var k=null,q=null,n=mxUtils.bind(this,function(a){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=q&&(window.clearTimeout(q),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);k=null;q=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";q=null}),600)}),a||200)}),g=mxUtils.bind(this,function(a){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=q&&(window.clearTimeout(q),
-fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var x=m(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=
-null}));var e=x.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=e.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
-this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=e.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),A=a.getModel();A.addListener(mxEvent.CHANGE,function(){x.style.display=1<A.getChildCount(A.root)?"":"none"})}this.addChromelessToolbarItems(m);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||m(mxUtils.bind(this,function(c){null!=
-this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(c)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(e=0;e<this.lightboxToolbarActions.length;e++){var t=this.lightboxToolbarActions[e];m(t.fn,t.icon,t.tooltip)}null!=l.refreshBtn&&m(mxUtils.bind(this,function(a){l.refreshBtn.url?window.location.href=l.refreshBtn.url:
-window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=l.fullscreenBtn&&window.self!==window.top&&m(mxUtils.bind(this,function(c){l.fullscreenBtn.url?a.openLink(l.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(c)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(l.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&m(mxUtils.bind(this,
-function(a){"1"==urlParams.close||l.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)||
-g(30),n())}));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)?n():g(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?n():g(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||
-g(30)}));var F=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,e){this.startX=e.getGraphX();this.startY=e.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,e){mxEvent.isTouchEvent(e.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<F&&Math.abs(this.scrollTop-a.container.scrollTop)<F&&Math.abs(this.startX-e.getGraphX())<F&&Math.abs(this.startY-e.getGraphY())<
-F&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?n():g(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var y=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=a.y-(this.y0||0)*c.height}y.apply(this,arguments)};if(!a.isViewer()){var E=a.sizeDidChange;a.sizeDidChange=
-function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),e=this.getPagePadding(),b=this.getPageSize(),d=Math.ceil(2*e.x+c.width*b.width),k=Math.ceil(2*e.y+c.height*b.height),g=a.minimumGraphSize;if(null==g||g.width!=d||g.height!=k)a.minimumGraphSize=new mxRectangle(0,0,d,k);d=e.x-c.x*b.width;e=e.y-c.y*b.height;this.autoTranslate||this.view.translate.x==d&&this.view.translate.y==e?E.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=
-c.y,c=a.view.translate.x,b=a.view.translate.y,a.view.setTranslate(d,e),a.container.scrollLeft+=Math.round((d-c)*a.view.scale),a.container.scrollTop+=Math.round((e-b)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var D=null,z=a.view.getDrawPane(),L=a.view.getBackgroundPane();a.lazyZoom=function(c,e){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);
+mxResources.get("fit"));var g=null,t=null,n=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=t&&(window.clearTimeout(t),fadeThead2=null);g=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);g=null;t=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";t=null}),600)}),a||200)}),l=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=t&&(window.clearTimeout(t),
+fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var y=m(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=
+null}));var b=y.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=b.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
+this.chromelessToolbar.offsetHeight+4+"px";b=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=b.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),A=a.getModel();A.addListener(mxEvent.CHANGE,function(){y.style.display=1<A.getChildCount(A.root)?"":"none"})}this.addChromelessToolbarItems(m);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||m(mxUtils.bind(this,function(c){null!=
+this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(c)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(f=0;f<this.lightboxToolbarActions.length;f++){var q=this.lightboxToolbarActions[f];m(q.fn,q.icon,q.tooltip)}null!=k.refreshBtn&&m(mxUtils.bind(this,function(a){k.refreshBtn.url?window.location.href=k.refreshBtn.url:
+window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=k.fullscreenBtn&&window.self!==window.top&&m(mxUtils.bind(this,function(c){k.fullscreenBtn.url?a.openLink(k.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(c)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(k.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&m(mxUtils.bind(this,
+function(a){"1"==urlParams.close||k.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||
+l(30),n())}));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)?n():l(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?n():l(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||
+l(30)}));var E=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<E&&Math.abs(this.scrollTop-a.container.scrollTop)<E&&Math.abs(this.startX-b.getGraphX())<E&&Math.abs(this.startY-b.getGraphY())<
+E&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?n():l(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var z=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=a.y-(this.y0||0)*c.height}z.apply(this,arguments)};if(!a.isViewer()){var G=a.sizeDidChange;a.sizeDidChange=
+function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),b=this.getPagePadding(),f=this.getPageSize(),d=Math.ceil(2*b.x+c.width*f.width),g=Math.ceil(2*b.y+c.height*f.height),l=a.minimumGraphSize;if(null==l||l.width!=d||l.height!=g)a.minimumGraphSize=new mxRectangle(0,0,d,g);d=b.x-c.x*f.width;b=b.y-c.y*f.height;this.autoTranslate||this.view.translate.x==d&&this.view.translate.y==b?G.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=
+c.y,c=a.view.translate.x,f=a.view.translate.y,a.view.setTranslate(d,b),a.container.scrollLeft+=Math.round((d-c)*a.view.scale),a.container.scrollTop+=Math.round((b-f)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var D=null,v=a.view.getDrawPane(),H=a.view.getBackgroundPane();a.lazyZoom=function(c,f){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);
c?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+.01)/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-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);
-if("fast"==urlParams.zoom){var d=e?a.container.scrollWidth/2:D.x+a.container.scrollLeft-a.container.offsetLeft,k=e?a.container.scrollHeight/2:D.y+a.container.scrollTop-a.container.offsetTop;z.setAttribute("transform-origin",d+" "+k);z.setAttribute("transform","scale("+this.cumulativeZoomFactor+")");L.setAttribute("transform-origin",d+" "+k);L.setAttribute("transform","scale("+this.cumulativeZoomFactor+")");k=a.view.backgroundPageShape.node;mxUtils.setPrefixedStyle(k.style,"transform-origin",e?"50%":
-D.x+a.container.offsetLeft-k.offsetLeft+"px "+e?"50%":D.y-k.offsetTop+"px");mxUtils.setPrefixedStyle(k.style,"transform","scale("+this.cumulativeZoomFactor+")");a.view.getOverlayPane().style.opacity="0";a.view.getDecoratorPane().style.opacity="0";console.log("here",this.cumulativeZoomFactor,d,k.offsetLeft,k.offsetWidth)}this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){"fast"==
-urlParams.zoom&&(z.removeAttribute("transform-origin"),z.removeAttribute("transform"),L.removeAttribute("transform-origin"),L.removeAttribute("transform"),a.view.getOverlayPane().style.opacity="",a.view.getDecoratorPane().style.opacity="",mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null));var c=mxUtils.getOffset(a.container),e=0,d=0;null!=D&&(e=a.container.offsetWidth/2-D.x+c.x,d=
-a.container.offsetHeight/2-D.y+c.y);c=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=c&&(null!=b&&f.chromelessResize(!1,null,e*(this.cumulativeZoomFactor-1),d*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==e&&0==d||(a.container.scrollLeft-=e*(this.cumulativeZoomFactor-1),a.container.scrollTop-=d*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),"fast"==urlParams.zoom?500:this.lazyZoomDelay)};mxEvent.addMouseWheelListener(mxUtils.bind(this,
-function(c,e){if((null==this.dialogs||0==this.dialogs.length)&&a.isZoomWheelEvent(c))for(var b=mxEvent.getSource(c);null!=b;){if(b==a.container)return D=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c)),a.lazyZoom(e),mxEvent.consume(c),!1;b=b.parentNode}}),a.container)};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};
+if("fast"==urlParams.zoom){var d=f?a.container.scrollWidth/2:D.x+a.container.scrollLeft-a.container.offsetLeft,g=f?a.container.scrollHeight/2:D.y+a.container.scrollTop-a.container.offsetTop;v.setAttribute("transform-origin",d+" "+g);v.setAttribute("transform","scale("+this.cumulativeZoomFactor+")");H.setAttribute("transform-origin",d+" "+g);H.setAttribute("transform","scale("+this.cumulativeZoomFactor+")");g=a.view.backgroundPageShape.node;mxUtils.setPrefixedStyle(g.style,"transform-origin",f?"50%":
+D.x+a.container.offsetLeft-g.offsetLeft+"px "+f?"50%":D.y-g.offsetTop+"px");mxUtils.setPrefixedStyle(g.style,"transform","scale("+this.cumulativeZoomFactor+")");a.view.getOverlayPane().style.opacity="0";a.view.getDecoratorPane().style.opacity="0";console.log("here",this.cumulativeZoomFactor,d,g.offsetLeft,g.offsetWidth)}this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){"fast"==
+urlParams.zoom&&(v.removeAttribute("transform-origin"),v.removeAttribute("transform"),H.removeAttribute("transform-origin"),H.removeAttribute("transform"),a.view.getOverlayPane().style.opacity="",a.view.getDecoratorPane().style.opacity="",mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null));var c=mxUtils.getOffset(a.container),f=0,d=0;null!=D&&(f=a.container.offsetWidth/2-D.x+c.x,d=
+a.container.offsetHeight/2-D.y+c.y);c=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=c&&(null!=b&&e.chromelessResize(!1,null,f*(this.cumulativeZoomFactor-1),d*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==f&&0==d||(a.container.scrollLeft-=f*(this.cumulativeZoomFactor-1),a.container.scrollTop-=d*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),"fast"==urlParams.zoom?500:this.lazyZoomDelay)};mxEvent.addMouseWheelListener(mxUtils.bind(this,
+function(c,b){if((null==this.dialogs||0==this.dialogs.length)&&a.isZoomWheelEvent(c))for(var f=mxEvent.getSource(c);null!=f;){if(f==a.container)return D=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c)),a.lazyZoom(b),mxEvent.consume(c),!1;f=f.parentNode}}),a.container)};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.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return 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){null!=this.format&&(this.formatWidth=a||0<this.formatWidth?0:240,this.formatContainer.style.display=a||0<this.formatWidth?"":"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 b=urlParams.border,f=60;null!=b&&(f=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(f,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.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var b=urlParams.border,e=60;null!=b&&(e=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(e,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,b){try{var f=mxUtils.parseXml(a);this.editor.setGraphXml(f.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(d){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+d.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
+EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var e=mxUtils.parseXml(a);this.editor.setGraphXml(e.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(d){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+d.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.setCurrentMenu=function(a,b){this.currentMenuElt=b;this.currentMenu=a};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 a=this.editor.getOrCreateFilename();null!=this.editor.appName&&(a+=" - "+this.editor.appName);document.title=a};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(a){}};
-EditorUi.prototype.undo=function(){try{var a=this.editor.graph;if(a.isEditing()){var b=a.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);b==a.cellEditor.textarea.innerHTML&&(a.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(f){}};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(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0,f;for(f in urlParams)a=0==b?a+"?":a+"&",a+=f+"="+urlParams[f],b++;return a};
-EditorUi.prototype.setScrollbars=function(a){var b=this.editor.graph,f=b.container.style.overflow;b.scrollbars=a;this.editor.updateGraphComponents();f!=b.container.style.overflow&&("hidden"==b.container.style.overflow?(a=b.view.translate,b.view.setTranslate(a.x-b.container.scrollLeft/b.view.scale,a.y-b.container.scrollTop/b.view.scale),b.container.scrollLeft=0,b.container.scrollTop=0,b.minimumGraphSize=null,b.sizeDidChange()):(a=b.view.translate.x,f=b.view.translate.y,b.view.translate.x=0,b.view.translate.y=
-0,b.sizeDidChange(),b.container.scrollLeft-=Math.round(a*b.view.scale),b.container.scrollTop-=Math.round(f*b.view.scale)));this.fireEvent(new mxEventObject("scrollbarsChanged"))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
+EditorUi.prototype.undo=function(){try{var a=this.editor.graph;if(a.isEditing()){var b=a.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);b==a.cellEditor.textarea.innerHTML&&(a.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(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0,e;for(e in urlParams)a=0==b?a+"?":a+"&",a+=e+"="+urlParams[e],b++;return a};
+EditorUi.prototype.setScrollbars=function(a){var b=this.editor.graph,e=b.container.style.overflow;b.scrollbars=a;this.editor.updateGraphComponents();e!=b.container.style.overflow&&("hidden"==b.container.style.overflow?(a=b.view.translate,b.view.setTranslate(a.x-b.container.scrollLeft/b.view.scale,a.y-b.container.scrollTop/b.view.scale),b.container.scrollLeft=0,b.container.scrollTop=0,b.minimumGraphSize=null,b.sizeDidChange()):(a=b.view.translate.x,e=b.view.translate.y,b.view.translate.x=0,b.view.translate.y=
+0,b.sizeDidChange(),b.container.scrollLeft-=Math.round(a*b.view.scale),b.container.scrollTop-=Math.round(e*b.view.scale)));this.fireEvent(new mxEventObject("scrollbarsChanged"))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
EditorUi.prototype.resetScrollbars=function(){var a=this.editor.graph;if(!this.editor.extendCanvas)a.container.scrollTop=0,a.container.scrollLeft=0,mxUtils.hasScrollbars(a.container)||a.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(a.container))if(a.pageVisible){var b=a.getPagePadding();a.container.scrollTop=Math.floor(b.y-this.editor.initialTopSpacing)-1;a.container.scrollLeft=Math.floor(Math.min(b.x,(a.container.scrollWidth-a.container.clientWidth)/2))-
-1;b=a.getGraphBounds();0<b.width&&0<b.height&&(b.x>a.container.scrollLeft+.9*a.container.clientWidth&&(a.container.scrollLeft=Math.min(b.x+b.width-a.container.clientWidth,b.x-10)),b.y>a.container.scrollTop+.9*a.container.clientHeight&&(a.container.scrollTop=Math.min(b.y+b.height-a.container.clientHeight,b.y-10)))}else{var b=a.getGraphBounds(),f=Math.max(b.width,a.scrollTileSize.width*a.view.scale);a.container.scrollTop=Math.floor(Math.max(0,b.y-Math.max(20,(a.container.clientHeight-Math.max(b.height,
-a.scrollTileSize.height*a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,b.x-Math.max(0,(a.container.clientWidth-f)/2)))}else a.pageVisible?(b=a.view.getBackgroundPageBounds(),a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x),Math.floor(Math.max(0,(a.container.clientHeight-b.height)/2)-b.y))):(b=a.getGraphBounds(),a.view.setTranslate(Math.floor(Math.max(0,Math.max(0,(a.container.clientWidth-b.width)/2)-b.x)),Math.floor(Math.max(0,Math.max(20,(a.container.clientHeight-
+1;b=a.getGraphBounds();0<b.width&&0<b.height&&(b.x>a.container.scrollLeft+.9*a.container.clientWidth&&(a.container.scrollLeft=Math.min(b.x+b.width-a.container.clientWidth,b.x-10)),b.y>a.container.scrollTop+.9*a.container.clientHeight&&(a.container.scrollTop=Math.min(b.y+b.height-a.container.clientHeight,b.y-10)))}else{var b=a.getGraphBounds(),e=Math.max(b.width,a.scrollTileSize.width*a.view.scale);a.container.scrollTop=Math.floor(Math.max(0,b.y-Math.max(20,(a.container.clientHeight-Math.max(b.height,
+a.scrollTileSize.height*a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,b.x-Math.max(0,(a.container.clientWidth-e)/2)))}else a.pageVisible?(b=a.view.getBackgroundPageBounds(),a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x),Math.floor(Math.max(0,(a.container.clientHeight-b.height)/2)-b.y))):(b=a.getGraphBounds(),a.view.setTranslate(Math.floor(Math.max(0,Math.max(0,(a.container.clientWidth-b.width)/2)-b.x)),Math.floor(Math.max(0,Math.max(20,(a.container.clientHeight-
b.height)/4))-b.y)))};
-EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,f=mxUtils.hasScrollbars(b.container),d=0,l=0;f&&(d=b.view.translate.x*b.view.scale-b.container.scrollLeft,l=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();f&&(a=b.getSelectionCells(),b.clearSelection(),b.setSelectionCells(a));b.sizeDidChange();f&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-d,b.container.scrollTop=b.view.translate.y*
-b.view.scale-l);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,b,f,d){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=f;this.previousFormat=this.format=d;this.ignoreImage=this.ignoreColor=!1}
+EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,e=mxUtils.hasScrollbars(b.container),d=0,k=0;e&&(d=b.view.translate.x*b.view.scale-b.container.scrollLeft,k=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();e&&(a=b.getSelectionCells(),b.clearSelection(),b.setSelectionCells(a));b.sizeDidChange();e&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-d,b.container.scrollTop=b.view.translate.y*
+b.view.scale-k);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,b,e,d){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=e;this.previousFormat=this.format=d;this.ignoreImage=this.ignoreColor=!1}
ChangePageSetup.prototype.execute=function(){var a=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var b=a.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=b}this.ignoreImage||(this.image=this.previousImage,b=a.backgroundImage,this.ui.setBackgroundImage(this.previousImage),this.previousImage=b);null!=this.previousFormat&&(this.format=this.previousFormat,b=a.pageFormat,this.previousFormat.width!=b.width||this.previousFormat.height!=b.height)&&(this.ui.setPageFormat(this.previousFormat),
-this.previousFormat=b);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled)};(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.afterDecode=function(a,f,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);return d};mxCodecRegistry.register(a)})();
+this.previousFormat=b);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled)};(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.afterDecode=function(a,e,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);return d};mxCodecRegistry.register(a)})();
EditorUi.prototype.setBackgroundColor=function(a){this.editor.graph.background=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};EditorUi.prototype.setFoldingEnabled=function(a){this.editor.graph.foldingEnabled=a;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};
EditorUi.prototype.setPageFormat=function(a){this.editor.graph.pageFormat=a;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(a){this.editor.graph.pageScale=a;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(a){this.editor.graph.view.gridColor=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
-EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),f=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});f.addListener(mxEvent.ADD,d);f.addListener(mxEvent.UNDO,d);f.addListener(mxEvent.REDO,d);f.addListener(mxEvent.CLEAR,d);var l=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){l.apply(this,arguments);d()};var m=this.editor.graph.cellEditor.stopEditing;
+EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),e=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,d);e.addListener(mxEvent.UNDO,d);e.addListener(mxEvent.REDO,d);e.addListener(mxEvent.CLEAR,d);var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);d()};var m=this.editor.graph.cellEditor.stopEditing;
this.editor.graph.cellEditor.stopEditing=function(a,b){m.apply(this,arguments);d()};d()};
-EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),f=!1,d=!1,l=a.getSelectionCells();if(null!=l)for(var m=0;m<l.length;m++){var p=l[m];a.getModel().isEdge(p)&&(d=!0);a.getModel().isVertex(p)&&(f=!0);if(d&&f)break}l="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(m=
-0;m<l.length;m++)this.actions.get(l[m]).setEnabled(b);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("copySize").setEnabled(1==a.getSelectionCount());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(d);this.actions.get("rotation").setEnabled(f);this.actions.get("wordWrap").setEnabled(f);this.actions.get("autosize").setEnabled(f);d=f&&1==
+EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,d=!1,k=a.getSelectionCells();if(null!=k)for(var m=0;m<k.length;m++){var p=k[m];a.getModel().isEdge(p)&&(d=!0);a.getModel().isVertex(p)&&(e=!0);if(d&&e)break}k="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(m=
+0;m<k.length;m++)this.actions.get(k[m]).setEnabled(b);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("copySize").setEnabled(1==a.getSelectionCount());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(d);this.actions.get("rotation").setEnabled(e);this.actions.get("wordWrap").setEnabled(e);this.actions.get("autosize").setEnabled(e);d=e&&1==
a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||d&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(1==a.getSelectionCount()&&(0<a.getModel().getChildCount(a.getSelectionCell())||d&&a.isContainer(a.getSelectionCell())));this.actions.get("removeFromGroup").setEnabled(d&&a.getModel().isVertex(a.getModel().getParent(a.getSelectionCell())));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(b||null!=a.view.currentRoot);
-this.actions.get("collapsible").setEnabled(f&&(a.isContainer(a.getSelectionCell())||0<a.model.getChildCount(a.getSelectionCell())));this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==a.getSelectionCount()&&a.isValidRoot(a.getSelectionCell()));b=1==a.getSelectionCount()&&a.isCellFoldable(a.getSelectionCell());this.actions.get("expand").setEnabled(b);this.actions.get("collapse").setEnabled(b);
-this.actions.get("editLink").setEnabled(1==a.getSelectionCount());this.actions.get("openLink").setEnabled(1==a.getSelectionCount()&&null!=a.getLinkForCell(a.getSelectionCell()));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);b=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(b);this.menus.get("insert").setEnabled(b);this.menus.get("direction").setEnabled(b&&f);this.menus.get("align").setEnabled(b&&
-f&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(b&&f&&1<a.getSelectionCount());this.actions.get("selectVertices").setEnabled(b);this.actions.get("selectEdges").setEnabled(b);this.actions.get("selectAll").setEnabled(b);this.actions.get("selectNone").setEnabled(b);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
-EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),f=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(f=document.body.clientWidth||document.documentElement.clientWidth,d=b?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var l=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&
-(l=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var m=Math.max(0,Math.min(this.hsplitPosition,f-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&&!mxClient.IS_QUIRKS&&(p+=1);var u=0;if(null!=this.sidebarFooterContainer){var v=
-this.footerHeight+l,u=Math.max(0,Math.min(d-p-v,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=m+"px";this.sidebarFooterContainer.style.height=u+"px";this.sidebarFooterContainer.style.bottom=v+"px"}v=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=m+"px";this.formatContainer.style.top=p+"px";this.formatContainer.style.width=v+"px";this.formatContainer.style.display=null!=this.format?"":"none";var B=this.getDiagramContainerOffset(),
-c=null!=this.hsplit.parentNode?m+this.splitSize:0;this.diagramContainer.style.left=c+B.x+"px";this.diagramContainer.style.top=p+B.y+"px";this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+l+"px";this.hsplit.style.left=m+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=c+"px");b?(this.menubarContainer.style.width=f+"px",
-this.toolbarContainer.style.width=this.menubarContainer.style.width,b=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-u+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,f-m-this.splitSize-v)+"px":f+"px",this.footerContainer.style.width=this.menubarContainer.style.width,u=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=
-this.diagramContainer.style.width,this.tabContainer.style.bottom=this.footerHeight+l+"px",u-=this.tabContainer.clientHeight),this.diagramContainer.style.height=u+"px",this.hsplit.style.height=u+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=l+"px"),this.diagramContainer.style.right=v+"px",f=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+l+"px",this.tabContainer.style.right=this.diagramContainer.style.right,f=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=
-this.footerHeight+u+l+"px",this.formatContainer.style.bottom=this.footerHeight+l+"px",this.diagramContainer.style.bottom=this.footerHeight+l+f+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+this.actions.get("collapsible").setEnabled(e&&(a.isContainer(a.getSelectionCell())||0<a.model.getChildCount(a.getSelectionCell())));this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==a.getSelectionCount()&&a.isValidRoot(a.getSelectionCell()));b=1==a.getSelectionCount()&&a.isCellFoldable(a.getSelectionCell());this.actions.get("expand").setEnabled(b);this.actions.get("collapse").setEnabled(b);
+this.actions.get("editLink").setEnabled(1==a.getSelectionCount());this.actions.get("openLink").setEnabled(1==a.getSelectionCount()&&null!=a.getLinkForCell(a.getSelectionCell()));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);b=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(b);this.menus.get("insert").setEnabled(b);this.menus.get("direction").setEnabled(b&&e);this.menus.get("align").setEnabled(b&&
+e&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(b&&e&&1<a.getSelectionCount());this.actions.get("selectVertices").setEnabled(b);this.actions.get("selectEdges").setEnabled(b);this.actions.get("selectAll").setEnabled(b);this.actions.get("selectNone").setEnabled(b);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
+EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),e=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,d=b?document.body.clientHeight||document.documentElement.clientHeight: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 m=Math.max(0,Math.min(this.hsplitPosition,e-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&&!mxClient.IS_QUIRKS&&(p+=1);var u=0;if(null!=this.sidebarFooterContainer){var x=
+this.footerHeight+k,u=Math.max(0,Math.min(d-p-x,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=m+"px";this.sidebarFooterContainer.style.height=u+"px";this.sidebarFooterContainer.style.bottom=x+"px"}x=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=m+"px";this.formatContainer.style.top=p+"px";this.formatContainer.style.width=x+"px";this.formatContainer.style.display=null!=this.format?"":"none";var B=this.getDiagramContainerOffset(),
+c=null!=this.hsplit.parentNode?m+this.splitSize:0;this.diagramContainer.style.left=c+B.x+"px";this.diagramContainer.style.top=p+B.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=m+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=c+"px");b?(this.menubarContainer.style.width=e+"px",
+this.toolbarContainer.style.width=this.menubarContainer.style.width,b=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-u+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-m-this.splitSize-x)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,u=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=
+this.diagramContainer.style.width,this.tabContainer.style.bottom=this.footerHeight+k+"px",u-=this.tabContainer.clientHeight),this.diagramContainer.style.height=u+"px",this.hsplit.style.height=u+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=x+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=
+this.footerHeight+u+k+"px",this.formatContainer.style.bottom=this.footerHeight+k+"px",this.diagramContainer.style.bottom=this.footerHeight+k+e+"px");a&&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-2;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};
@@ -2198,82 +2200,82 @@ 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(a){this.hsplitPosition=a;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";420>screen.width&&(a.style.maxWidth=Math.max(20,screen.width-320)+"px",a.style.overflow="hidden");return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)};
EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b};
-EditorUi.prototype.addSplitHandler=function(a,b,f,d){function l(a){if(null!=p){var e=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,u+(b?e.x-p.x:p.y-e.y)-f));mxEvent.consume(a);u!=c()&&(v=!0,B=null)}}function m(a){l(a);p=u=null}var p=null,u=null,v=!0,B=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var c=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+f-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a),
-mxEvent.getClientY(a));u=c();v=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!v&&this.hsplitClickEnabled){var e=null!=B?B-f:0;B=c();d(e);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,l,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,l,m)})};
-EditorUi.prototype.handleError=function(a,b,f,d,l){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){l=mxUtils.htmlEntities(mxResources.get("unknownError"));var m=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(l=mxUtils.htmlEntities(a.message));this.showError(b,l,m,f,null,null,null,null,null,null,null,null,d?f:null)}else null!=f&&f()};
-EditorUi.prototype.showError=function(a,b,f,d,l,m,p,u,v,B,c,e,k){a=new ErrorDialog(this,a,b,f||mxResources.get("ok"),d,l,m,p,e,u,v);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,B||340,c||100+20*b,!0,!1,k);a.init()};EditorUi.prototype.showDialog=function(a,b,f,d,l,m,p,u,v,B){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,f,d,l,m,p,u,v,B);this.dialogs.push(this.dialog)};
-EditorUi.prototype.hideDialog=function(a,b){if(null!=this.dialogs&&0<this.dialogs.length){var f=this.dialogs.pop();0==f.close(a,b)?this.dialogs.push(f):(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.pickColor=function(a,b){var f=this.editor.graph,d=f.cellEditor.saveSelection(),l=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),m=new ColorDialog(this,a||"none",function(a){f.cellEditor.restoreSelection(d);b(a)},function(){f.cellEditor.restoreSelection(d)});this.showDialog(m.container,230,l,!0,!1);m.init()};
+EditorUi.prototype.addSplitHandler=function(a,b,e,d){function k(a){if(null!=p){var f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,u+(b?f.x-p.x:p.y-f.y)-e));mxEvent.consume(a);u!=c()&&(x=!0,B=null)}}function m(a){k(a);p=u=null}var p=null,u=null,x=!0,B=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var c=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a),
+mxEvent.getClientY(a));u=c();x=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!x&&this.hsplitClickEnabled){var b=null!=B?B-e:0;B=c();d(b);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,k,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,m)})};
+EditorUi.prototype.handleError=function(a,b,e,d,k){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){k=mxUtils.htmlEntities(mxResources.get("unknownError"));var m=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(k=mxUtils.htmlEntities(a.message));this.showError(b,k,m,e,null,null,null,null,null,null,null,null,d?e:null)}else null!=e&&e()};
+EditorUi.prototype.showError=function(a,b,e,d,k,m,p,u,x,B,c,f,g){a=new ErrorDialog(this,a,b,e||mxResources.get("ok"),d,k,m,p,f,u,x);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,B||340,c||100+20*b,!0,!1,g);a.init()};EditorUi.prototype.showDialog=function(a,b,e,d,k,m,p,u,x,B){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,k,m,p,u,x,B);this.dialogs.push(this.dialog)};
+EditorUi.prototype.hideDialog=function(a,b){if(null!=this.dialogs&&0<this.dialogs.length){var e=this.dialogs.pop();0==e.close(a,b)?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.pickColor=function(a,b){var e=this.editor.graph,d=e.cellEditor.saveSelection(),k=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),m=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(d);b(a)},function(){e.cellEditor.restoreSelection(d)});this.showDialog(m.container,230,k,!0,!1);m.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
-EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var f=a.indexOf("&lt;mxGraphModel ");if(0<=f){var d=a.lastIndexOf("&lt;/mxGraphModel&gt;");d>f&&(b=a.substring(f,d+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(l){}return b};
-EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,f=null;null!=a&&(a=null!=a.dataTransfer?a.dataTransfer:a.clipboardData,null!=a&&(10==document.documentMode||11==document.documentMode?f=a.getData("Text"):(f=0<=mxUtils.indexOf(a.types,"text/html")?a.getData("text/html"):null,mxUtils.indexOf(a.types,null==f||0==f.length)&&(f=a.getData("text/plain"))),null!=f&&(f=Graph.zapGremlins(mxUtils.trim(f)),a=this.extractGraphModelFromHtml(f),null!=a&&(f=a))));null!=f&&this.isCompatibleString(f)&&
-(b=f);return b};EditorUi.prototype.isCompatibleString=function(a){return!1};EditorUi.prototype.saveFile=function(a){a||null==this.editor.filename?(a=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(a){this.save(a)}),null,mxUtils.bind(this,function(a){if(null!=a&&0<a.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(a.container,300,100,!0,!0),a.init()):this.save(this.editor.getOrCreateFilename())};
+EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var e=a.indexOf("&lt;mxGraphModel ");if(0<=e){var d=a.lastIndexOf("&lt;/mxGraphModel&gt;");d>e&&(b=a.substring(e,d+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(k){}return b};
+EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,e=null;null!=a&&(a=null!=a.dataTransfer?a.dataTransfer:a.clipboardData,null!=a&&(10==document.documentMode||11==document.documentMode?e=a.getData("Text"):(e=0<=mxUtils.indexOf(a.types,"text/html")?a.getData("text/html"):null,mxUtils.indexOf(a.types,null==e||0==e.length)&&(e=a.getData("text/plain"))),null!=e&&(e=Graph.zapGremlins(mxUtils.trim(e)),a=this.extractGraphModelFromHtml(e),null!=a&&(e=a))));null!=e&&this.isCompatibleString(e)&&
+(b=e);return b};EditorUi.prototype.isCompatibleString=function(a){return!1};EditorUi.prototype.saveFile=function(a){a||null==this.editor.filename?(a=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(a){this.save(a)}),null,mxUtils.bind(this,function(a){if(null!=a&&0<a.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(a.container,300,100,!0,!0),a.init()):this.save(this.editor.getOrCreateFilename())};
EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,b);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(b.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(b))).simulate(document,
-"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(b);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(f){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
-EditorUi.prototype.executeLayout=function(a,b,f){var d=this.editor.graph;if(d.isEnabled()){d.getModel().beginUpdate();try{a()}catch(l){throw l;}finally{this.allowAnimation&&b&&0>navigator.userAgent.indexOf("Camino")?(a=new mxMorphing(d),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){d.getModel().endUpdate();null!=f&&f()})),a.startAnimation()):(d.getModel().endUpdate(),null!=f&&f())}}};
-EditorUi.prototype.showImageDialog=function(a,b,f,d){d=this.editor.graph.cellEditor;var l=d.saveSelection(),m=mxUtils.prompt(a,b);d.restoreSelection(l);if(null!=m&&0<m.length){var p=new Image;p.onload=function(){f(m,p.width,p.height)};p.onerror=function(){f(null);mxUtils.alert(mxResources.get("fileNotFound"))};p.src=m}else f(null)};EditorUi.prototype.showLinkDialog=function(a,b,f){a=new LinkDialog(this,a,b,f);this.showDialog(a.container,420,90,!0,!0);a.init()};
+"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(b);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(e){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
+EditorUi.prototype.executeLayout=function(a,b,e){var d=this.editor.graph;if(d.isEnabled()){d.getModel().beginUpdate();try{a()}catch(k){throw k;}finally{this.allowAnimation&&b&&0>navigator.userAgent.indexOf("Camino")?(a=new mxMorphing(d),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){d.getModel().endUpdate();null!=e&&e()})),a.startAnimation()):(d.getModel().endUpdate(),null!=e&&e())}}};
+EditorUi.prototype.showImageDialog=function(a,b,e,d){d=this.editor.graph.cellEditor;var k=d.saveSelection(),m=mxUtils.prompt(a,b);d.restoreSelection(k);if(null!=m&&0<m.length){var p=new Image;p.onload=function(){e(m,p.width,p.height)};p.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};p.src=m}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);this.showDialog(a.container,420,90,!0,!0);a.init()};
EditorUi.prototype.showDataDialog=function(a){null!=a&&(a=new EditDataDialog(this,a),this.showDialog(a.container,480,420,!0,!1,null,!1),a.init())};
-EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var b=mxUtils.prompt(mxResources.get("backgroundImage"),"");if(null!=b&&0<b.length){var f=new Image;f.onload=function(){a(new mxImage(b,f.width,f.height))};f.onerror=function(){a(null);mxUtils.alert(mxResources.get("fileNotFound"))};f.src=b}else a(null)};
-EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,f){mxUtils.confirm(a)?null!=b&&b():null!=f&&f()};
+EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var b=mxUtils.prompt(mxResources.get("backgroundImage"),"");if(null!=b&&0<b.length){var e=new Image;e.onload=function(){a(new mxImage(b,e.width,e.height))};e.onerror=function(){a(null);mxUtils.alert(mxResources.get("fileNotFound"))};e.src=b}else a(null)};
+EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,e){mxUtils.confirm(a)?null!=b&&b():null!=e&&e()};
EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);b.border=20;mxEvent.addListener(window,"resize",function(){b.update()});this.addListener("pageFormatChanged",function(){b.update()});return b};EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize"};
-EditorUi.prototype.createKeyHandler=function(a){function b(a,c,b){p.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(c=null!=c?c:1,b){d.getModel().beginUpdate();try{for(var e=d.getSelectionCells(),k=0;k<e.length;k++)if(d.getModel().isVertex(e[k])&&d.isCellResizable(e[k])){var f=d.getCellGeometry(e[k]);null!=f&&(f=f.clone(),37==a?f.width=Math.max(0,f.width-c):38==a?f.height=Math.max(0,f.height-c):39==a?f.width+=c:40==a&&(f.height+=c),d.getModel().setGeometry(e[k],f))}}finally{d.getModel().endUpdate()}}else e=
-d.getSelectionCell(),k=d.model.getParent(e),f=null,1==d.getSelectionCount()&&d.model.isVertex(e)&&null!=d.layoutManager&&!d.isCellLocked(e)&&(f=d.layoutManager.getLayout(k)),null!=f&&f.constructor==mxStackLayout?(f=k.getIndex(e),37==a||38==a?d.model.add(k,e,Math.max(0,f-1)):39!=a&&40!=a||d.model.add(k,e,Math.min(d.model.getChildCount(k),f+1))):(k=e=0,37==a?e=-c:38==a?k=-c:39==a?e=c:40==a&&(k=c),d.moveCells(d.getMovableCells(d.getSelectionCells()),e,k))});null!=u&&window.clearTimeout(u);u=window.setTimeout(function(){if(0<
-p.length){d.getModel().beginUpdate();try{for(var a=0;a<p.length;a++)p[a]();p=[]}finally{d.getModel().endUpdate()}d.scrollCellToVisible(d.getSelectionCell())}},200)}var f=this,d=this.editor.graph,l=new mxKeyHandler(d),m=l.isEventIgnored;l.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&
-!mxClient.IS_SF)&&m.apply(this,arguments)};l.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==f.dialogs||0==f.dialogs.length)};l.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var p=[],u=null,v={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},B=l.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&&
-mxEvent.isAltDown(a)){var c=f.actions.get(f.altShiftActions[a.keyCode]);if(null!=c)return c.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){d.selectParentCell()}:function(){d.selectChildCell()};if(null!=v[a.keyCode]&&!d.isSelectionEmpty())if(!this.isControlDown(a)&&mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(d.model.isVertex(d.getSelectionCell()))return function(){var c=d.connectVertex(d.getSelectionCell(),v[a.keyCode],d.defaultEdgeLength,a,!0);null!=c&&0<
-c.length&&(1==c.length&&d.model.isEdge(c[0])?d.setSelectionCell(d.model.getTerminal(c[0],!1)):d.setSelectionCell(c[c.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=f.hoverIcons&&f.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return B.apply(this,arguments)};l.bindAction=mxUtils.bind(this,function(a,c,b,d){var e=
-this.actions.get(b);null!=e&&(b=function(){e.isEnabled()&&e.funct()},c?d?l.bindControlShiftKey(a,b):l.bindControlKey(a,b):d?l.bindShiftKey(a,b):l.bindKey(a,b))});var c=l.escape;l.escape=function(a){c.apply(this,arguments)};l.enter=function(){};l.bindControlShiftKey(36,function(){d.exitGroup()});l.bindControlShiftKey(35,function(){d.enterGroup()});l.bindKey(36,function(){d.home()});l.bindKey(35,function(){d.refresh()});l.bindAction(107,!0,"zoomIn");l.bindAction(109,!0,"zoomOut");l.bindAction(80,!0,
-"print");l.bindAction(79,!0,"outline",!0);l.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)l.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),l.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),l.bindControlKey(13,function(){d.isEnabled()&&d.setSelectionCells(d.duplicateCells(d.getSelectionCells(),!1))}),l.bindAction(8,!1,"delete"),l.bindAction(8,!0,"deleteAll"),l.bindAction(46,!1,"delete"),l.bindAction(46,!0,"deleteAll"),l.bindAction(72,!0,"resetView"),
-l.bindAction(72,!0,"fitWindow",!0),l.bindAction(74,!0,"fitPage"),l.bindAction(74,!0,"fitTwoPages",!0),l.bindAction(48,!0,"customZoom"),l.bindAction(82,!0,"turn"),l.bindAction(82,!0,"clearDefaultStyle",!0),l.bindAction(83,!0,"save"),l.bindAction(83,!0,"saveAs",!0),l.bindAction(65,!0,"selectAll"),l.bindAction(65,!0,"selectNone",!0),l.bindAction(73,!0,"selectVertices",!0),l.bindAction(69,!0,"selectEdges",!0),l.bindAction(69,!0,"editStyle"),l.bindAction(66,!0,"bold"),l.bindAction(66,!0,"toBack",!0),l.bindAction(70,
-!0,"toFront",!0),l.bindAction(68,!0,"duplicate"),l.bindAction(68,!0,"setAsDefaultStyle",!0),l.bindAction(90,!0,"undo"),l.bindAction(89,!0,"autosize",!0),l.bindAction(88,!0,"cut"),l.bindAction(67,!0,"copy"),l.bindAction(86,!0,"paste"),l.bindAction(71,!0,"group"),l.bindAction(77,!0,"editData"),l.bindAction(71,!0,"grid",!0),l.bindAction(73,!0,"italic"),l.bindAction(76,!0,"lockUnlock"),l.bindAction(76,!0,"layers",!0),l.bindAction(80,!0,"formatPanel",!0),l.bindAction(85,!0,"underline"),l.bindAction(85,
-!0,"ungroup",!0),l.bindAction(190,!0,"superscript"),l.bindAction(188,!0,"subscript"),l.bindKey(13,function(){d.isEnabled()&&d.startEditingAtCell()}),l.bindKey(113,function(){d.isEnabled()&&d.startEditingAtCell()});mxClient.IS_WIN?l.bindAction(89,!0,"redo"):l.bindAction(90,!0,"redo",!0);return l};
+EditorUi.prototype.createKeyHandler=function(a){function b(a,c,b){p.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(c=null!=c?c:1,b){d.getModel().beginUpdate();try{for(var f=d.getSelectionCells(),g=0;g<f.length;g++)if(d.getModel().isVertex(f[g])&&d.isCellResizable(f[g])){var e=d.getCellGeometry(f[g]);null!=e&&(e=e.clone(),37==a?e.width=Math.max(0,e.width-c):38==a?e.height=Math.max(0,e.height-c):39==a?e.width+=c:40==a&&(e.height+=c),d.getModel().setGeometry(f[g],e))}}finally{d.getModel().endUpdate()}}else f=
+d.getSelectionCell(),g=d.model.getParent(f),e=null,1==d.getSelectionCount()&&d.model.isVertex(f)&&null!=d.layoutManager&&!d.isCellLocked(f)&&(e=d.layoutManager.getLayout(g)),null!=e&&e.constructor==mxStackLayout?(e=g.getIndex(f),37==a||38==a?d.model.add(g,f,Math.max(0,e-1)):39!=a&&40!=a||d.model.add(g,f,Math.min(d.model.getChildCount(g),e+1))):(g=f=0,37==a?f=-c:38==a?g=-c:39==a?f=c:40==a&&(g=c),d.moveCells(d.getMovableCells(d.getSelectionCells()),f,g))});null!=u&&window.clearTimeout(u);u=window.setTimeout(function(){if(0<
+p.length){d.getModel().beginUpdate();try{for(var a=0;a<p.length;a++)p[a]();p=[]}finally{d.getModel().endUpdate()}d.scrollCellToVisible(d.getSelectionCell())}},200)}var e=this,d=this.editor.graph,k=new mxKeyHandler(d),m=k.isEventIgnored;k.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&
+!mxClient.IS_SF)&&m.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var p=[],u=null,x={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},B=k.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&&
+mxEvent.isAltDown(a)){var c=e.actions.get(e.altShiftActions[a.keyCode]);if(null!=c)return c.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){d.selectParentCell()}:function(){d.selectChildCell()};if(null!=x[a.keyCode]&&!d.isSelectionEmpty())if(!this.isControlDown(a)&&mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(d.model.isVertex(d.getSelectionCell()))return function(){var c=d.connectVertex(d.getSelectionCell(),x[a.keyCode],d.defaultEdgeLength,a,!0);null!=c&&0<
+c.length&&(1==c.length&&d.model.isEdge(c[0])?d.setSelectionCell(d.model.getTerminal(c[0],!1)):d.setSelectionCell(c[c.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return B.apply(this,arguments)};k.bindAction=mxUtils.bind(this,function(a,c,b,f){var d=
+this.actions.get(b);null!=d&&(b=function(){d.isEnabled()&&d.funct()},c?f?k.bindControlShiftKey(a,b):k.bindControlKey(a,b):f?k.bindShiftKey(a,b):k.bindKey(a,b))});var c=this,f=k.escape;k.escape=function(a){f.apply(this,arguments)};k.enter=function(){};k.bindControlShiftKey(36,function(){d.exitGroup()});k.bindControlShiftKey(35,function(){d.enterGroup()});k.bindKey(36,function(){d.home()});k.bindKey(35,function(){d.refresh()});k.bindAction(107,!0,"zoomIn");k.bindAction(109,!0,"zoomOut");k.bindAction(80,
+!0,"print");k.bindAction(79,!0,"outline",!0);k.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)k.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),k.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),k.bindControlKey(13,function(){if(d.isEnabled())try{d.setSelectionCells(d.duplicateCells(d.getSelectionCells(),!1))}catch(g){c.handleError(g)}}),k.bindAction(8,!1,"delete"),k.bindAction(8,!0,"deleteAll"),k.bindAction(46,!1,"delete"),k.bindAction(46,!0,
+"deleteAll"),k.bindAction(72,!0,"resetView"),k.bindAction(72,!0,"fitWindow",!0),k.bindAction(74,!0,"fitPage"),k.bindAction(74,!0,"fitTwoPages",!0),k.bindAction(48,!0,"customZoom"),k.bindAction(82,!0,"turn"),k.bindAction(82,!0,"clearDefaultStyle",!0),k.bindAction(83,!0,"save"),k.bindAction(83,!0,"saveAs",!0),k.bindAction(65,!0,"selectAll"),k.bindAction(65,!0,"selectNone",!0),k.bindAction(73,!0,"selectVertices",!0),k.bindAction(69,!0,"selectEdges",!0),k.bindAction(69,!0,"editStyle"),k.bindAction(66,
+!0,"bold"),k.bindAction(66,!0,"toBack",!0),k.bindAction(70,!0,"toFront",!0),k.bindAction(68,!0,"duplicate"),k.bindAction(68,!0,"setAsDefaultStyle",!0),k.bindAction(90,!0,"undo"),k.bindAction(89,!0,"autosize",!0),k.bindAction(88,!0,"cut"),k.bindAction(67,!0,"copy"),k.bindAction(86,!0,"paste"),k.bindAction(71,!0,"group"),k.bindAction(77,!0,"editData"),k.bindAction(71,!0,"grid",!0),k.bindAction(73,!0,"italic"),k.bindAction(76,!0,"lockUnlock"),k.bindAction(76,!0,"layers",!0),k.bindAction(80,!0,"formatPanel",
+!0),k.bindAction(85,!0,"underline"),k.bindAction(85,!0,"ungroup",!0),k.bindAction(190,!0,"superscript"),k.bindAction(188,!0,"subscript"),k.bindKey(13,function(){d.isEnabled()&&d.startEditingAtCell()}),k.bindKey(113,function(){d.isEnabled()&&d.startEditingAtCell()});mxClient.IS_WIN?k.bindAction(89,!0,"redo"):k.bindAction(90,!0,"redo",!0);return k};
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 a=0;a<this.destroyFunctions.length;a++)this.destroyFunctions[a]();this.destroyFunctions=null}for(var b=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog],a=0;a<b.length;a++)null!=b[a]&&null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a])};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(f){for(var d=0;d<a.length;d++)f=f.replace(new RegExp("&"+a[d][0]+";","g"),"&#"+a[d][1]+";");return b(f)}})();
+"scroll",this.scrollHandler),this.scrollHandler=null);if(null!=this.destroyFunctions){for(var a=0;a<this.destroyFunctions.length;a++)this.destroyFunctions[a]();this.destroyFunctions=null}for(var b=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog],a=0;a<b.length;a++)null!=b[a]&&null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a])};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(e){for(var d=0;d<a.length;d++)e=e.replace(new RegExp("&"+a[d][0]+";","g"),"&#"+a[d][1]+";");return b(e)}})();
Date.prototype.toISOString||function(){function a(a){a=String(a);1===a.length&&(a="0"+a);return a}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});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 a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(b){}})();
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.gridColor=mxGraphView.prototype.defaultGridColor;
-mxGraphView.prototype.unit=mxConstants.POINTS;mxGraphView.prototype.setUnit=function(a){this.unit!=a&&(this.unit=a,this.fireEvent(new mxEventObject("unitChanged","unit",a)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a,b,f){return null};
-Graph=function(a,b,f,d,l,m){mxGraph.call(this,a,b,f,d);this.themes=l||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=m?m:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){var c=this.view.getState(a);a=
-null!=c?c.style:this.getCellStyle(a);return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var p=null,u=null,v=null,B=null,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,e){if("mouseDown"==e.getProperty("eventName")&&this.isEnabled()){var b=e.getProperty("event");if(!mxEvent.isControlDown(b.getEvent())&&!mxEvent.isShiftDown(b.getEvent())){var d=b.getState();null!=d&&this.model.isEdge(d.cell)&&(p=new mxPoint(b.getGraphX(),b.getGraphY()),
-c=this.isCellSelected(d.cell),v=d,u=b,null!=d.text&&null!=d.text.boundingBox&&mxUtils.contains(d.text.boundingBox,b.getGraphX(),b.getGraphY())?B=mxEvent.LABEL_HANDLE:(d=this.selectionCellsHandler.getHandler(d.cell),null!=d&&null!=d.bends&&0<d.bends.length&&(B=d.getHandleForEvent(b))))}}}));this.addMouseListener({mouseDown:function(a,c){},mouseMove:mxUtils.bind(this,function(a,b){var e=this.selectionCellsHandler.handlers.map,d;for(d in e)if(null!=e[d].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&
-!mxEvent.isControlDown(b.getEvent())&&!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(d=this.tolerance,null!=p&&null!=v&&null!=u){if(e=v,Math.abs(p.x-b.getGraphX())>d||Math.abs(p.y-b.getGraphY())>d){this.isCellSelected(e.cell)||this.setSelectionCell(e.cell);var k=this.selectionCellsHandler.getHandler(e.cell);if(null!=k&&null!=k.bends&&0<k.bends.length){var g=k.getHandleForEvent(u),f=this.view.getEdgeStyle(e);d=f==mxEdgeStyle.EntityRelation;c||B!=mxEvent.LABEL_HANDLE||(g=B);
-if(d&&0!=g&&g!=k.bends.length-1&&g!=mxEvent.LABEL_HANDLE)!d||null==e.visibleSourceState&&null==e.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(g==mxEvent.LABEL_HANDLE||0==g||null!=e.visibleSourceState||g==k.bends.length-1||null!=e.visibleTargetState)d||g==mxEvent.LABEL_HANDLE||(d=e.absolutePoints,null!=d&&(null==f&&null==g||f==mxEdgeStyle.OrthConnector)&&(g=B,null==g&&(g=new mxRectangle(p.x,p.y),g.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(g,d[0].x,d[0].y)?
-g=0:mxUtils.contains(g,d[d.length-1].x,d[d.length-1].y)?g=k.bends.length-1:null!=f&&(2==d.length||3==d.length&&(0==Math.round(d[0].x-d[1].x)&&0==Math.round(d[1].x-d[2].x)||0==Math.round(d[0].y-d[1].y)&&0==Math.round(d[1].y-d[2].y)))?g=2:(g=mxUtils.findNearestSegment(e,p.x,p.y),g=null==f?mxEvent.VIRTUAL_HANDLE-g:g+1))),null==g&&(g=mxEvent.VIRTUAL_HANDLE)),k.start(b.getGraphX(),b.getGraphX(),g),B=p=u=v=null,c=!1,b.consume(),this.graphHandler.reset()}}}else if(e=b.getState(),null!=e&&this.model.isEdge(e.cell)){k=
-null;d=e.absolutePoints;if(null!=d)if(g=new mxRectangle(b.getGraphX(),b.getGraphY()),g.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=e.text&&null!=e.text.boundingBox&&mxUtils.contains(e.text.boundingBox,b.getGraphX(),b.getGraphY()))k="move";else if(mxUtils.contains(g,d[0].x,d[0].y)||mxUtils.contains(g,d[d.length-1].x,d[d.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,b.getGraphX(),b.getGraphY()),f<d.length-1&&0<=f&&(k=0==Math.round(d[f].x-d[f+1].x)?"col-resize":"row-resize"));null!=k&&e.setCursor(k)}}),mouseUp:mxUtils.bind(this,function(a,c){B=p=u=v=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);
-this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,c){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var e=this.graphHandler.getGuideStates;
-this.graphHandler.getGuideStates=function(){var a=e.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],b=this.graph.pageFormat,d=this.graph.pageScale,k=b.width*d,b=b.height*d,d=this.graph.view.translate,g=this.graph.view.scale,f=this.graph.getPageLayout(),n=0;n<f.width;n++)c.push(new mxRectangle(((f.x+n)*k+d.x)*g,(f.y*b+d.y)*g,k*g,b*g));for(n=0;n<f.height;n++)c.push(new mxRectangle((f.x*k+d.x)*g,((f.y+n)*b+d.y)*g,k*g,b*g));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=
-mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var c=mxGraphHandler.prototype.getCells.apply(this,arguments),e=[],b=0;b<c.length;b++){var d=this.graph.view.getState(c[b]),
-d=null!=d?d.style:this.graph.getCellStyle(c[b]);"1"==mxUtils.getValue(d,"part","0")?(d=this.graph.model.getParent(c[b]),this.graph.model.isVertex(d)&&0>mxUtils.indexOf(c,d)&&e.push(d)):e.push(c[b])}return e};this.connectionHandler.createTargetVertex=function(a,c){var b=this.graph.view.getState(c),b=null!=b?b.style:this.graph.getCellStyle(c);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(c),this.graph.model.isVertex(b)&&(c=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,
-arguments)};var k=new mxRubberband(this);this.getRubberband=function(){return k};var q=(new Date).getTime(),n=0,g=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;g.apply(this,arguments);a!=this.currentState?(q=(new Date).getTime(),n=0):n=(new Date).getTime()-q};var x=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<n||(null==
-this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&x.apply(this,arguments)};var A=this.isToggleEvent;this.isToggleEvent=function(a){return A.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var t=k.isForceRubberbandEvent;k.isForceRubberbandEvent=function(a){return t.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&
-mxEvent.isTouchEvent(a.getEvent())};var F=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(F=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=F)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var y=this.click;this.click=
-function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!c||a.isConsumed())return y.apply(this,arguments);var b=c?a.sourceState.cell:a.getCell();null!=b&&(b=this.getLinkForCell(b),null!=b&&(this.isCustomLink(b)?this.customLinkClicked(b):this.openLink(b)));this.isEnabled()&&c&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var c=null==a.state&&null!=a.sourceState&&
-this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(c?a.sourceState.cell:a.getCell())};var E=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return E.apply(this,arguments)};this.selectRegion=function(a,c){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,c);return b};this.getAllCells=function(a,c,b,e,d,k){k=null!=k?k:[];
-if(0<b||0<e){var g=this.getModel(),f=a+b,n=c+e;null==d&&(d=this.getCurrentRoot(),null==d&&(d=g.getRoot()));if(null!=d)for(var q=g.getChildCount(d),z=0;z<q;z++){var t=g.getChildAt(d,z),x=this.view.getState(t);if(null!=x&&this.isCellVisible(t)&&"1"!=mxUtils.getValue(x.style,"locked","0")){var Q=mxUtils.getValue(x.style,mxConstants.STYLE_ROTATION)||0;0!=Q&&(x=mxUtils.getBoundingBox(x,Q));(g.isEdge(t)||g.isVertex(t))&&x.x>=a&&x.y+x.height<=n&&x.y>=c&&x.x+x.width<=f&&k.push(t);this.getAllCells(a,c,b,e,
-t,k)}}}return k};var D=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)?!1:D.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var z=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var b=
-c.getProperty("event").getState();z=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var b=c.getProperty("event"),e=c.getProperty("cell");null==e?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),k.start(b.x,b.y)):null!=z?this.addSelectionCells(z):1<this.getSelectionCount()&&this.isCellSelected(e)&&this.removeSelectionCell(e);
-z=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){return c&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&
-this.initTouch();var L=this.updateMouseEvent;this.updateMouseEvent=function(a){a=L.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
+mxGraphView.prototype.unit=mxConstants.POINTS;mxGraphView.prototype.setUnit=function(a){this.unit!=a&&(this.unit=a,this.fireEvent(new mxEventObject("unitChanged","unit",a)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a,b,e){return null};
+Graph=function(a,b,e,d,k,m){mxGraph.call(this,a,b,e,d);this.themes=k||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=m?m:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){var c=this.view.getState(a);a=
+null!=c?c.style:this.getCellStyle(a);return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var p=null,u=null,x=null,B=null,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var f=b.getProperty("event");if(!mxEvent.isControlDown(f.getEvent())&&!mxEvent.isShiftDown(f.getEvent())){var d=f.getState();null!=d&&this.model.isEdge(d.cell)&&(p=new mxPoint(f.getGraphX(),f.getGraphY()),
+c=this.isCellSelected(d.cell),x=d,u=f,null!=d.text&&null!=d.text.boundingBox&&mxUtils.contains(d.text.boundingBox,f.getGraphX(),f.getGraphY())?B=mxEvent.LABEL_HANDLE:(d=this.selectionCellsHandler.getHandler(d.cell),null!=d&&null!=d.bends&&0<d.bends.length&&(B=d.getHandleForEvent(f))))}}}));this.addMouseListener({mouseDown:function(a,c){},mouseMove:mxUtils.bind(this,function(a,b){var f=this.selectionCellsHandler.handlers.map,d;for(d in f)if(null!=f[d].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&
+!mxEvent.isControlDown(b.getEvent())&&!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(d=this.tolerance,null!=p&&null!=x&&null!=u){if(f=x,Math.abs(p.x-b.getGraphX())>d||Math.abs(p.y-b.getGraphY())>d){this.isCellSelected(f.cell)||this.setSelectionCell(f.cell);var g=this.selectionCellsHandler.getHandler(f.cell);if(null!=g&&null!=g.bends&&0<g.bends.length){var e=g.getHandleForEvent(u),l=this.view.getEdgeStyle(f);d=l==mxEdgeStyle.EntityRelation;c||B!=mxEvent.LABEL_HANDLE||(e=B);
+if(d&&0!=e&&e!=g.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!d||null==f.visibleSourceState&&null==f.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=f.visibleSourceState||e==g.bends.length-1||null!=f.visibleTargetState)d||e==mxEvent.LABEL_HANDLE||(d=f.absolutePoints,null!=d&&(null==l&&null==e||l==mxEdgeStyle.OrthConnector)&&(e=B,null==e&&(e=new mxRectangle(p.x,p.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,d[0].x,d[0].y)?
+e=0:mxUtils.contains(e,d[d.length-1].x,d[d.length-1].y)?e=g.bends.length-1:null!=l&&(2==d.length||3==d.length&&(0==Math.round(d[0].x-d[1].x)&&0==Math.round(d[1].x-d[2].x)||0==Math.round(d[0].y-d[1].y)&&0==Math.round(d[1].y-d[2].y)))?e=2:(e=mxUtils.findNearestSegment(f,p.x,p.y),e=null==l?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),g.start(b.getGraphX(),b.getGraphX(),e),B=p=u=x=null,c=!1,b.consume(),this.graphHandler.reset()}}}else if(f=b.getState(),null!=f&&this.model.isEdge(f.cell)){g=
+null;d=f.absolutePoints;if(null!=d)if(e=new mxRectangle(b.getGraphX(),b.getGraphY()),e.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,b.getGraphX(),b.getGraphY()))g="move";else if(mxUtils.contains(e,d[0].x,d[0].y)||mxUtils.contains(e,d[d.length-1].x,d[d.length-1].y))g="pointer";else if(null!=f.visibleSourceState||null!=f.visibleTargetState)l=this.view.getEdgeStyle(f),g="crosshair",l!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(f)&&
+(l=mxUtils.findNearestSegment(f,b.getGraphX(),b.getGraphY()),l<d.length-1&&0<=l&&(g=0==Math.round(d[l].x-d[l+1].x)?"col-resize":"row-resize"));null!=g&&f.setCursor(g)}}),mouseUp:mxUtils.bind(this,function(a,c){B=p=u=x=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);
+this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,c){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var f=this.graphHandler.getGuideStates;
+this.graphHandler.getGuideStates=function(){var a=f.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],b=this.graph.pageFormat,d=this.graph.pageScale,g=b.width*d,b=b.height*d,d=this.graph.view.translate,e=this.graph.view.scale,l=this.graph.getPageLayout(),n=0;n<l.width;n++)c.push(new mxRectangle(((l.x+n)*g+d.x)*e,(l.y*b+d.y)*e,g*e,b*e));for(n=0;n<l.height;n++)c.push(new mxRectangle((l.x*g+d.x)*e,((l.y+n)*b+d.y)*e,g*e,b*e));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=
+mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var c=mxGraphHandler.prototype.getCells.apply(this,arguments),b=[],f=0;f<c.length;f++){var d=this.graph.view.getState(c[f]),
+d=null!=d?d.style:this.graph.getCellStyle(c[f]);"1"==mxUtils.getValue(d,"part","0")?(d=this.graph.model.getParent(c[f]),this.graph.model.isVertex(d)&&0>mxUtils.indexOf(c,d)&&b.push(d)):b.push(c[f])}return b};this.connectionHandler.createTargetVertex=function(a,c){var b=this.graph.view.getState(c),b=null!=b?b.style:this.graph.getCellStyle(c);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(c),this.graph.model.isVertex(b)&&(c=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,
+arguments)};var g=new mxRubberband(this);this.getRubberband=function(){return g};var t=(new Date).getTime(),n=0,l=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;l.apply(this,arguments);a!=this.currentState?(t=(new Date).getTime(),n=0):n=(new Date).getTime()-t};var y=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<n||(null==
+this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&y.apply(this,arguments)};var A=this.isToggleEvent;this.isToggleEvent=function(a){return A.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var q=g.isForceRubberbandEvent;g.isForceRubberbandEvent=function(a){return q.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&
+mxEvent.isTouchEvent(a.getEvent())};var E=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(E=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=E)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var z=this.click;this.click=
+function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!c||a.isConsumed())return z.apply(this,arguments);var b=c?a.sourceState.cell:a.getCell();null!=b&&(b=this.getLinkForCell(b),null!=b&&(this.isCustomLink(b)?this.customLinkClicked(b):this.openLink(b)));this.isEnabled()&&c&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var c=null==a.state&&null!=a.sourceState&&
+this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(c?a.sourceState.cell:a.getCell())};var G=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return G.apply(this,arguments)};this.selectRegion=function(a,c){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,c);return b};this.getAllCells=function(a,c,b,f,d,g){g=null!=g?g:[];
+if(0<b||0<f){var e=this.getModel(),l=a+b,n=c+f;null==d&&(d=this.getCurrentRoot(),null==d&&(d=e.getRoot()));if(null!=d)for(var v=e.getChildCount(d),t=0;t<v;t++){var q=e.getChildAt(d,t),y=this.view.getState(q);if(null!=y&&this.isCellVisible(q)&&"1"!=mxUtils.getValue(y.style,"locked","0")){var Z=mxUtils.getValue(y.style,mxConstants.STYLE_ROTATION)||0;0!=Z&&(y=mxUtils.getBoundingBox(y,Z));(e.isEdge(q)||e.isVertex(q))&&y.x>=a&&y.y+y.height<=n&&y.y>=c&&y.x+y.width<=l&&g.push(q);this.getAllCells(a,c,b,f,
+q,g)}}}return g};var D=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)?!1:D.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var v=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var b=
+c.getProperty("event").getState();v=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var b=c.getProperty("event"),f=c.getProperty("cell");null==f?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),g.start(b.x,b.y)):null!=v?this.addSelectionCells(v):1<this.getSelectionCount()&&this.isCellSelected(f)&&this.removeSelectionCell(f);
+v=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){return c&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&
+this.initTouch();var H=this.updateMouseEvent;this.updateMouseEvent=function(a){a=H.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;
-Graph.createSvgImage=function(a,b,f){f=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" version="1.1">'+f+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(f):Base64.encode(f,!0)),a,b)};
-Graph.zapGremlins=function(a){for(var b=[],f=0;f<a.length;f++){var d=a.charCodeAt(f);(32<=d||9==d||10==d||13==d)&&65535!=d&&65534!=d&&b.push(a.charAt(f))}return b.join("")};Graph.stringToBytes=function(a){for(var b=Array(a.length),f=0;f<a.length;f++)b[f]=a.charCodeAt(f);return b};Graph.bytesToString=function(a){for(var b=Array(a.length),f=0;f<a.length;f++)b[f]=String.fromCharCode(a[f]);return b.join("")};Graph.compressNode=function(a){return Graph.compress(Graph.zapGremlins(mxUtils.getXml(a)))};
-Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;var f=b?pako.deflate(encodeURIComponent(a),{to:"string"}):pako.deflateRaw(encodeURIComponent(a),{to:"string"});return window.btoa?btoa(f):Base64.encode(f,!0)};Graph.decompress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;var f=window.atob?atob(a):Base64.decode(a,!0),f=b?pako.inflate(f,{to:"string"}):pako.inflateRaw(f,{to:"string"});return Graph.zapGremlins(decodeURIComponent(f))};
+Graph.createSvgImage=function(a,b,e){e=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),a,b)};
+Graph.zapGremlins=function(a){for(var b=[],e=0;e<a.length;e++){var d=a.charCodeAt(e);(32<=d||9==d||10==d||13==d)&&65535!=d&&65534!=d&&b.push(a.charAt(e))}return b.join("")};Graph.stringToBytes=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=a.charCodeAt(e);return b};Graph.bytesToString=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=String.fromCharCode(a[e]);return b.join("")};Graph.compressNode=function(a){return Graph.compress(Graph.zapGremlins(mxUtils.getXml(a)))};
+Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;var e=b?pako.deflate(encodeURIComponent(a),{to:"string"}):pako.deflateRaw(encodeURIComponent(a),{to:"string"});return window.btoa?btoa(e):Base64.encode(e,!0)};Graph.decompress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;var e=window.atob?atob(a):Base64.decode(a,!0),e=b?pako.inflate(e,{to:"string"}):pako.inflateRaw(e,{to:"string"});return Graph.zapGremlins(decodeURIComponent(e))};
mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";
Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";
Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;
-Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,f){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,l=!0,m=null,p=mxUtils.bind(this,function(a){l=!0;m=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),u=mxUtils.bind(this,function(a){l=l&&null!=m&&Math.abs(m.x-mxEvent.getClientX(a))<b&&Math.abs(m.y-mxEvent.getClientY(a))<b}),v=mxUtils.bind(this,function(b){if(l)for(var c=mxEvent.getSource(b);null!=
-c&&c!=f.node;){if("a"==c.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,c,b);break}c=c.parentNode}});mxEvent.addGestureListeners(f.node,p,u,v);mxEvent.addListener(f.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
-(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO};Graph.prototype.getCellAt=function(a,b,f,p,u,v){this.useCssTransforms&&(a=a/this.currentScale-this.currentTranslate.x,b=b/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,
-b,f,p,u,v){p=null!=p?p:!0;u=null!=u?u:!0;null==f&&(f=this.getCurrentRoot(),null==f&&(f=this.getModel().getRoot()));if(null!=f)for(var d=this.model.getChildCount(f)-1;0<=d;d--){var c=this.model.getChildAt(f,d),e=this.getScaledCellAt(a,b,c,p,u,v);if(null!=e)return e;if(this.isCellVisible(c)&&(u&&this.model.isEdge(c)||p&&this.model.isVertex(c))&&(e=this.view.getState(c),null!=e&&(null==v||!v(e,a,b))&&this.intersects(e,a,b)))return c}return null};mxCellHighlight.prototype.getStrokeWidth=function(a){a=
-this.strokeWidth;this.graph.useCssTransforms&&(a/=this.graph.currentScale);return a};mxGraphView.prototype.getGraphBounds=function(){var a=this.graphBounds;if(this.graph.useCssTransforms)var b=this.graph.currentTranslate,f=this.graph.currentScale,a=new mxRectangle((a.x+b.x)*f,(a.y+b.y)*f,a.width*f,a.height*f);return a};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var a=mxGraphView.prototype.validate;mxGraphView.prototype.validate=
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,m=null,p=mxUtils.bind(this,function(a){k=!0;m=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),u=mxUtils.bind(this,function(a){k=k&&null!=m&&Math.abs(m.x-mxEvent.getClientX(a))<b&&Math.abs(m.y-mxEvent.getClientY(a))<b}),x=mxUtils.bind(this,function(b){if(k)for(var c=mxEvent.getSource(b);null!=
+c&&c!=e.node;){if("a"==c.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,c,b);break}c=c.parentNode}});mxEvent.addGestureListeners(e.node,p,u,x);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
+(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO};Graph.prototype.getCellAt=function(a,b,e,p,u,x){this.useCssTransforms&&(a=a/this.currentScale-this.currentTranslate.x,b=b/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,
+b,e,p,u,x){p=null!=p?p:!0;u=null!=u?u:!0;null==e&&(e=this.getCurrentRoot(),null==e&&(e=this.getModel().getRoot()));if(null!=e)for(var d=this.model.getChildCount(e)-1;0<=d;d--){var c=this.model.getChildAt(e,d),f=this.getScaledCellAt(a,b,c,p,u,x);if(null!=f)return f;if(this.isCellVisible(c)&&(u&&this.model.isEdge(c)||p&&this.model.isVertex(c))&&(f=this.view.getState(c),null!=f&&(null==x||!x(f,a,b))&&this.intersects(f,a,b)))return c}return null};mxCellHighlight.prototype.getStrokeWidth=function(a){a=
+this.strokeWidth;this.graph.useCssTransforms&&(a/=this.graph.currentScale);return a};mxGraphView.prototype.getGraphBounds=function(){var a=this.graphBounds;if(this.graph.useCssTransforms)var b=this.graph.currentTranslate,e=this.graph.currentScale,a=new mxRectangle((a.x+b.x)*e,(a.y+b.y)*e,a.width*e,a.height*e);return a};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var a=mxGraphView.prototype.validate;mxGraphView.prototype.validate=
function(b){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);a.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)};Graph.prototype.updateCssTransform=function(){var a=this.view.getDrawPane();
-if(null!=a)if(a=a.parentNode,this.useCssTransforms){var b=a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");var f=Math.round(100*this.currentScale)/100;a.setAttribute("transform","scale("+f+","+f+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");if(b!=a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var p=a.style.display;a.style.display="none";a.getBBox();a.style.display=p}}catch(u){}}else a.removeAttribute("transformOrigin"),
-a.removeAttribute("transform")};var b=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,f=this.scale,m=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale=f,this.translate=m)};var f=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,m){var d=this.useCssTransforms,l=this.view.scale,v=this.view.translate;
-d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);f.apply(this,arguments);d&&(this.view.scale=l,this.view.translate=v,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
-Graph.prototype.labelLinkClicked=function(a,b,f){b=b.getAttribute("href");if(null!=b&&!this.isCustomLink(b)&&mxEvent.isLeftMouseButton(f)&&!mxEvent.isPopupTrigger(f)||mxEvent.isTouchEvent(f)){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(f)}};
-Graph.prototype.openLink=function(a,b,f){var d=window;try{if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var l=a.split("#")[1];window.location.hash=="#"+l&&(window.location.hash="");window.location.hash=l}else d=window.open(a,b),null==d||f||(d.opener=null)}catch(m){}return d};Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};
+if(null!=a)if(a=a.parentNode,this.useCssTransforms){var b=a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");var e=Math.round(100*this.currentScale)/100;a.setAttribute("transform","scale("+e+","+e+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");if(b!=a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var p=a.style.display;a.style.display="none";a.getBBox();a.style.display=p}}catch(u){}}else a.removeAttribute("transformOrigin"),
+a.removeAttribute("transform")};var b=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,e=this.scale,m=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale=e,this.translate=m)};var e=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,m){var d=this.useCssTransforms,k=this.view.scale,x=this.view.translate;
+d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);e.apply(this,arguments);d&&(this.view.scale=k,this.view.translate=x,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
+Graph.prototype.labelLinkClicked=function(a,b,e){b=b.getAttribute("href");if(null!=b&&!this.isCustomLink(b)&&mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e)){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(e)}};
+Graph.prototype.openLink=function(a,b,e){var d=window;try{if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var k=a.split("#")[1];window.location.hash=="#"+k&&(window.location.hash="");window.location.hash=k}else d=window.open(a,b),null==d||e||(d.opener=null)}catch(m){}return d};Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};
Graph.prototype.isCustomLink=function(a){return"data:"==a.substring(0,5)};Graph.prototype.customLinkClicked=function(a){return!1};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};
Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.getLayout=function(a){a=this.graph.getCellStyle(a);if(null!=a){if("stackLayout"==a.childLayout){var b=new mxStackLayout(this.graph,!0);b.resizeParentMax="1"==mxUtils.getValue(a,"resizeParentMax","1");b.horizontal="1"==mxUtils.getValue(a,"horizontalStack","1");b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1");b.resizeLast="1"==mxUtils.getValue(a,"resizeLast","0");b.spacing=a.stackSpacing||
@@ -2281,43 +2283,43 @@ b.spacing;b.border=a.stackBorder||b.border;b.marginLeft=a.marginLeft||0;b.margin
!0,b.edgeRouting=!1,b.resetEdges=!1,b;if("flowLayout"==a.childLayout)return b=new mxHierarchicalLayout(this.graph,mxUtils.getValue(a,"flowOrientation",mxConstants.DIRECTION_EAST)),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.parentBorder=mxUtils.getValue(a,"parentPadding",20),b.maintainParentLocation=!0,b.intraCellSpacing=mxUtils.getValue(a,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),b.interRankCellSpacing=mxUtils.getValue(a,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),
b.interHierarchySpacing=mxUtils.getValue(a,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),b.parallelEdgeSpacing=mxUtils.getValue(a,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),b;if("circleLayout"==a.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==a.childLayout)return new mxFastOrganicLayout(this.graph)}return null}};
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 a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var f=Math.ceil(b.x/this.view.scale-this.view.translate.x),d=Math.ceil(b.y/this.view.scale-this.view.translate.y),l=Math.floor(f/a.width),m=Math.floor(d/a.height);return new mxRectangle(l,m,Math.ceil((f+Math.floor(b.width/this.view.scale))/a.width)-l,Math.ceil((d+Math.floor(b.height/this.view.scale))/a.height)-m)};
-Graph.prototype.sanitizeHtml=function(a,b){return html_sanitize(a,function(a){return null!=a&&"javascript:"!==a.toString().toLowerCase().substring(0,11)?a:null},function(a){return a})};Graph.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var f=this.model.cells[b];this.isReplacePlaceholders(f)&&(this.view.invalidate(f,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};
+Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var e=Math.ceil(b.x/this.view.scale-this.view.translate.x),d=Math.ceil(b.y/this.view.scale-this.view.translate.y),k=Math.floor(e/a.width),m=Math.floor(d/a.height);return new mxRectangle(k,m,Math.ceil((e+Math.floor(b.width/this.view.scale))/a.width)-k,Math.ceil((d+Math.floor(b.height/this.view.scale))/a.height)-m)};
+Graph.prototype.sanitizeHtml=function(a,b){return html_sanitize(a,function(a){return null!=a&&"javascript:"!==a.toString().toLowerCase().substring(0,11)?a:null},function(a){return a})};Graph.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var e=this.model.cells[b];this.isReplacePlaceholders(e)&&(this.view.invalidate(e,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};
Graph.prototype.isZoomWheelEvent=function(a){return mxEvent.isAltDown(a)||mxEvent.isMetaDown(a)&&mxClient.IS_MAC||mxEvent.isControlDown(a)&&!mxClient.IS_MAC};Graph.prototype.isTransparentClickEvent=function(a){return mxEvent.isAltDown(a)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};Graph.prototype.isIgnoreTerminalEvent=function(a){return mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)};
-Graph.prototype.isSplitTarget=function(a,b,f){return!this.model.isEdge(b[0])&&!mxEvent.isAltDown(f)&&!mxEvent.isShiftDown(f)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};Graph.prototype.getLabel=function(a){var b=mxGraph.prototype.getLabel.apply(this,arguments);null!=b&&this.isReplacePlaceholders(a)&&null==a.getAttribute("placeholder")&&(b=this.replacePlaceholders(a,b));return b};
+Graph.prototype.isSplitTarget=function(a,b,e){return!this.model.isEdge(b[0])&&!mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};Graph.prototype.getLabel=function(a){var b=mxGraph.prototype.getLabel.apply(this,arguments);null!=b&&this.isReplacePlaceholders(a)&&null==a.getAttribute("placeholder")&&(b=this.replacePlaceholders(a,b));return b};
Graph.prototype.isLabelMovable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(b,"labelMovable","0")))};Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};
Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
-Graph.prototype.formatDate=function(a,b,f){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,l=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,m=/[^-+\dA-Z]/g,p=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),f=!0);var u=f?"getUTC":"get",v=a[u+"Date"](),B=a[u+"Day"](),c=a[u+"Month"](),e=a[u+"FullYear"](),k=a[u+"Hours"](),q=a[u+"Minutes"](),n=a[u+"Seconds"](),u=a[u+"Milliseconds"](),g=f?0:a.getTimezoneOffset(),x={d:v,dd:p(v),ddd:d.i18n.dayNames[B],dddd:d.i18n.dayNames[B+7],m:c+1,mm:p(c+1),mmm:d.i18n.monthNames[c],mmmm:d.i18n.monthNames[c+
-12],yy:String(e).slice(2),yyyy:e,h:k%12||12,hh:p(k%12||12),H:k,HH:p(k),M:q,MM:p(q),s:n,ss:p(n),l:p(u,3),L:p(99<u?Math.round(u/10):u),t:12>k?"a":"p",tt:12>k?"am":"pm",T:12>k?"A":"P",TT:12>k?"AM":"PM",Z:f?"UTC":(String(a).match(l)||[""]).pop().replace(m,""),o:(0<g?"-":"+")+p(100*Math.floor(Math.abs(g)/60)+Math.abs(g)%60,4),S:["th","st","nd","rd"][3<v%10?0:(10!=v%100-v%10)*v%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in x?x[a]:a.slice(1,
+Graph.prototype.formatDate=function(a,b,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 d=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,m=/[^-+\dA-Z]/g,p=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
+/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var u=e?"getUTC":"get",x=a[u+"Date"](),B=a[u+"Day"](),c=a[u+"Month"](),f=a[u+"FullYear"](),g=a[u+"Hours"](),t=a[u+"Minutes"](),n=a[u+"Seconds"](),u=a[u+"Milliseconds"](),l=e?0:a.getTimezoneOffset(),y={d:x,dd:p(x),ddd:d.i18n.dayNames[B],dddd:d.i18n.dayNames[B+7],m:c+1,mm:p(c+1),mmm:d.i18n.monthNames[c],mmmm:d.i18n.monthNames[c+
+12],yy:String(f).slice(2),yyyy:f,h:g%12||12,hh:p(g%12||12),H:g,HH:p(g),M:t,MM:p(t),s:n,ss:p(n),l:p(u,3),L:p(99<u?Math.round(u/10):u),t:12>g?"a":"p",tt:12>g?"am":"pm",T:12>g?"A":"P",TT:12>g?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(m,""),o:(0<l?"-":"+")+p(100*Math.floor(Math.abs(l)/60)+Math.abs(l)%60,4),S:["th","st","nd","rd"][3<x%10?0:(10!=x%100-x%10)*x%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in y?y[a]:a.slice(1,
a.length-1)})};
-Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),f=b.getChildCount(b.root),d=0;d<f;d++)mxUtils.bind(this,function(d){var f=document.createElement("div");f.style.overflow="hidden";f.style.textOverflow="ellipsis";f.style.padding="2px";f.style.whiteSpace="nowrap";var l=document.createElement("input");l.style.display="inline-block";l.setAttribute("type","checkbox");b.isVisible(d)&&(l.setAttribute("checked","checked"),
-l.defaultChecked=!0);f.appendChild(l);var u=this.convertValueToString(d)||mxResources.get("background")||"Background";f.setAttribute("title",u);mxUtils.write(f,u);a.appendChild(f);mxEvent.addListener(l,"click",function(){null!=l.getAttribute("checked")?l.removeAttribute("checked"):l.setAttribute("checked","checked");b.setVisible(d,l.checked)})})(b.getChildAt(b.root,d));return a};
-Graph.prototype.replacePlaceholders=function(a,b){var f=[];if(null!=b){for(var d=0;match=this.placeholderPattern.exec(b);){var l=match[0];if(2<l.length&&"%label%"!=l&&"%tooltip%"!=l){var m=null;if(match.index>d&&"%"==b.charAt(match.index-1))m=l.substring(1);else{var p=l.substring(1,l.length-1);if(0>p.indexOf("{"))for(var u=a;null==m&&null!=u;)null!=u.value&&"object"==typeof u.value&&(m=u.hasAttribute(p)?null!=u.getAttribute(p)?u.getAttribute(p):"":null),u=this.model.getParent(u);null==m&&(m=this.getGlobalVariable(p))}f.push(b.substring(d,
-match.index)+(null!=m?m:l));d=match.index+l.length}}f.push(b.substring(d))}return f.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],f=0;f<a.length;f++){var d=this.model.getCell(a[f].id);null!=d&&b.push(d)}this.setSelectionCells(b)}else this.clearSelection()};
-Graph.prototype.selectCellsForConnectVertex=function(a,b,f){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=f&&(mxEvent.isTouchEvent(b)?f.update(f.getState(this.view.getState(a[1]))):f.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)};
-Graph.prototype.connectVertex=function(a,b,f,d,l,m){if(a.geometry.relative&&this.model.isEdge(a.parent))return[];m=m?m:!1;var p=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(p.x+=a.geometry.width/2,p.y-=f):b==mxConstants.DIRECTION_SOUTH?(p.x+=a.geometry.width/2,p.y+=a.geometry.height+f):(p.x=b==mxConstants.DIRECTION_WEST?p.x-f:p.x+(a.geometry.width+
-f),p.y+=a.geometry.height/2);f=this.view.getState(this.model.getParent(a));var u=this.view.scale,v=this.view.translate,B=v.x*u,v=v.y*u;null!=f&&this.model.isVertex(f.cell)&&(B=f.x,v=f.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);m=m||mxEvent.isControlDown(d)&&!l?null:this.getCellAt(B+p.x*u,v+p.y*u);this.model.isAncestor(m,a)&&(m=null);for(f=m;null!=f;){if(this.isCellLocked(f)){m=null;break}f=this.model.getParent(f)}null!=m&&(f=this.view.getState(a),
-u=this.view.getState(m),null!=f&&null!=u&&mxUtils.intersects(f,u)&&(m=null));if(l=!mxEvent.isShiftDown(d)||l)b==mxConstants.DIRECTION_NORTH?p.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?p.y+=a.geometry.height/2:p.x=b==mxConstants.DIRECTION_WEST?p.x-a.geometry.width/2:p.x+a.geometry.width/2;null==m||this.isCellConnectable(m)||(f=this.getModel().getParent(m),this.getModel().isVertex(f)&&this.isCellConnectable(f)&&(m=f));if(m==a||this.model.isEdge(m)||!this.isCellConnectable(m))m=null;f=[];
-this.model.beginUpdate();try{u=m;if(null==u&&l){for(var B=a,c=this.getCellGeometry(a);null!=c&&c.relative;)B=this.getModel().getParent(B),c=this.getCellGeometry(B);var e=this.view.getState(B),k=null!=e?e.style:this.getCellStyle(B);if(mxUtils.getValue(k,"part",!1)){var q=this.model.getParent(B);this.model.isVertex(q)&&(B=q)}u=this.duplicateCells([B],!1)[0];c=this.getCellGeometry(u);null!=c&&(c.x=p.x-c.width/2,c.y=p.y-c.height/2)}c=null;null!=this.layoutManager&&(c=this.layoutManager.getLayout(this.model.getParent(a)));
-var n=mxEvent.isControlDown(d)&&l||null==m&&null!=c&&c.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),null,"",a,u,this.createCurrentEdgeStyle());if(null!=n&&this.connectionHandler.insertBeforeSource){var g=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=n.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==n.parent&&(g=d.parent.getIndex(d),this.model.add(d.parent,n,g))}null==m&&null!=u&&null!=c&&null!=a.parent&&c.constructor==
-mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(g=a.parent.getIndex(a),this.model.add(a.parent,u,g));null!=n&&f.push(n);null==m&&null!=u&&f.push(u);null==u&&null!=n&&n.geometry.setTerminalPoint(p,!1);null!=n&&this.fireEvent(new mxEventObject("cellsInserted","cells",[n]))}finally{this.model.endUpdate()}return f};
-Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],f,d;for(d in this.model.cells)if(f=this.model.cells[d],this.model.isVertex(f)||this.model.isEdge(f))this.isHtmlLabel(f)?(a.innerHTML=this.getLabel(f),f=mxUtils.extractTextWithWhitespace([a])):f=this.getLabel(f),f=mxUtils.trim(f.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<f.length&&b.push(f);return b.join(" ")};
-Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),f=a,d=null;null==d&&null!=f;)null!=f.value&&"object"==typeof f.value&&(d=f.hasAttribute(b)?null!=f.getAttribute(b)?f.getAttribute(b):"":null),f=this.model.getParent(f);return d||""}return a.value.getAttribute("label")||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};
+Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),e=b.getChildCount(b.root),d=0;d<e;d++)mxUtils.bind(this,function(d){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var k=document.createElement("input");k.style.display="inline-block";k.setAttribute("type","checkbox");b.isVisible(d)&&(k.setAttribute("checked","checked"),
+k.defaultChecked=!0);e.appendChild(k);var u=this.convertValueToString(d)||mxResources.get("background")||"Background";e.setAttribute("title",u);mxUtils.write(e,u);a.appendChild(e);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");b.setVisible(d,k.checked)})})(b.getChildAt(b.root,d));return a};
+Graph.prototype.replacePlaceholders=function(a,b){var e=[];if(null!=b){for(var d=0;match=this.placeholderPattern.exec(b);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var m=null;if(match.index>d&&"%"==b.charAt(match.index-1))m=k.substring(1);else{var p=k.substring(1,k.length-1);if(0>p.indexOf("{"))for(var u=a;null==m&&null!=u;)null!=u.value&&"object"==typeof u.value&&(m=u.hasAttribute(p)?null!=u.getAttribute(p)?u.getAttribute(p):"":null),u=this.model.getParent(u);null==m&&(m=this.getGlobalVariable(p))}e.push(b.substring(d,
+match.index)+(null!=m?m:k));d=match.index+k.length}}e.push(b.substring(d))}return e.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],e=0;e<a.length;e++){var d=this.model.getCell(a[e].id);null!=d&&b.push(d)}this.setSelectionCells(b)}else this.clearSelection()};
+Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)};
+Graph.prototype.connectVertex=function(a,b,e,d,k,m){if(a.geometry.relative&&this.model.isEdge(a.parent))return[];m=m?m:!1;var p=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(p.x+=a.geometry.width/2,p.y-=e):b==mxConstants.DIRECTION_SOUTH?(p.x+=a.geometry.width/2,p.y+=a.geometry.height+e):(p.x=b==mxConstants.DIRECTION_WEST?p.x-e:p.x+(a.geometry.width+
+e),p.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));var u=this.view.scale,x=this.view.translate,B=x.x*u,x=x.y*u;null!=e&&this.model.isVertex(e.cell)&&(B=e.x,x=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);m=m||mxEvent.isControlDown(d)&&!k?null:this.getCellAt(B+p.x*u,x+p.y*u);this.model.isAncestor(m,a)&&(m=null);for(e=m;null!=e;){if(this.isCellLocked(e)){m=null;break}e=this.model.getParent(e)}null!=m&&(e=this.view.getState(a),
+u=this.view.getState(m),null!=e&&null!=u&&mxUtils.intersects(e,u)&&(m=null));if(k=!mxEvent.isShiftDown(d)||k)b==mxConstants.DIRECTION_NORTH?p.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?p.y+=a.geometry.height/2:p.x=b==mxConstants.DIRECTION_WEST?p.x-a.geometry.width/2:p.x+a.geometry.width/2;null==m||this.isCellConnectable(m)||(e=this.getModel().getParent(m),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(m=e));if(m==a||this.model.isEdge(m)||!this.isCellConnectable(m))m=null;e=[];
+this.model.beginUpdate();try{u=m;if(null==u&&k){for(var B=a,c=this.getCellGeometry(a);null!=c&&c.relative;)B=this.getModel().getParent(B),c=this.getCellGeometry(B);var f=this.view.getState(B),g=null!=f?f.style:this.getCellStyle(B);if(mxUtils.getValue(g,"part",!1)){var t=this.model.getParent(B);this.model.isVertex(t)&&(B=t)}u=this.duplicateCells([B],!1)[0];c=this.getCellGeometry(u);null!=c&&(c.x=p.x-c.width/2,c.y=p.y-c.height/2)}c=null;null!=this.layoutManager&&(c=this.layoutManager.getLayout(this.model.getParent(a)));
+var n=mxEvent.isControlDown(d)&&k||null==m&&null!=c&&c.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),null,"",a,u,this.createCurrentEdgeStyle());if(null!=n&&this.connectionHandler.insertBeforeSource){var l=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=n.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==n.parent&&(l=d.parent.getIndex(d),this.model.add(d.parent,n,l))}null==m&&null!=u&&null!=c&&null!=a.parent&&c.constructor==
+mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(l=a.parent.getIndex(a),this.model.add(a.parent,u,l));null!=n&&e.push(n);null==m&&null!=u&&e.push(u);null==u&&null!=n&&n.geometry.setTerminalPoint(p,!1);null!=n&&this.fireEvent(new mxEventObject("cellsInserted","cells",[n]))}finally{this.model.endUpdate()}return e};
+Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],e,d;for(d in this.model.cells)if(e=this.model.cells[d],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(a.innerHTML=this.getLabel(e),e=mxUtils.extractTextWithWhitespace([a])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&b.push(e);return b.join(" ")};
+Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),e=a,d=null;null==d&&null!=e;)null!=e.value&&"object"==typeof e.value&&(d=e.hasAttribute(b)?null!=e.getAttribute(b)?e.getAttribute(b):"":null),e=this.model.getParent(e);return d||""}return a.value.getAttribute("label")||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};
Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
-Graph.prototype.getCellStyle=function(a){var b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var f=this.model.getParent(a);this.model.isVertex(f)&&this.isCellCollapsed(a)&&(f=this.layoutManager.getLayout(f),null!=f&&f.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!f.horizontal))}return b};
-Graph.prototype.updateAlternateBounds=function(a,b,f){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var d=this.layoutManager.getLayout(this.model.getParent(a));null!=d&&d.constructor==mxStackLayout&&(d.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a,b){return mxEvent.isShiftDown(a)||"1"==mxUtils.getValue(b.style,"moveCells","0")};
-Graph.prototype.foldCells=function(a,b,f,d,l){b=null!=b?b:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));if(null!=f){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var m=0;m<f.length;m++){var p=this.view.getState(f[m]),u=this.getCellGeometry(f[m]);if(null!=p&&null!=u){var v=Math.round(u.width-p.width/this.view.scale),B=Math.round(u.height-p.height/this.view.scale);if(0!=B||0!=v){var c=this.model.getParent(f[m]),e=this.layoutManager.getLayout(c);
-null==e?null!=l&&this.isMoveCellsEvent(l,p)&&this.moveSiblings(p,c,v,B):null!=l&&mxEvent.isAltDown(l)||e.constructor!=mxStackLayout||e.resizeLast||this.resizeParentStacks(c,e,v,B)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(f)}};
-Graph.prototype.moveSiblings=function(a,b,f,d){this.model.beginUpdate();try{var l=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<l.length;b++)if(l[b]!=a.cell){var m=this.view.getState(l[b]),p=this.getCellGeometry(l[b]);null!=m&&null!=p&&(p=p.clone(),p.translate(Math.round(f*Math.max(0,Math.min(1,(m.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(m.y-a.y)/a.height)))),this.model.setGeometry(l[b],p))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(a,b,f,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var l=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==l&&!b.resizeLast;){var m=this.getCellGeometry(a),p=this.view.getState(a);null!=p&&null!=m&&(m=m.clone(),b.horizontal?m.width+=f+Math.min(0,p.width/this.view.scale-m.width):m.height+=d+Math.min(0,p.height/this.view.scale-m.height),this.model.setGeometry(a,
+Graph.prototype.getCellStyle=function(a){var b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);this.model.isVertex(e)&&this.isCellCollapsed(a)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return b};
+Graph.prototype.updateAlternateBounds=function(a,b,e){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var d=this.layoutManager.getLayout(this.model.getParent(a));null!=d&&d.constructor==mxStackLayout&&(d.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a,b){return mxEvent.isShiftDown(a)||"1"==mxUtils.getValue(b.style,"moveCells","0")};
+Graph.prototype.foldCells=function(a,b,e,d,k){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var m=0;m<e.length;m++){var p=this.view.getState(e[m]),u=this.getCellGeometry(e[m]);if(null!=p&&null!=u){var x=Math.round(u.width-p.width/this.view.scale),B=Math.round(u.height-p.height/this.view.scale);if(0!=B||0!=x){var c=this.model.getParent(e[m]),f=this.layoutManager.getLayout(c);
+null==f?null!=k&&this.isMoveCellsEvent(k,p)&&this.moveSiblings(p,c,x,B):null!=k&&mxEvent.isAltDown(k)||f.constructor!=mxStackLayout||f.resizeLast||this.resizeParentStacks(c,f,x,B)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
+Graph.prototype.moveSiblings=function(a,b,e,d){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<k.length;b++)if(k[b]!=a.cell){var m=this.view.getState(k[b]),p=this.getCellGeometry(k[b]);null!=m&&null!=p&&(p=p.clone(),p.translate(Math.round(e*Math.max(0,Math.min(1,(m.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(m.y-a.y)/a.height)))),this.model.setGeometry(k[b],p))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(a,b,e,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var k=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==k&&!b.resizeLast;){var m=this.getCellGeometry(a),p=this.view.getState(a);null!=p&&null!=m&&(m=m.clone(),b.horizontal?m.width+=e+Math.min(0,p.width/this.view.scale-m.width):m.height+=d+Math.min(0,p.height/this.view.scale-m.height),this.model.setGeometry(a,
m));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return null!=b&&null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
-Graph.prototype.selectAll=function(a){a=a||this.getDefaultParent();this.isCellLocked(a)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(a,b,f){f=f||this.getDefaultParent();this.isCellLocked(f)||mxGraph.prototype.selectCells.apply(this,arguments)};Graph.prototype.getSwimlaneAt=function(a,b,f){f=f||this.getDefaultParent();return this.isCellLocked(f)?null:mxGraph.prototype.getSwimlaneAt.apply(this,arguments)};
+Graph.prototype.selectAll=function(a){a=a||this.getDefaultParent();this.isCellLocked(a)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(a,b,e){e=e||this.getDefaultParent();this.isCellLocked(e)||mxGraph.prototype.selectCells.apply(this,arguments)};Graph.prototype.getSwimlaneAt=function(a,b,e){e=e||this.getDefaultParent();return this.isCellLocked(e)?null:mxGraph.prototype.getSwimlaneAt.apply(this,arguments)};
Graph.prototype.isCellFoldable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.foldingEnabled&&("1"==b.treeFolding||!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=b.collapsible||!this.isContainer(a)&&"1"==b.collapsible))};Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};
Graph.prototype.zoom=function(a,b){a=Math.max(.01,Math.min(this.view.scale*a,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.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var f=a.value.getAttribute("tooltip");if(null!=f)null!=f&&this.isReplacePlaceholders(a)&&(f=this.replacePlaceholders(a,f)),b=this.sanitizeHtml(f);else{f=this.builtInProperties;a=a.value.attributes;var d=[];this.isEnabled()&&f.push("link");for(var l=0;l<a.length;l++)0>mxUtils.indexOf(f,a[l].nodeName)&&0<a[l].nodeValue.length&&d.push({name:a[l].nodeName,value:a[l].nodeValue});d.sort(function(a,b){return a.name<b.name?
--1:a.name>b.name?1:0});for(l=0;l<d.length;l++)"link"==d[l].name&&this.isCustomLink(d[l].value)||(b+=("link"!=d[l].name?"<b>"+d[l].name+":</b> ":"")+mxUtils.htmlEntities(d[l].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1),mxClient.IS_SVG&&(b='<div style="max-width:360px;">'+b+"</div>"))}}return b};Graph.prototype.stringToBytes=function(a){return Graph.stringToBytes(a)};Graph.prototype.bytesToString=function(a){return Graph.bytesToString(a)};Graph.prototype.compressNode=function(a){return Graph.compressNode(a)};
+Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var e=a.value.getAttribute("tooltip");if(null!=e)null!=e&&this.isReplacePlaceholders(a)&&(e=this.replacePlaceholders(a,e)),b=this.sanitizeHtml(e);else{e=this.builtInProperties;a=a.value.attributes;var d=[];this.isEnabled()&&e.push("link");for(var k=0;k<a.length;k++)0>mxUtils.indexOf(e,a[k].nodeName)&&0<a[k].nodeValue.length&&d.push({name:a[k].nodeName,value:a[k].nodeValue});d.sort(function(a,b){return a.name<b.name?
+-1:a.name>b.name?1:0});for(k=0;k<d.length;k++)"link"==d[k].name&&this.isCustomLink(d[k].value)||(b+=("link"!=d[k].name?"<b>"+d[k].name+":</b> ":"")+mxUtils.htmlEntities(d[k].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1),mxClient.IS_SVG&&(b='<div style="max-width:360px;">'+b+"</div>"))}}return b};Graph.prototype.stringToBytes=function(a){return Graph.stringToBytes(a)};Graph.prototype.bytesToString=function(a){return Graph.bytesToString(a)};Graph.prototype.compressNode=function(a){return Graph.compressNode(a)};
Graph.prototype.compress=function(a,b){return Graph.compress(a,b)};Graph.prototype.decompress=function(a,b){return Graph.decompress(a,b)};Graph.prototype.zapGremlins=function(a){return Graph.zapGremlins(a)};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;
HoverIcons.prototype.cssCursor="copy";HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.arrowFill="#29b6f2";HoverIcons.prototype.triangleUp=mxClient.IS_SVG?Graph.createSvgImage(18,28,'<path d="m 6 26 L 12 26 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);
HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(26,18,'<path d="m 1 6 L 14 6 L 14 1 L 26 9 L 14 18 L 14 12 L 1 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26);HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Graph.createSvgImage(18,26,'<path d="m 6 1 L 6 14 L 1 14 L 9 26 L 18 14 L 12 14 L 12 1 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14);
@@ -2327,139 +2329,139 @@ IMAGE_PATH+"/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUC
HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangleUp,mxResources.get("plusTooltip"));this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"));this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"));this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"));this.elts=[this.arrowUp,this.arrowRight,this.arrowDown,this.arrowLeft];this.repaintHandler=mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,
this.repaintHandler);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,
mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(a){null!=a.relatedTarget&&mxEvent.getSource(a)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(a){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(b){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||
-!mxEvent.isTouchEvent(b.getEvent())||this.graph.model.isVertex(b.getCell())||this.reset()});var b=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,d){b=!1;var f=d.getEvent();if(this.isResetEvent(f))this.reset();else if(!this.isActive()){var m=this.getState(d.getState());null==m&&mxEvent.isTouchEvent(f)||this.update(m)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,d){var f=d.getEvent();this.isResetEvent(f)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(f)||
-this.update(this.getState(d.getState()),d.getGraphX(),d.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,function(a,d){var f=d.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(f),mxEvent.getClientY(f));this.isResetEvent(f)?this.reset():this.isActive()&&!b&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),d):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(d.getGraphX(),d.getGraphY())))):mxEvent.isTouchEvent(f)||null!=this.bbox&&mxUtils.contains(this.bbox,d.getGraphX(),d.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(f)||this.reset();b=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(a,b){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isMetaDown(a)||mxEvent.isPopupTrigger(a)&&!mxEvent.isControlDown(a)};
-HoverIcons.prototype.createArrow=function(a,b){var f=null;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(f=document.createElement(mxClient.VML_PREFIX+":image"),f.setAttribute("src",a.src),f.style.borderStyle="none"):(f=document.createElement("div"),f.style.backgroundImage="url("+a.src+")",f.style.backgroundPosition="center",f.style.backgroundRepeat="no-repeat"),f.style.width=a.width+4+"px",f.style.height=a.height+4+"px",f.style.display=mxClient.IS_QUIRKS?"inline":
-"inline-block"):(f=mxUtils.createImage(a.src),f.style.width=a.width+"px",f.style.height=a.height+"px",f.style.padding=this.tolerance+"px");null!=b&&f.setAttribute("title",b);f.style.position="absolute";f.style.cursor=this.cssCursor;mxEvent.addGestureListeners(f,mxUtils.bind(this,function(a){null==this.currentState||this.isResetEvent(a)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),this.drag(a,this.mouseDownPoint.x,this.mouseDownPoint.y),
-this.activeArrow=f,this.setDisplay("none"),mxEvent.consume(a))}));mxEvent.redirectMouseEvents(f,this.graph,this.currentState);mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isMouseEvent(a)&&(null!=this.activeArrow&&this.activeArrow!=f&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(f,100),this.activeArrow=f)}));mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(a){this.graph.isMouseDown||
-this.resetActiveArrow()}));return f};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};HoverIcons.prototype.getDirection=function(){var a=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?a=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?a=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(a=mxConstants.DIRECTION_WEST);return a};
+!mxEvent.isTouchEvent(b.getEvent())||this.graph.model.isVertex(b.getCell())||this.reset()});var b=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,d){b=!1;var e=d.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var m=this.getState(d.getState());null==m&&mxEvent.isTouchEvent(e)||this.update(m)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,d){var e=d.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||
+this.update(this.getState(d.getState()),d.getGraphX(),d.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,function(a,d){var e=d.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e));this.isResetEvent(e)?this.reset():this.isActive()&&!b&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),d):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(d.getGraphX(),d.getGraphY())))):mxEvent.isTouchEvent(e)||null!=this.bbox&&mxUtils.contains(this.bbox,d.getGraphX(),d.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(e)||this.reset();b=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(a,b){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isMetaDown(a)||mxEvent.isPopupTrigger(a)&&!mxEvent.isControlDown(a)};
+HoverIcons.prototype.createArrow=function(a,b){var e=null;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(e=document.createElement(mxClient.VML_PREFIX+":image"),e.setAttribute("src",a.src),e.style.borderStyle="none"):(e=document.createElement("div"),e.style.backgroundImage="url("+a.src+")",e.style.backgroundPosition="center",e.style.backgroundRepeat="no-repeat"),e.style.width=a.width+4+"px",e.style.height=a.height+4+"px",e.style.display=mxClient.IS_QUIRKS?"inline":
+"inline-block"):(e=mxUtils.createImage(a.src),e.style.width=a.width+"px",e.style.height=a.height+"px",e.style.padding=this.tolerance+"px");null!=b&&e.setAttribute("title",b);e.style.position="absolute";e.style.cursor=this.cssCursor;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){null==this.currentState||this.isResetEvent(a)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),this.drag(a,this.mouseDownPoint.x,this.mouseDownPoint.y),
+this.activeArrow=e,this.setDisplay("none"),mxEvent.consume(a))}));mxEvent.redirectMouseEvents(e,this.graph,this.currentState);mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isMouseEvent(a)&&(null!=this.activeArrow&&this.activeArrow!=e&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(e,100),this.activeArrow=e)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){this.graph.isMouseDown||
+this.resetActiveArrow()}));return e};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};HoverIcons.prototype.getDirection=function(){var a=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?a=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?a=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(a=mxConstants.DIRECTION_WEST);return a};
HoverIcons.prototype.visitNodes=function(a){for(var b=0;b<this.elts.length;b++)null!=this.elts[b]&&a(this.elts[b])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(a){null!=a.parentNode&&a.parentNode.removeChild(a)})};HoverIcons.prototype.setDisplay=function(a){this.visitNodes(function(b){b.style.display=a})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
-HoverIcons.prototype.drag=function(a,b,f){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,b,f),this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0,b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=b&&b.setHandlesVisible(!1),b=this.graph.connectionHandler.edgeState,null!=a&&mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)&&null!=b&&"orthogonalEdgeStyle"===
-mxUtils.getValue(b.style,mxConstants.STYLE_EDGE,null)&&(a=this.getDirection(),b.cell.style=mxUtils.setStyle(b.cell.style,"sourcePortConstraint",a),b.style.sourcePortConstraint=a))};HoverIcons.prototype.getStateAt=function(a,b,f){return this.graph.view.getState(this.graph.getCellAt(b,f))};
-HoverIcons.prototype.click=function(a,b,f){var d=f.getEvent(),l=f.getGraphX(),m=f.getGraphY(),l=this.getStateAt(a,l,m);null==l||!this.graph.model.isEdge(l.cell)||mxEvent.isControlDown(d)||l.getVisibleTerminalState(!0)!=a&&l.getVisibleTerminalState(!1)!=a?null!=a&&(a=this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,d),this.graph.selectCellsForConnectVertex(a,d,this),2==a.length&&this.graph.model.isVertex(a[1])?(this.graph.setSelectionCell(a[1]),mxEvent.isTouchEvent(d)?this.update(this.getState(this.graph.view.getState(a[1]))):
-this.reset(),this.graph.scrollCellToVisible(a[1])):this.graph.setSelectionCells(a)):(this.graph.setSelectionCell(l.cell),this.reset());f.consume()};HoverIcons.prototype.reset=function(a){null!=a&&!a||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null};
+HoverIcons.prototype.drag=function(a,b,e){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,b,e),this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0,b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=b&&b.setHandlesVisible(!1),b=this.graph.connectionHandler.edgeState,null!=a&&mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)&&null!=b&&"orthogonalEdgeStyle"===
+mxUtils.getValue(b.style,mxConstants.STYLE_EDGE,null)&&(a=this.getDirection(),b.cell.style=mxUtils.setStyle(b.cell.style,"sourcePortConstraint",a),b.style.sourcePortConstraint=a))};HoverIcons.prototype.getStateAt=function(a,b,e){return this.graph.view.getState(this.graph.getCellAt(b,e))};
+HoverIcons.prototype.click=function(a,b,e){var d=e.getEvent(),k=e.getGraphX(),m=e.getGraphY(),k=this.getStateAt(a,k,m);null==k||!this.graph.model.isEdge(k.cell)||mxEvent.isControlDown(d)||k.getVisibleTerminalState(!0)!=a&&k.getVisibleTerminalState(!1)!=a?null!=a&&(a=this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,d),this.graph.selectCellsForConnectVertex(a,d,this),2==a.length&&this.graph.model.isVertex(a[1])?(this.graph.setSelectionCell(a[1]),mxEvent.isTouchEvent(d)?this.update(this.getState(this.graph.view.getState(a[1]))):
+this.reset(),this.graph.scrollCellToVisible(a[1])):this.graph.setSelectionCells(a)):(this.graph.setSelectionCell(k.cell),this.reset());e.consume()};HoverIcons.prototype.reset=function(a){null!=a&&!a||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null};
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 a=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(a=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));a.grow(this.graph.tolerance);a.grow(this.arrowSpacing);
var b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);null!=b&&(a.x-=b.horizontalOffset/2,a.y-=b.verticalOffset/2,a.width+=b.horizontalOffset,a.height+=b.verticalOffset,null!=b.rotationShape&&null!=b.rotationShape.node&&"hidden"!=b.rotationShape.node.style.visibility&&"none"!=b.rotationShape.node.style.display&&null!=b.rotationShape.boundingBox&&a.add(b.rotationShape.boundingBox));this.arrowUp.style.left=Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance)+
"px";this.arrowUp.style.top=Math.round(a.y-this.triangleUp.height-this.tolerance)+"px";mxUtils.setOpacity(this.arrowUp,this.inactiveOpacity);this.arrowRight.style.left=Math.round(a.x+a.width-this.tolerance)+"px";this.arrowRight.style.top=Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance)+"px";mxUtils.setOpacity(this.arrowRight,this.inactiveOpacity);this.arrowDown.style.left=this.arrowUp.style.left;this.arrowDown.style.top=Math.round(a.y+a.height-this.tolerance)+
-"px";mxUtils.setOpacity(this.arrowDown,this.inactiveOpacity);this.arrowLeft.style.left=Math.round(a.x-this.triangleLeft.width-this.tolerance)+"px";this.arrowLeft.style.top=this.arrowRight.style.top;mxUtils.setOpacity(this.arrowLeft,this.inactiveOpacity);if(this.checkCollisions){var b=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY()),f=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),d=this.graph.getCellAt(this.currentState.getCenterX(),
-a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==f&&f==d&&d==a&&(a=d=f=b=null);var l=this.graph.getCellGeometry(this.currentState.cell),m=mxUtils.bind(this,function(a,b){var d=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null!=a&&!this.graph.model.isAncestor(a,this.currentState.cell)&&(null==d||null==l||d.height<6*l.height&&d.width<6*l.width)?b.style.visibility="hidden":b.style.visibility="visible"});
-m(b,this.arrowRight);m(f,this.arrowLeft);m(d,this.arrowUp);m(a,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",
+"px";mxUtils.setOpacity(this.arrowDown,this.inactiveOpacity);this.arrowLeft.style.left=Math.round(a.x-this.triangleLeft.width-this.tolerance)+"px";this.arrowLeft.style.top=this.arrowRight.style.top;mxUtils.setOpacity(this.arrowLeft,this.inactiveOpacity);if(this.checkCollisions){var b=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY()),e=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),d=this.graph.getCellAt(this.currentState.getCenterX(),
+a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==e&&e==d&&d==a&&(a=d=e=b=null);var k=this.graph.getCellGeometry(this.currentState.cell),m=mxUtils.bind(this,function(a,b){var d=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null!=a&&!this.graph.model.isAncestor(a,this.currentState.cell)&&(null==d||null==k||d.height<6*k.height&&d.width<6*k.width)?b.style.visibility="hidden":b.style.visibility="visible"});
+m(b,this.arrowRight);m(e,this.arrowLeft);m(d,this.arrowUp);m(a,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 a=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(b){null!=b.parentNode&&(b=new mxRectangle(b.offsetLeft,b.offsetTop,b.offsetWidth,b.offsetHeight),null==a?a=b:a.add(b))});return a};
HoverIcons.prototype.getState=function(a){if(null!=a)if(a=a.cell,this.graph.getModel().contains(a)){if(this.graph.getModel().isVertex(a)&&!this.graph.isCellConnectable(a)){var b=this.graph.getModel().getParent(a);this.graph.getModel().isVertex(b)&&this.graph.isCellConnectable(b)&&(a=b)}if(this.graph.isCellLocked(a)||this.graph.model.isEdge(a))a=null;a=this.graph.view.getState(a);null!=a&&null==a.style&&(a=null)}else a=null;return a};
-HoverIcons.prototype.update=function(a,b,f){if(!this.graph.connectionArrowsEnabled||null!=a&&"0"==mxUtils.getValue(a.style,"allowArrows","1"))this.reset();else{null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var d=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,d=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
-this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,f))}),this.updateDelay+10))):null!=this.startTime&&(d=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&d<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,f)?this.reset(!1):(null!=this.currentState||d>this.activationDelay)&&this.currentState!=a&&(d>this.updateDelay&&null!=a||null==this.bbox||null==b||null==f||!mxUtils.contains(this.bbox,
-b,f))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
+HoverIcons.prototype.update=function(a,b,e){if(!this.graph.connectionArrowsEnabled||null!=a&&"0"==mxUtils.getValue(a.style,"allowArrows","1"))this.reset();else{null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var d=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,d=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
+this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,e))}),this.updateDelay+10))):null!=this.startTime&&(d=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&d<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,e)?this.reset(!1):(null!=this.currentState||d>this.activationDelay)&&this.currentState!=a&&(d>this.updateDelay&&null!=a||null==this.bbox||null==b||null==e||!mxUtils.contains(this.bbox,
+b,e))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.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=a};
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,d){d=null!=d?d:!0;var c=this.getState(a);null!=c&&d&&this.graph.model.isEdge(c.cell)&&null!=c.style&&1!=c.style[mxConstants.STYLE_CURVED]&&!c.invalid&&this.updateLineJumps(c)&&this.graph.cellRenderer.redraw(c,!1,this.isRendering());c=b.apply(this,
-arguments);null!=c&&d&&this.graph.model.isEdge(c.cell)&&null!=c.style&&1!=c.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(c);return c};var f=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return f.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&&
-1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,e=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var d=function(c,b,d){var k=new mxPoint(b,d);k.type=c;e.push(k);k=null!=a.routedPoints?a.routedPoints[e.length-1]:null;return null==k||k.type!=c||k.x!=b||k.y!=d},f=.5*this.scale,c=!1,e=[],n=0;n<b.length-1;n++){for(var g=
-b[n+1],x=b[n],l=[],t=b[n+2];n<b.length-2&&mxUtils.ptSegDistSq(x.x,x.y,t.x,t.y,g.x,g.y)<1*this.scale*this.scale;)g=t,n++,t=b[n+2];for(var c=d(0,x.x,x.y)||c,u=0;u<this.validEdges.length;u++){var y=this.validEdges[u],m=y.absolutePoints;if(null!=m&&mxUtils.intersects(a,y)&&"1"!=y.style.noJump)for(y=0;y<m.length-1;y++){for(var p=m[y+1],z=m[y],t=m[y+2];y<m.length-2&&mxUtils.ptSegDistSq(z.x,z.y,t.x,t.y,p.x,p.y)<1*this.scale*this.scale;)p=t,y++,t=m[y+2];t=mxUtils.intersection(x.x,x.y,g.x,g.y,z.x,z.y,p.x,
-p.y);if(null!=t&&(Math.abs(t.x-x.x)>f||Math.abs(t.y-x.y)>f)&&(Math.abs(t.x-g.x)>f||Math.abs(t.y-g.y)>f)&&(Math.abs(t.x-z.x)>f||Math.abs(t.y-z.y)>f)&&(Math.abs(t.x-p.x)>f||Math.abs(t.y-p.y)>f)){p=t.x-x.x;z=t.y-x.y;t={distSq:p*p+z*z,x:t.x,y:t.y};for(p=0;p<l.length;p++)if(l[p].distSq>t.distSq){l.splice(p,0,t);t=null;break}null==t||0!=l.length&&l[l.length-1].x===t.x&&l[l.length-1].y===t.y||l.push(t)}}}for(y=0;y<l.length;y++)c=d(1,l[y].x,l[y].y)||c}t=b[b.length-1];c=d(0,t.x,t.y)||c}a.routedPoints=e;return c}return!1};
-var l=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){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)l.apply(this,arguments);else{var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,d=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,f=mxUtils.getValue(this.style,
-"jumpStyle","none"),n,g=!0,x=null,A=null;n=[];var t=null;a.begin();for(var u=0;u<this.state.routedPoints.length;u++){var y=this.state.routedPoints[u],m=new mxPoint(y.x/this.scale,y.y/this.scale);0==u?m=b[0]:u==this.state.routedPoints.length-1&&(m=b[b.length-1]);var p=!1;if(null!=x&&1==y.type){var z=this.state.routedPoints[u+1],y=z.x/this.scale-m.x,z=z.y/this.scale-m.y,y=y*y+z*z;null==t&&(t=new mxPoint(m.x-x.x,m.y-x.y),A=Math.sqrt(t.x*t.x+t.y*t.y),0<A?(t.x=t.x*d/A,t.y=t.y*d/A):t=null);y>d*d&&0<A&&
-(y=x.x-m.x,z=x.y-m.y,y=y*y+z*z,y>d*d&&(p=new mxPoint(m.x-t.x,m.y-t.y),y=new mxPoint(m.x+t.x,m.y+t.y),n.push(p),this.addPoints(a,n,c,e,!1,null,g),n=0>Math.round(t.x)||0==Math.round(t.x)&&0>=Math.round(t.y)?1:-1,g=!1,"sharp"==f?(a.lineTo(p.x-t.y*n,p.y+t.x*n),a.lineTo(y.x-t.y*n,y.y+t.x*n),a.lineTo(y.x,y.y)):"arc"==f?(n*=1.3,a.curveTo(p.x-t.y*n,p.y+t.x*n,y.x-t.y*n,y.y+t.x*n,y.x,y.y)):(a.moveTo(y.x,y.y),g=!0),n=[y],p=!0))}else t=null;p||(n.push(m),x=m)}this.addPoints(a,n,c,e,!1,null,g);a.stroke()}};var m=
-mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,e){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)m.apply(this,arguments);else{b=this.getTerminalPort(a,b,e);var d=this.getNextPoint(a,c,e),f=this.graph.isOrthogonal(a),n=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),g=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=n)var x=Math.cos(-n),l=Math.sin(-n),d=mxUtils.getRotatedPoint(d,x,l,g);
-x=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);x+=parseFloat(a.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);d=this.getPerimeterPoint(b,d,0==n&&f,x);0!=n&&(x=Math.cos(n),l=Math.sin(n),d=mxUtils.getRotatedPoint(d,x,l,g));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,e,d),e)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,e,d){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);e=c=null;if(null!=a)for(var k=
-0;k<a.length;k++){var f=this.graph.getConnectionPoint(b,a[k]);if(null!=f){var g=(f.x-d.x)*(f.x-d.x)+(f.y-d.y)*(f.y-d.y);if(null==e||g<e)c=f,e=g}}null!=c&&(d=c)}return d};var p=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var e=p.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(e=c.state.view.graph.replacePlaceholders(c.state.cell,e));return e};var u=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=
-function(a){if(null!=a.style&&"undefined"!==typeof pako){var b=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"string"===typeof b&&"stencil("==b.substring(0,8))try{var c=b.substring(8,b.length-1),e=mxUtils.parseXml(Graph.decompress(c));return new mxShape(new mxStencil(e.documentElement))}catch(k){null!=window.console&&console.log("Error in shape: "+k)}}return u.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;
+arguments);null!=c&&d&&this.graph.model.isEdge(c.cell)&&null!=c.style&&1!=c.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(c);return c};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return e.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&&
+1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,f=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var d=function(c,b,d){var g=new mxPoint(b,d);g.type=c;f.push(g);g=null!=a.routedPoints?a.routedPoints[f.length-1]:null;return null==g||g.type!=c||g.x!=b||g.y!=d},e=.5*this.scale,c=!1,f=[],n=0;n<b.length-1;n++){for(var l=
+b[n+1],y=b[n],A=[],q=b[n+2];n<b.length-2&&mxUtils.ptSegDistSq(y.x,y.y,q.x,q.y,l.x,l.y)<1*this.scale*this.scale;)l=q,n++,q=b[n+2];for(var c=d(0,y.x,y.y)||c,k=0;k<this.validEdges.length;k++){var z=this.validEdges[k],u=z.absolutePoints;if(null!=u&&mxUtils.intersects(a,z)&&"1"!=z.style.noJump)for(z=0;z<u.length-1;z++){for(var m=u[z+1],v=u[z],q=u[z+2];z<u.length-2&&mxUtils.ptSegDistSq(v.x,v.y,q.x,q.y,m.x,m.y)<1*this.scale*this.scale;)m=q,z++,q=u[z+2];q=mxUtils.intersection(y.x,y.y,l.x,l.y,v.x,v.y,m.x,
+m.y);if(null!=q&&(Math.abs(q.x-y.x)>e||Math.abs(q.y-y.y)>e)&&(Math.abs(q.x-l.x)>e||Math.abs(q.y-l.y)>e)&&(Math.abs(q.x-v.x)>e||Math.abs(q.y-v.y)>e)&&(Math.abs(q.x-m.x)>e||Math.abs(q.y-m.y)>e)){m=q.x-y.x;v=q.y-y.y;q={distSq:m*m+v*v,x:q.x,y:q.y};for(m=0;m<A.length;m++)if(A[m].distSq>q.distSq){A.splice(m,0,q);q=null;break}null==q||0!=A.length&&A[A.length-1].x===q.x&&A[A.length-1].y===q.y||A.push(q)}}}for(z=0;z<A.length;z++)c=d(1,A[z].x,A[z].y)||c}q=b[b.length-1];c=d(0,q.x,q.y)||c}a.routedPoints=f;return c}return!1};
+var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)k.apply(this,arguments);else{var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,d=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,e=mxUtils.getValue(this.style,
+"jumpStyle","none"),n,l=!0,y=null,A=null;n=[];var q=null;a.begin();for(var u=0;u<this.state.routedPoints.length;u++){var z=this.state.routedPoints[u],m=new mxPoint(z.x/this.scale,z.y/this.scale);0==u?m=b[0]:u==this.state.routedPoints.length-1&&(m=b[b.length-1]);var p=!1;if(null!=y&&1==z.type){var v=this.state.routedPoints[u+1],z=v.x/this.scale-m.x,v=v.y/this.scale-m.y,z=z*z+v*v;null==q&&(q=new mxPoint(m.x-y.x,m.y-y.y),A=Math.sqrt(q.x*q.x+q.y*q.y),0<A?(q.x=q.x*d/A,q.y=q.y*d/A):q=null);z>d*d&&0<A&&
+(z=y.x-m.x,v=y.y-m.y,z=z*z+v*v,z>d*d&&(p=new mxPoint(m.x-q.x,m.y-q.y),z=new mxPoint(m.x+q.x,m.y+q.y),n.push(p),this.addPoints(a,n,c,f,!1,null,l),n=0>Math.round(q.x)||0==Math.round(q.x)&&0>=Math.round(q.y)?1:-1,l=!1,"sharp"==e?(a.lineTo(p.x-q.y*n,p.y+q.x*n),a.lineTo(z.x-q.y*n,z.y+q.x*n),a.lineTo(z.x,z.y)):"arc"==e?(n*=1.3,a.curveTo(p.x-q.y*n,p.y+q.x*n,z.x-q.y*n,z.y+q.x*n,z.x,z.y)):(a.moveTo(z.x,z.y),l=!0),n=[z],p=!0))}else q=null;p||(n.push(m),y=m)}this.addPoints(a,n,c,f,!1,null,l);a.stroke()}};var m=
+mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,f){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)m.apply(this,arguments);else{b=this.getTerminalPort(a,b,f);var d=this.getNextPoint(a,c,f),e=this.graph.isOrthogonal(a),n=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),l=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=n)var y=Math.cos(-n),k=Math.sin(-n),d=mxUtils.getRotatedPoint(d,y,k,l);
+y=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);y+=parseFloat(a.style[f?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);d=this.getPerimeterPoint(b,d,0==n&&e,y);0!=n&&(y=Math.cos(n),k=Math.sin(n),d=mxUtils.getRotatedPoint(d,y,k,l));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,f,d),f)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,f,d){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);f=c=null;if(null!=a)for(var e=
+0;e<a.length;e++){var g=this.graph.getConnectionPoint(b,a[e]);if(null!=g){var l=(g.x-d.x)*(g.x-d.x)+(g.y-d.y)*(g.y-d.y);if(null==f||l<f)c=g,f=l}}null!=c&&(d=c)}return d};var p=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var f=p.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(f=c.state.view.graph.replacePlaceholders(c.state.cell,f));return f};var u=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=
+function(a){if(null!=a.style&&"undefined"!==typeof pako){var b=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"string"===typeof b&&"stencil("==b.substring(0,8))try{var c=b.substring(8,b.length-1),f=mxUtils.parseXml(Graph.decompress(c));return new mxShape(new mxStencil(f.documentElement))}catch(g){null!=window.console&&console.log("Error in shape: "+g)}}return u.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;
mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
-mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var f=mxStencilRegistry.getBasenameForStencil(a);if(null!=f){b=mxStencilRegistry.libraries[f];if(null!=b){if(null==mxStencilRegistry.packages[f]){for(var d=0;d<b.length;d++){var l=b[d];if(".xml"==l.toLowerCase().substring(l.length-4,l.length))mxStencilRegistry.loadStencilSet(l,null);else if(".js"==l.toLowerCase().substring(l.length-3,l.length))try{if(mxStencilRegistry.allowEval){var m=
-mxUtils.load(l);null!=m&&200<=m.getStatus()&&299>=m.getStatus()&&eval.call(window,m.getText())}}catch(p){null!=window.console&&console.log("error in getStencil:",l,p)}}mxStencilRegistry.packages[f]=1}}else f=f.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+f+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
-mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&"string"===typeof a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var b=a[1],f=2;f<a.length-1;f++)b+="/"+a[f];return b};
-mxStencilRegistry.loadStencilSet=function(a,b,f,d){var l=mxStencilRegistry.packages[a];if(null!=f&&f||null==l){var m=!1;if(null==l)try{if(d){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(d){null!=d&&null!=d.documentElement&&(mxStencilRegistry.packages[a]=d,m=!0,mxStencilRegistry.parseStencilSet(d.documentElement,b,m))}));return}l=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=l;m=!0}catch(p){null!=window.console&&console.log("error in loadStencilSet:",a,p)}null!=l&&null!=
-l.documentElement&&mxStencilRegistry.parseStencilSet(l.documentElement,b,m)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(a){b(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(a,b,f){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,b,f),d=d.nextSibling;else{f=null!=f?f:!0;var d=a.firstChild,l="";a=a.getAttribute("name");for(null!=a&&(l=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){var l=l.toLowerCase(),m=a.replace(/ /g,"_");f&&mxStencilRegistry.addStencil(l+m.toLowerCase(),new mxStencil(d));if(null!=b){var p=d.getAttribute("w"),
-u=d.getAttribute("h"),p=null==p?80:parseInt(p,10),u=null==u?80:parseInt(u,10);b(l,m,a,p,u)}}d=d.nextSibling}}};
+mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var d=0;d<b.length;d++){var k=b[d];if(".xml"==k.toLowerCase().substring(k.length-4,k.length))mxStencilRegistry.loadStencilSet(k,null);else if(".js"==k.toLowerCase().substring(k.length-3,k.length))try{if(mxStencilRegistry.allowEval){var m=
+mxUtils.load(k);null!=m&&200<=m.getStatus()&&299>=m.getStatus()&&eval.call(window,m.getText())}}catch(p){null!=window.console&&console.log("error in getStencil:",k,p)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
+mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&"string"===typeof a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var b=a[1],e=2;e<a.length-1;e++)b+="/"+a[e];return b};
+mxStencilRegistry.loadStencilSet=function(a,b,e,d){var k=mxStencilRegistry.packages[a];if(null!=e&&e||null==k){var m=!1;if(null==k)try{if(d){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(d){null!=d&&null!=d.documentElement&&(mxStencilRegistry.packages[a]=d,m=!0,mxStencilRegistry.parseStencilSet(d.documentElement,b,m))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;m=!0}catch(p){null!=window.console&&console.log("error in loadStencilSet:",a,p)}null!=k&&null!=
+k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,b,m)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(a){b(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
+mxStencilRegistry.parseStencilSet=function(a,b,e){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,b,e),d=d.nextSibling;else{e=null!=e?e:!0;var d=a.firstChild,k="";a=a.getAttribute("name");for(null!=a&&(k=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){var k=k.toLowerCase(),m=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(k+m.toLowerCase(),new mxStencil(d));if(null!=b){var p=d.getAttribute("w"),
+u=d.getAttribute("h"),p=null==p?80:parseInt(p,10),u=null==u?80:parseInt(u,10);b(k,m,a,p,u)}}d=d.nextSibling}}};
"undefined"!=typeof mxVertexHandler&&function(){function a(){var a=document.createElement("div");a.className="geHint";a.style.whiteSpace="nowrap";a.style.position="absolute";return a}function b(a,c){switch(c){case mxConstants.POINTS:return a;case mxConstants.MILLIMETERS:return(a/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.INCHES:return(a/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(a){return!mxEvent.isAltDown(a)};var f=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(a){return mxEvent.isControlDown(a)||f.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var a=new mxEllipse(null,this.highlightColor,this.highlightColor,0);a.opacity=mxConstants.HIGHLIGHT_OPACITY;return a};mxConnectionHandler.prototype.livePreview=
+!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(a){return!mxEvent.isAltDown(a)};var e=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(a){return mxEvent.isControlDown(a)||e.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var a=new mxEllipse(null,this.highlightColor,this.highlightColor,0);a.opacity=mxConstants.HIGHLIGHT_OPACITY;return a};mxConnectionHandler.prototype.livePreview=
!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=function(a){a=this.graph.createCurrentEdgeStyle();a=this.graph.createEdge(null,null,null,null,null,a);a=new mxCellState(this.graph.view,a,this.graph.getCellStyle(a));for(var c in this.graph.currentEdgeStyle)a.style[c]=this.graph.currentEdgeStyle[c];return a};var d=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var a=d.apply(this,arguments);a.isDashed="1"==
-this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var l=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=l.apply(this,arguments),c=a.getCell;a.getCell=mxUtils.bind(this,function(a){var b=c.apply(this,arguments);this.error=null;return b});return a};mxConnectionHandler.prototype.isCellEnabled=function(a){return!this.graph.isCellLocked(a)};Graph.prototype.defaultVertexStyle={};
+this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=k.apply(this,arguments),c=a.getCell;a.getCell=mxUtils.bind(this,function(a){var b=c.apply(this,arguments);this.error=null;return b});return a};mxConnectionHandler.prototype.isCellEnabled=function(a){return!this.graph.isCellLocked(a)};Graph.prototype.defaultVertexStyle={};
Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){var a="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";";null!=this.currentEdgeStyle.shape&&(a+="shape="+this.currentEdgeStyle.shape+";");null!=this.currentEdgeStyle.curved&&(a+="curved="+this.currentEdgeStyle.curved+";");null!=this.currentEdgeStyle.rounded&&(a+="rounded="+this.currentEdgeStyle.rounded+";");null!=this.currentEdgeStyle.comic&&
(a+="comic="+this.currentEdgeStyle.comic+";");null!=this.currentEdgeStyle.jumpStyle&&(a+="jumpStyle="+this.currentEdgeStyle.jumpStyle+";");null!=this.currentEdgeStyle.jumpSize&&(a+="jumpSize="+this.currentEdgeStyle.jumpSize+";");null!=this.currentEdgeStyle.orthogonalLoop?a+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(a+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?
a+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(a+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=
-null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.createCellLookup=function(a,c){c=null!=c?c:{};for(var b=0;b<a.length;b++){var e=a[b];c[mxObjectIdentity.get(e)]=e.getId();for(var d=this.model.getChildCount(e),k=0;k<d;k++)this.createCellLookup([this.model.getChildAt(e,k)],c)}return c};Graph.prototype.createCellMapping=
-function(a,c,b){b=null!=b?b:{};for(var e in a){var d=c[e];null==b[d]&&(b[d]=a[e].getId()||"")}return b};Graph.prototype.importGraphModel=function(a,c,b,e){c=null!=c?c:0;b=null!=b?b:0;var d=new mxCodec(a.ownerDocument),k=new mxGraphModel;d.decode(a,k);a=[];var d={},f={},g=k.getChildren(this.cloneCell(k.root,this.isCloneInvalidEdges(),d));if(null!=g){var n=this.createCellLookup([k.root]),g=g.slice();this.model.beginUpdate();try{if(1!=g.length||this.isCellLocked(this.getDefaultParent()))for(k=0;k<g.length;k++)a=
-a.concat(this.model.getChildren(this.moveCells([g[k]],c,b,!1,this.model.getRoot())[0]));else a=this.moveCells(k.getChildren(g[0]),c,b,!1,this.getDefaultParent()),f[k.getChildAt(k.root,0).getId()]=this.getDefaultParent().getId();this.createCellMapping(d,n,f);this.updateCustomLinks(f,a);if(e){this.isGridEnabled()&&(c=this.snap(c),b=this.snap(b));var z=this.getBoundingBoxFromGeometry(a,!0);null!=z&&this.moveCells(a,c-z.x,b-z.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var c=
-{},b=this.cloneCells(a,null,c),e=new mxDictionary,d=0;d<a.length;d++)e.put(a[d],!0);for(d=0;d<b.length;d++){var k=this.view.getState(a[d]);if(null!=k){var f=this.getCellGeometry(b[d]);null==f||!f.relative||this.model.isEdge(a[d])||e.get(this.model.getParent(a[d]))||(f.relative=!1,f.x=k.x/k.view.scale-k.view.translate.x,f.y=k.y/k.view.scale-k.view.translate.y)}}e=new mxCodec;k=new mxGraphModel;f=k.getChildAt(k.getRoot(),0);for(d=0;d<b.length;d++)k.add(f,b[d]);this.updateCustomLinks(this.createCellMapping(c,
-this.createCellLookup(a)),b);return e.encode(k)};var m=Graph.prototype.moveCells;Graph.prototype.moveCells=function(a,c,b,e,d,k,f){f=null!=f?f:{};var g=m.apply(this,arguments);e&&this.updateCustomLinks(this.createCellMapping(f,this.createCellLookup(a)),g);return g};Graph.prototype.updateCustomLinks=function(a,c){for(var b=0;b<c.length;b++)null!=c[b]&&this.updateCustomLinksForCell(a,c[b])};Graph.prototype.updateCustomLinksForCell=function(a,c){};Graph.prototype.getAllConnectionConstraints=function(a,
-c){if(null!=a){var b=mxUtils.getValue(a.style,"points",null);if(null!=b){var e=[];try{for(var d=JSON.parse(b),b=0;b<d.length;b++){var k=d[b];e.push(new mxConnectionConstraint(new mxPoint(k[0],k[1]),2<k.length?"0"!=k[2]:!0,null,3<k.length?k[3]:0,4<k.length?k[4]:0))}}catch(X){}return e}if(null!=a.shape&&null!=a.shape.bounds){k=a.shape.direction;d=a.shape.bounds;b=a.shape.scale;e=d.width/b;d=d.height/b;if(k==mxConstants.DIRECTION_NORTH||k==mxConstants.DIRECTION_SOUTH)k=e,e=d,d=k;b=a.shape.getConstraints(a.style,
-e,d);if(null!=b)return b;if(null!=a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);null!=c&&(c=mxUtils.getValue(c,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,
-c,[a]))}};Graph.prototype.isValidRoot=function(a){for(var c=this.model.getChildCount(a),b=0,e=0;e<c;e++){var d=this.model.getChildAt(a,e);this.model.isVertex(d)&&(d=this.getCellGeometry(d),null==d||d.relative||b++)}return 0<b||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(c,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(c,
+null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.createCellLookup=function(a,c){c=null!=c?c:{};for(var b=0;b<a.length;b++){var f=a[b];c[mxObjectIdentity.get(f)]=f.getId();for(var d=this.model.getChildCount(f),e=0;e<d;e++)this.createCellLookup([this.model.getChildAt(f,e)],c)}return c};Graph.prototype.createCellMapping=
+function(a,c,b){b=null!=b?b:{};for(var f in a){var d=c[f];null==b[d]&&(b[d]=a[f].getId()||"")}return b};Graph.prototype.importGraphModel=function(a,c,b,f){c=null!=c?c:0;b=null!=b?b:0;var d=new mxCodec(a.ownerDocument),e=new mxGraphModel;d.decode(a,e);a=[];var d={},g={},l=e.getChildren(this.cloneCell(e.root,this.isCloneInvalidEdges(),d));if(null!=l){var n=this.createCellLookup([e.root]),l=l.slice();this.model.beginUpdate();try{if(1!=l.length||this.isCellLocked(this.getDefaultParent()))for(e=0;e<l.length;e++)a=
+a.concat(this.model.getChildren(this.moveCells([l[e]],c,b,!1,this.model.getRoot())[0]));else a=this.moveCells(e.getChildren(l[0]),c,b,!1,this.getDefaultParent()),g[e.getChildAt(e.root,0).getId()]=this.getDefaultParent().getId();this.createCellMapping(d,n,g);this.updateCustomLinks(g,a);if(f){this.isGridEnabled()&&(c=this.snap(c),b=this.snap(b));var v=this.getBoundingBoxFromGeometry(a,!0);null!=v&&this.moveCells(a,c-v.x,b-v.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var c=
+{},b=this.cloneCells(a,null,c),f=new mxDictionary,d=0;d<a.length;d++)f.put(a[d],!0);for(d=0;d<b.length;d++){var e=this.view.getState(a[d]);if(null!=e){var g=this.getCellGeometry(b[d]);null==g||!g.relative||this.model.isEdge(a[d])||f.get(this.model.getParent(a[d]))||(g.relative=!1,g.x=e.x/e.view.scale-e.view.translate.x,g.y=e.y/e.view.scale-e.view.translate.y)}}f=new mxCodec;e=new mxGraphModel;g=e.getChildAt(e.getRoot(),0);for(d=0;d<b.length;d++)e.add(g,b[d]);this.updateCustomLinks(this.createCellMapping(c,
+this.createCellLookup(a)),b);return f.encode(e)};var m=Graph.prototype.moveCells;Graph.prototype.moveCells=function(a,c,b,f,d,e,g){g=null!=g?g:{};var l=m.apply(this,arguments);f&&this.updateCustomLinks(this.createCellMapping(g,this.createCellLookup(a)),l);return l};Graph.prototype.updateCustomLinks=function(a,c){for(var b=0;b<c.length;b++)null!=c[b]&&this.updateCustomLinksForCell(a,c[b])};Graph.prototype.updateCustomLinksForCell=function(a,c){};Graph.prototype.getAllConnectionConstraints=function(a,
+c){if(null!=a){var b=mxUtils.getValue(a.style,"points",null);if(null!=b){var f=[];try{for(var d=JSON.parse(b),b=0;b<d.length;b++){var e=d[b];f.push(new mxConnectionConstraint(new mxPoint(e[0],e[1]),2<e.length?"0"!=e[2]:!0,null,3<e.length?e[3]:0,4<e.length?e[4]:0))}}catch(X){}return f}if(null!=a.shape&&null!=a.shape.bounds){e=a.shape.direction;d=a.shape.bounds;b=a.shape.scale;f=d.width/b;d=d.height/b;if(e==mxConstants.DIRECTION_NORTH||e==mxConstants.DIRECTION_SOUTH)e=f,f=d,d=e;b=a.shape.getConstraints(a.style,
+f,d);if(null!=b)return b;if(null!=a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);null!=c&&(c=mxUtils.getValue(c,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,
+c,[a]))}};Graph.prototype.isValidRoot=function(a){for(var c=this.model.getChildCount(a),b=0,f=0;f<c;f++){var d=this.model.getChildAt(a,f);this.model.isVertex(d)&&(d=this.getCellGeometry(d),null==d||d.relative||b++)}return 0<b||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(c,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(c,
"dropTarget","1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var c=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(c&&null!=a&&null!=this.layoutManager){var b=this.model.getParent(a);null!=b&&(b=this.layoutManager.getLayout(b),null!=b&&b.constructor==mxStackLayout&&(c=!1))}return c};Graph.prototype.getPreferredSizeForCell=function(a){var c=
-mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=c&&(c.width+=10,c.height+=4,this.gridEnabled&&(c.width=this.snap(c.width),c.height=this.snap(c.height)));return c};Graph.prototype.turnShapes=function(a){var c=this.getModel(),b=[];c.beginUpdate();try{for(var e=0;e<a.length;e++){var d=a[e];if(c.isEdge(d)){var k=c.getTerminal(d,!0),f=c.getTerminal(d,!1);c.setTerminal(d,f,!0);c.setTerminal(d,k,!1);var g=c.getGeometry(d);if(null!=g){g=g.clone();null!=g.points&&g.points.reverse();var n=
-g.getTerminalPoint(!0),z=g.getTerminalPoint(!1);g.setTerminalPoint(n,!1);g.setTerminalPoint(z,!0);c.setGeometry(d,g);var q=this.view.getState(d),t=this.view.getState(k),x=this.view.getState(f);if(null!=q){var l=null!=t?this.getConnectionConstraint(q,t,!0):null,C=null!=x?this.getConnectionConstraint(q,x,!1):null;this.setConnectionConstraint(d,k,!0,C);this.setConnectionConstraint(d,f,!1,l)}b.push(d)}}else if(c.isVertex(d)&&(g=this.getCellGeometry(d),null!=g)){g=g.clone();g.x+=g.width/2-g.height/2;g.y+=
-g.height/2-g.width/2;var A=g.width;g.width=g.height;g.height=A;c.setGeometry(d,g);var y=this.view.getState(d);if(null!=y){var Q=y.style[mxConstants.STYLE_DIRECTION]||"east";"east"==Q?Q="south":"south"==Q?Q="west":"west"==Q?Q="north":"north"==Q&&(Q="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,Q,[d])}b.push(d)}}}finally{c.endUpdate()}return b};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;
-a=a.nextSibling}return!1};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var c=this.model.getDescendants(a.cell);if(0<c.length)for(var b=0;b<c.length;b++){var e=this.view.getState(c[b]);null!=e&&null!=e.shape&&null!=e.shape.stencil&&this.stencilHasPlaceholders(e.shape.stencil)?this.removeStateForCell(c[b]):this.isReplacePlaceholders(c[b])&&this.view.invalidate(c[b],
-!1,!1)}}};Graph.prototype.replaceElement=function(a,c){for(var b=a.ownerDocument.createElement(null!=c?c:"span"),e=Array.prototype.slice.call(a.attributes);attr=e.pop();)b.setAttribute(attr.nodeName,attr.nodeValue);b.innerHTML=a.innerHTML;a.parentNode.replaceChild(b,a)};Graph.prototype.processElements=function(a,c){for(var b=a.getElementsByTagName("*"),e=0;e<b.length;e++)c(b[e])};Graph.prototype.updateLabelElements=function(a,c,b){a=null!=a?a:this.getSelectionCells();for(var e=document.createElement("div"),
-d=0;d<a.length;d++)if(this.isHtmlLabel(a[d])){var k=this.convertValueToString(a[d]);if(null!=k&&0<k.length){e.innerHTML=k;for(var g=e.getElementsByTagName(null!=b?b:"*"),f=0;f<g.length;f++)c(g[f]);e.innerHTML!=k&&this.cellLabelChanged(a[d],e.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,c,b){c=Graph.zapGremlins(c);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var e=a.getAttribute("placeholder"),
-d=a;null!=d;){if(d==this.model.getRoot()||null!=d.value&&"object"==typeof d.value&&d.hasAttribute(e)){this.setAttributeForCell(d,e,c);break}d=this.model.getParent(d)}var k=a.value.cloneNode(!0);k.setAttribute("label",c);c=k}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var c=new mxDictionary,b=0;b<a.length;b++)c.put(a[b],!0);for(var e=[],b=0;b<a.length;b++){var d=this.model.getParent(a[b]);null==d||
-c.get(d)||(c.put(d,!0),e.push(d))}for(b=0;b<e.length;b++)if(d=this.view.getState(e[b]),null!=d&&(this.model.isEdge(d.cell)||this.model.isVertex(d.cell))&&this.isCellDeletable(d.cell)){var k=mxUtils.getValue(d.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),g=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);if(k==mxConstants.NONE&&g==mxConstants.NONE){k=!0;for(g=0;g<this.model.getChildCount(d.cell)&&k;g++)c.get(this.model.getChildAt(d.cell,g))||(k=!1);k&&a.push(d.cell)}}}mxGraph.prototype.cellsRemoved.apply(this,
-arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var c=[],b=0;b<a.length;b++)if(this.isCellDeletable(a[b])){var e=this.view.getState(a[b]);if(null!=e){var d=mxUtils.getValue(e.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),e=mxUtils.getValue(e.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);d==mxConstants.NONE&&e==mxConstants.NONE&&c.push(a[b])}}a=c;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,c){this.setAttributeForCell(a,
-"link",c)};Graph.prototype.setTooltipForCell=function(a,c){this.setAttributeForCell(a,"tooltip",c)};Graph.prototype.getAttributeForCell=function(a,c,b){return null!=a.value&&"object"===typeof a.value?a.value.getAttribute(c)||b:b};Graph.prototype.setAttributeForCell=function(a,c,b){var e;null!=a.value&&"object"==typeof a.value?e=a.value.cloneNode(!0):(e=mxUtils.createXmlDocument().createElement("UserObject"),e.setAttribute("label",a.value||""));null!=b?e.setAttribute(c,b):e.removeAttribute(c);this.model.setValue(a,
-e)};Graph.prototype.getDropTarget=function(a,c,b,e){this.getModel();if(mxEvent.isAltDown(c))return null;for(var d=0;d<a.length;d++)if(this.model.isEdge(this.model.getParent(a[d])))return null;return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,c){if(this.isEnabled()){var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),
-mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(c)){var e=this.model.isEdge(c)?this.view.getState(c):null,d=mxEvent.getSource(a);this.firstClickState!=e||this.firstClickSource!=d||null!=e&&null!=e.text&&null!=e.text.node&&null!=e.text.boundingBox&&(mxUtils.contains(e.text.boundingBox,b.x,b.y)||mxUtils.isAncestorNode(e.text.node,mxEvent.getSource(a)))||(null!=e||this.isCellLocked(this.getDefaultParent()))&&(null==e||this.isCellLocked(e.cell))||!(null!=e||mxClient.IS_VML&&d==this.view.getCanvas()||
-mxClient.IS_SVG&&d==this.view.getCanvas().ownerSVGElement)||(c=this.addText(b.x,b.y,e))}mxGraph.prototype.dblClick.call(this,a,c)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),c=this.container.scrollLeft/this.view.scale-this.view.translate.x,b=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var e=this.getPageLayout(),d=this.getPageSize(),c=Math.max(c,e.x*d.width),b=Math.max(b,e.y*d.height);return new mxPoint(this.snap(c+a),this.snap(b+a))};
-Graph.prototype.getFreeInsertPoint=function(){var a=this.view,c=this.getGraphBounds(),b=this.getInsertPoint(),e=this.snap(Math.round(Math.max(b.x,c.x/a.scale-a.translate.x+(0==c.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(b.y,(c.y+c.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(e,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,c,b){var e=new mxCell;e.value="Text";e.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";
-e.geometry=new mxGeometry(0,0,0,0);e.vertex=!0;if(null!=b){e.style+=";labelBackgroundColor=#ffffff;";e.geometry.relative=!0;e.connectable=!1;var d=this.view.getRelativePoint(b,a,c);e.geometry.x=Math.round(1E4*d.x)/1E4;e.geometry.y=Math.round(d.y);e.geometry.offset=new mxPoint(0,0);var d=this.view.getPoint(b,e.geometry),k=this.view.scale;e.geometry.offset=new mxPoint(Math.round((a-d.x)/k),Math.round((c-d.y)/k))}else e.style+=";autosize=1;",d=this.view.translate,e.geometry.width=40,e.geometry.height=
-20,e.geometry.x=Math.round(a/this.view.scale)-d.x,e.geometry.y=Math.round(c/this.view.scale)-d.y;this.getModel().beginUpdate();try{this.addCells([e],null!=b?b.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[e])),this.autoSizeCell(e)}finally{this.getModel().endUpdate()}return e};Graph.prototype.addClickHandler=function(a,c,b){var e=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var b=0;b<a.length;b++){var e=this.getAbsoluteUrl(a[b].getAttribute("href"));
-null!=e&&(a[b].setAttribute("rel",this.linkRelation),a[b].setAttribute("href",e),null!=c&&mxEvent.addGestureListeners(a[b],null,null,c))}});this.model.addListener(mxEvent.CHANGE,e);e();var d=this.container.style.cursor,k=this.getTolerance(),g=this,f={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var c=a.sourceState;if(null==c||null==g.getLinkForCell(c.cell))a=
+mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=c&&(c.width+=10,c.height+=4,this.gridEnabled&&(c.width=this.snap(c.width),c.height=this.snap(c.height)));return c};Graph.prototype.turnShapes=function(a){var c=this.getModel(),b=[];c.beginUpdate();try{for(var d=0;d<a.length;d++){var f=a[d];if(c.isEdge(f)){var e=c.getTerminal(f,!0),g=c.getTerminal(f,!1);c.setTerminal(f,g,!0);c.setTerminal(f,e,!1);var l=c.getGeometry(f);if(null!=l){l=l.clone();null!=l.points&&l.points.reverse();var n=
+l.getTerminalPoint(!0),v=l.getTerminalPoint(!1);l.setTerminalPoint(n,!1);l.setTerminalPoint(v,!0);c.setGeometry(f,l);var t=this.view.getState(f),q=this.view.getState(e),y=this.view.getState(g);if(null!=t){var k=null!=q?this.getConnectionConstraint(t,q,!0):null,A=null!=y?this.getConnectionConstraint(t,y,!1):null;this.setConnectionConstraint(f,e,!0,A);this.setConnectionConstraint(f,g,!1,k)}b.push(f)}}else if(c.isVertex(f)&&(l=this.getCellGeometry(f),null!=l)){l=l.clone();l.x+=l.width/2-l.height/2;l.y+=
+l.height/2-l.width/2;var C=l.width;l.width=l.height;l.height=C;c.setGeometry(f,l);var z=this.view.getState(f);if(null!=z){var H=z.style[mxConstants.STYLE_DIRECTION]||"east";"east"==H?H="south":"south"==H?H="west":"west"==H?H="north":"north"==H&&(H="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,H,[f])}b.push(f)}}}finally{c.endUpdate()}return b};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;
+a=a.nextSibling}return!1};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var c=this.model.getDescendants(a.cell);if(0<c.length)for(var b=0;b<c.length;b++){var f=this.view.getState(c[b]);null!=f&&null!=f.shape&&null!=f.shape.stencil&&this.stencilHasPlaceholders(f.shape.stencil)?this.removeStateForCell(c[b]):this.isReplacePlaceholders(c[b])&&this.view.invalidate(c[b],
+!1,!1)}}};Graph.prototype.replaceElement=function(a,c){for(var b=a.ownerDocument.createElement(null!=c?c:"span"),f=Array.prototype.slice.call(a.attributes);attr=f.pop();)b.setAttribute(attr.nodeName,attr.nodeValue);b.innerHTML=a.innerHTML;a.parentNode.replaceChild(b,a)};Graph.prototype.processElements=function(a,c){for(var b=a.getElementsByTagName("*"),f=0;f<b.length;f++)c(b[f])};Graph.prototype.updateLabelElements=function(a,c,b){a=null!=a?a:this.getSelectionCells();for(var f=document.createElement("div"),
+d=0;d<a.length;d++)if(this.isHtmlLabel(a[d])){var e=this.convertValueToString(a[d]);if(null!=e&&0<e.length){f.innerHTML=e;for(var g=f.getElementsByTagName(null!=b?b:"*"),l=0;l<g.length;l++)c(g[l]);f.innerHTML!=e&&this.cellLabelChanged(a[d],f.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,c,b){c=Graph.zapGremlins(c);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var f=a.getAttribute("placeholder"),
+d=a;null!=d;){if(d==this.model.getRoot()||null!=d.value&&"object"==typeof d.value&&d.hasAttribute(f)){this.setAttributeForCell(d,f,c);break}d=this.model.getParent(d)}var e=a.value.cloneNode(!0);e.setAttribute("label",c);c=e}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var c=new mxDictionary,b=0;b<a.length;b++)c.put(a[b],!0);for(var f=[],b=0;b<a.length;b++){var d=this.model.getParent(a[b]);null==d||
+c.get(d)||(c.put(d,!0),f.push(d))}for(b=0;b<f.length;b++)if(d=this.view.getState(f[b]),null!=d&&(this.model.isEdge(d.cell)||this.model.isVertex(d.cell))&&this.isCellDeletable(d.cell)){var e=mxUtils.getValue(d.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),g=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);if(e==mxConstants.NONE&&g==mxConstants.NONE){e=!0;for(g=0;g<this.model.getChildCount(d.cell)&&e;g++)c.get(this.model.getChildAt(d.cell,g))||(e=!1);e&&a.push(d.cell)}}}mxGraph.prototype.cellsRemoved.apply(this,
+arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var c=[],b=0;b<a.length;b++)if(this.isCellDeletable(a[b])){var f=this.view.getState(a[b]);if(null!=f){var d=mxUtils.getValue(f.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),f=mxUtils.getValue(f.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);d==mxConstants.NONE&&f==mxConstants.NONE&&c.push(a[b])}}a=c;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,c){this.setAttributeForCell(a,
+"link",c)};Graph.prototype.setTooltipForCell=function(a,c){this.setAttributeForCell(a,"tooltip",c)};Graph.prototype.getAttributeForCell=function(a,c,b){return null!=a.value&&"object"===typeof a.value?a.value.getAttribute(c)||b:b};Graph.prototype.setAttributeForCell=function(a,c,b){var f;null!=a.value&&"object"==typeof a.value?f=a.value.cloneNode(!0):(f=mxUtils.createXmlDocument().createElement("UserObject"),f.setAttribute("label",a.value||""));null!=b?f.setAttribute(c,b):f.removeAttribute(c);this.model.setValue(a,
+f)};Graph.prototype.getDropTarget=function(a,c,b,f){this.getModel();if(mxEvent.isAltDown(c))return null;for(var d=0;d<a.length;d++)if(this.model.isEdge(this.model.getParent(a[d])))return null;return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,c){if(this.isEnabled()){var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),
+mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(c)){var f=this.model.isEdge(c)?this.view.getState(c):null,d=mxEvent.getSource(a);this.firstClickState!=f||this.firstClickSource!=d||null!=f&&null!=f.text&&null!=f.text.node&&null!=f.text.boundingBox&&(mxUtils.contains(f.text.boundingBox,b.x,b.y)||mxUtils.isAncestorNode(f.text.node,mxEvent.getSource(a)))||(null!=f||this.isCellLocked(this.getDefaultParent()))&&(null==f||this.isCellLocked(f.cell))||!(null!=f||mxClient.IS_VML&&d==this.view.getCanvas()||
+mxClient.IS_SVG&&d==this.view.getCanvas().ownerSVGElement)||(c=this.addText(b.x,b.y,f))}mxGraph.prototype.dblClick.call(this,a,c)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),c=this.container.scrollLeft/this.view.scale-this.view.translate.x,b=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var f=this.getPageLayout(),d=this.getPageSize(),c=Math.max(c,f.x*d.width),b=Math.max(b,f.y*d.height);return new mxPoint(this.snap(c+a),this.snap(b+a))};
+Graph.prototype.getFreeInsertPoint=function(){var a=this.view,c=this.getGraphBounds(),b=this.getInsertPoint(),f=this.snap(Math.round(Math.max(b.x,c.x/a.scale-a.translate.x+(0==c.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(b.y,(c.y+c.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(f,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,c,b){var f=new mxCell;f.value="Text";f.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";
+f.geometry=new mxGeometry(0,0,0,0);f.vertex=!0;if(null!=b){f.style+=";labelBackgroundColor=#ffffff;";f.geometry.relative=!0;f.connectable=!1;var d=this.view.getRelativePoint(b,a,c);f.geometry.x=Math.round(1E4*d.x)/1E4;f.geometry.y=Math.round(d.y);f.geometry.offset=new mxPoint(0,0);var d=this.view.getPoint(b,f.geometry),e=this.view.scale;f.geometry.offset=new mxPoint(Math.round((a-d.x)/e),Math.round((c-d.y)/e))}else f.style+=";autosize=1;",d=this.view.translate,f.geometry.width=40,f.geometry.height=
+20,f.geometry.x=Math.round(a/this.view.scale)-d.x,f.geometry.y=Math.round(c/this.view.scale)-d.y;this.getModel().beginUpdate();try{this.addCells([f],null!=b?b.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[f])),this.autoSizeCell(f)}finally{this.getModel().endUpdate()}return f};Graph.prototype.addClickHandler=function(a,c,b){var f=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var b=0;b<a.length;b++){var f=this.getAbsoluteUrl(a[b].getAttribute("href"));
+null!=f&&(a[b].setAttribute("rel",this.linkRelation),a[b].setAttribute("href",f),null!=c&&mxEvent.addGestureListeners(a[b],null,null,c))}});this.model.addListener(mxEvent.CHANGE,f);f();var d=this.container.style.cursor,e=this.getTolerance(),g=this,l={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var c=a.sourceState;if(null==c||null==g.getLinkForCell(c.cell))a=
g.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,function(a,c,b){return null==g.getLinkForCell(a.cell)}),c=g.view.getState(a);c!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=c,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor=
-"move");this.updateCurrentState(c)},mouseMove:function(a,c){if(g.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-c.getGraphX()),e=Math.abs(this.startY-c.getGraphY());(b>k||e>k)&&this.clear()}}else{for(b=c.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null!=g.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&g.tooltipHandler.reset(c,!0,this.currentState),(null==this.currentState||c.getState()!=this.currentState&&null!=c.sourceState||
-!g.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c))}},mouseUp:function(a,e){for(var d=e.getSource(),f=e.getEvent();null!=d&&"a"!=d.nodeName.toLowerCase();)d=d.parentNode;null==d&&Math.abs(this.scrollLeft-g.container.scrollLeft)<k&&Math.abs(this.scrollTop-g.container.scrollTop)<k&&(null==e.sourceState||!e.isSource(e.sourceState.control))&&((mxEvent.isLeftMouseButton(f)||mxEvent.isMiddleMouseButton(f))&&!mxEvent.isPopupTrigger(f)||mxEvent.isTouchEvent(f))&&(null!=
-this.currentLink?(d=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&d||null==c||c(f,this.currentLink),mxEvent.isConsumed(f)||(f=mxEvent.isMiddleMouseButton(f)?"_blank":d?g.linkTarget:"_top",g.openLink(this.currentLink,f),e.consume())):null!=b&&!e.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<k&&Math.abs(this.scrollTop-g.container.scrollTop)<k&&Math.abs(this.startX-e.getGraphX())<k&&Math.abs(this.startY-e.getGraphY())<k&&b(e.getEvent()));this.clear()},activate:function(a){this.currentLink=
-g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=d);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(f);mxEvent.addListener(document,"mouseleave",function(a){f.clear()})};Graph.prototype.duplicateCells=function(a,
-c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),e=this.gridSize,d=[];b.beginUpdate();try{for(var k=this.cloneCells(a,!1,null,!0),g=0;g<a.length;g++){var f=b.getParent(a[g]),n=this.moveCells([k[g]],e,e,!1)[0];d.push(n);if(c)b.add(f,k[g]);else{var z=f.getIndex(a[g]);b.add(f,k[g],z+1)}}}finally{b.endUpdate()}return d};Graph.prototype.insertImage=function(a,c,b){if(null!=a&&null!=this.cellEditor.textarea){for(var e=this.cellEditor.textarea.getElementsByTagName("img"),
-d=[],k=0;k<e.length;k++)d.push(e[k]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==d.length+1)for(k=a.length-1;0<=k;k--)if(0==k||a[k]!=d[k-1]){a[k].setAttribute("width",c);a[k].setAttribute("height",b);break}}};Graph.prototype.insertLink=function(a){if(null!=this.cellEditor.textarea)if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var c=this.cellEditor.textarea.getElementsByTagName("a"),b=[],e=0;e<c.length;e++)b.push(c[e]);
-document.execCommand("createlink",!1,mxUtils.trim(a));c=this.cellEditor.textarea.getElementsByTagName("a");if(c.length==b.length+1)for(e=c.length-1;0<=e;e--)if(c[e]!=b[e-1]){for(c=c[e].getElementsByTagName("a");0<c.length;){for(b=c[0].parentNode;null!=c[0].firstChild;)b.insertBefore(c[0].firstChild,c[0]);b.removeChild(c[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var c=mxGraph.prototype.isCellResizable.apply(this,arguments),b=
-this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return c||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var b=[],e=null,d=null,k=0;k<c.length;k++)if(this.getModel().isVertex(c[k])){var g=this.view.getState(c[k]);if(null!=g){var f=a?g.getCenterX():g.getCenterY(),e=null!=e?Math.max(e,f):f,d=null!=d?Math.min(d,f):f;b.push(g)}}if(2<
-b.length){b.sort(function(c,b){return a?c.x-b.x:c.y-b.y});g=this.view.translate;f=this.view.scale;d=d/f-(a?g.x:g.y);e=e/f-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var n=(e-d)/(b.length-1),e=d,k=1;k<b.length-1;k++){var z=this.view.getState(this.model.getParent(b[k].cell)),q=this.getCellGeometry(b[k].cell),e=e+n;null!=q&&null!=z&&(q=q.clone(),a?q.x=Math.round(e-q.width/2)-z.origin.x:q.y=Math.round(e-q.height/2)-z.origin.y,this.getModel().setGeometry(b[k].cell,q))}}finally{this.getModel().endUpdate()}}}return c};
-Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,c,b,e,d,k,g,f,n,z){var q=this.useCssTransforms;q&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{c=null!=c?c:1;b=null!=b?b:0;d=null!=d?d:!0;k=null!=k?k:
-!0;g=null!=g?g:!0;var t=k||e?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==t)throw Error(mxResources.get("drawingEmpty"));var x=this.view.scale,l=mxUtils.createXmlDocument(),C=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"svg"):l.createElement("svg");null!=a&&(null!=C.style?C.style.backgroundColor=a:C.setAttribute("style","background-color:"+a));null==l.createElementNS?(C.setAttribute("xmlns",mxConstants.NS_SVG),C.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):
-C.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/x;var A=Math.max(1,Math.ceil(t.width*a)+2*b)+(z?5:0),y=Math.max(1,Math.ceil(t.height*a)+2*b)+(z?5:0);C.setAttribute("version","1.1");C.setAttribute("width",A+"px");C.setAttribute("height",y+"px");C.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+" "+A+" "+y);l.appendChild(C);var L=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g");C.appendChild(L);var m=this.createSvgCanvas(L);
-m.foOffset=d?-.5:0;m.textOffset=d?-.5:0;m.imageOffset=d?-.5:0;m.translate(Math.floor((b/c-t.x)/x),Math.floor((b/c-t.y)/x));var u=document.createElement("textarea"),I=m.createAlternateContent;m.createAlternateContent=function(a,c,b,e,d,k,g,f,n,z,q,t,x){var l=this.state;if(null!=this.foAltText&&(0==e||0!=l.fontSize&&k.length<5*e/l.fontSize)){var C=this.createElement("text");C.setAttribute("x",Math.round(e/2));C.setAttribute("y",Math.round((d+l.fontSize)/2));C.setAttribute("fill",l.fontColor||"black");
-C.setAttribute("text-anchor","middle");C.setAttribute("font-size",Math.round(l.fontSize)+"px");C.setAttribute("font-family",l.fontFamily);(l.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&C.setAttribute("font-weight","bold");(l.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&C.setAttribute("font-style","italic");(l.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&C.setAttribute("text-decoration","underline");try{return u.innerHTML=k,C.textContent=u.value,C}catch(qa){return I.apply(this,
-arguments)}}else return I.apply(this,arguments)};var p=this.backgroundImage;if(null!=p){c=x/c;var O=this.view.translate,K=new mxRectangle(O.x*c,O.y*c,p.width*c,p.height*c);mxUtils.intersects(t,K)&&m.image(O.x,O.y,p.width,p.height,p.src,!0)}m.scale(a);m.textEnabled=g;f=null!=f?f:this.createSvgImageExport();var E=f.drawCellState,S=f.getLinkForCellState;f.getLinkForCellState=function(a,c){var b=S.apply(this,arguments);return null==b||a.view.graph.isCustomLink(b)?null:b};f.drawCellState=function(a,c){for(var b=
-a.view.graph,e=b.isCellSelected(a.cell),d=b.model.getParent(a.cell);!k&&!e&&null!=d;)e=b.isCellSelected(d),d=b.model.getParent(d);(k||e)&&E.apply(this,arguments)};f.drawState(this.getView().getState(this.model.root),m);this.updateSvgLinks(C,n,!0);return C}finally{q&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,c,b){a=a.getElementsByTagName("a");for(var e=0;e<a.length;e++){var d=a[e].getAttribute("href");null==d&&(d=a[e].getAttribute("xlink:href"));
-null!=d&&(null!=c&&/^https?:\/\//.test(d)?a[e].setAttribute("target",c):b&&this.isCustomLink(d)&&a[e].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var c=window.getSelection();c.getRangeAt&&c.rangeCount&&(a=c.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());
+"move");this.updateCurrentState(c)},mouseMove:function(a,c){if(g.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-c.getGraphX()),f=Math.abs(this.startY-c.getGraphY());(b>e||f>e)&&this.clear()}}else{for(b=c.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null!=g.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&g.tooltipHandler.reset(c,!0,this.currentState),(null==this.currentState||c.getState()!=this.currentState&&null!=c.sourceState||
+!g.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c))}},mouseUp:function(a,f){for(var d=f.getSource(),l=f.getEvent();null!=d&&"a"!=d.nodeName.toLowerCase();)d=d.parentNode;null==d&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&(null==f.sourceState||!f.isSource(f.sourceState.control))&&((mxEvent.isLeftMouseButton(l)||mxEvent.isMiddleMouseButton(l))&&!mxEvent.isPopupTrigger(l)||mxEvent.isTouchEvent(l))&&(null!=
+this.currentLink?(d=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&d||null==c||c(l,this.currentLink),mxEvent.isConsumed(l)||(l=mxEvent.isMiddleMouseButton(l)?"_blank":d?g.linkTarget:"_top",g.openLink(this.currentLink,l),f.consume())):null!=b&&!f.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&Math.abs(this.startX-f.getGraphX())<e&&Math.abs(this.startY-f.getGraphY())<e&&b(f.getEvent()));this.clear()},activate:function(a){this.currentLink=
+g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=d);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(l);mxEvent.addListener(document,"mouseleave",function(a){l.clear()})};Graph.prototype.duplicateCells=function(a,
+c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),f=this.gridSize,d=[];b.beginUpdate();try{for(var e=this.cloneCells(a,!1,null,!0),g=0;g<a.length;g++){var l=b.getParent(a[g]),n=this.moveCells([e[g]],f,f,!1)[0];d.push(n);if(c)b.add(l,e[g]);else{var v=l.getIndex(a[g]);b.add(l,e[g],v+1)}}}finally{b.endUpdate()}return d};Graph.prototype.insertImage=function(a,c,b){if(null!=a&&null!=this.cellEditor.textarea){for(var f=this.cellEditor.textarea.getElementsByTagName("img"),
+d=[],e=0;e<f.length;e++)d.push(f[e]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==d.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=d[e-1]){a[e].setAttribute("width",c);a[e].setAttribute("height",b);break}}};Graph.prototype.insertLink=function(a){if(null!=this.cellEditor.textarea)if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var c=this.cellEditor.textarea.getElementsByTagName("a"),b=[],f=0;f<c.length;f++)b.push(c[f]);
+document.execCommand("createlink",!1,mxUtils.trim(a));c=this.cellEditor.textarea.getElementsByTagName("a");if(c.length==b.length+1)for(f=c.length-1;0<=f;f--)if(c[f]!=b[f-1]){for(c=c[f].getElementsByTagName("a");0<c.length;){for(b=c[0].parentNode;null!=c[0].firstChild;)b.insertBefore(c[0].firstChild,c[0]);b.removeChild(c[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var c=mxGraph.prototype.isCellResizable.apply(this,arguments),b=
+this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return c||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var b=[],f=null,d=null,e=0;e<c.length;e++)if(this.getModel().isVertex(c[e])){var g=this.view.getState(c[e]);if(null!=g){var l=a?g.getCenterX():g.getCenterY(),f=null!=f?Math.max(f,l):l,d=null!=d?Math.min(d,l):l;b.push(g)}}if(2<
+b.length){b.sort(function(c,b){return a?c.x-b.x:c.y-b.y});g=this.view.translate;l=this.view.scale;d=d/l-(a?g.x:g.y);f=f/l-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var n=(f-d)/(b.length-1),f=d,e=1;e<b.length-1;e++){var v=this.view.getState(this.model.getParent(b[e].cell)),t=this.getCellGeometry(b[e].cell),f=f+n;null!=t&&null!=v&&(t=t.clone(),a?t.x=Math.round(f-t.width/2)-v.origin.x:t.y=Math.round(f-t.height/2)-v.origin.y,this.getModel().setGeometry(b[e].cell,t))}}finally{this.getModel().endUpdate()}}}return c};
+Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,c,b,f,d,e,g,l,n,v){var t=this.useCssTransforms;t&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{c=null!=c?c:1;b=null!=b?b:0;d=null!=d?d:!0;e=null!=e?e:
+!0;g=null!=g?g:!0;var q=e||f?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==q)throw Error(mxResources.get("drawingEmpty"));var y=this.view.scale,k=mxUtils.createXmlDocument(),A=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"svg"):k.createElement("svg");null!=a&&(null!=A.style?A.style.backgroundColor=a:A.setAttribute("style","background-color:"+a));null==k.createElementNS?(A.setAttribute("xmlns",mxConstants.NS_SVG),A.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):
+A.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/y;var C=Math.max(1,Math.ceil(q.width*a)+2*b)+(v?5:0),z=Math.max(1,Math.ceil(q.height*a)+2*b)+(v?5:0);A.setAttribute("version","1.1");A.setAttribute("width",C+"px");A.setAttribute("height",z+"px");A.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+" "+C+" "+z);k.appendChild(A);var H=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"g"):k.createElement("g");A.appendChild(H);var m=this.createSvgCanvas(H);
+m.foOffset=d?-.5:0;m.textOffset=d?-.5:0;m.imageOffset=d?-.5:0;m.translate(Math.floor((b/c-q.x)/y),Math.floor((b/c-q.y)/y));var u=document.createElement("textarea"),J=m.createAlternateContent;m.createAlternateContent=function(a,c,b,f,d,e,g,l,n,v,t,q,y){var k=this.state;if(null!=this.foAltText&&(0==f||0!=k.fontSize&&e.length<5*f/k.fontSize)){var A=this.createElement("text");A.setAttribute("x",Math.round(f/2));A.setAttribute("y",Math.round((d+k.fontSize)/2));A.setAttribute("fill",k.fontColor||"black");
+A.setAttribute("text-anchor","middle");A.setAttribute("font-size",Math.round(k.fontSize)+"px");A.setAttribute("font-family",k.fontFamily);(k.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&A.setAttribute("font-weight","bold");(k.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&A.setAttribute("font-style","italic");(k.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&A.setAttribute("text-decoration","underline");try{return u.innerHTML=e,A.textContent=u.value,A}catch(Ea){return J.apply(this,
+arguments)}}else return J.apply(this,arguments)};var M=this.backgroundImage;if(null!=M){c=y/c;var p=this.view.translate,K=new mxRectangle(p.x*c,p.y*c,M.width*c,M.height*c);mxUtils.intersects(q,K)&&m.image(p.x,p.y,M.width,M.height,M.src,!0)}m.scale(a);m.textEnabled=g;l=null!=l?l:this.createSvgImageExport();var G=l.drawCellState,D=l.getLinkForCellState;l.getLinkForCellState=function(a,c){var b=D.apply(this,arguments);return null==b||a.view.graph.isCustomLink(b)?null:b};l.drawCellState=function(a,c){for(var b=
+a.view.graph,f=b.isCellSelected(a.cell),d=b.model.getParent(a.cell);!e&&!f&&null!=d;)f=b.isCellSelected(d),d=b.model.getParent(d);(e||f)&&G.apply(this,arguments)};l.drawState(this.getView().getState(this.model.root),m);this.updateSvgLinks(A,n,!0);return A}finally{t&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,c,b){a=a.getElementsByTagName("a");for(var f=0;f<a.length;f++){var d=a[f].getAttribute("href");null==d&&(d=a[f].getAttribute("xlink:href"));
+null!=d&&(null!=c&&/^https?:\/\//.test(d)?a[f].setAttribute("target",c):b&&this.isCustomLink(d)&&a[f].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var c=window.getSelection();c.getRangeAt&&c.rangeCount&&(a=c.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());
return a};Graph.prototype.getParentByName=function(a,c,b){for(;null!=a&&a.nodeName!=c;){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,c,b){for(;null!=a&&!(0<=mxUtils.indexOf(c,a.nodeName));){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var c=null;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){var b=document.createRange();b.selectNode(a);c.removeAllRanges();c.addRange(b)}}else(c=document.selection)&&
-"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),b=c.createRange(),b.setEndPoint("StartToStart",a),b.select())};Graph.prototype.insertRow=function(a,c){for(var b=a.tBodies[0],e=b.rows[0].cells,d=0,k=0;k<e.length;k++)var g=e[k].getAttribute("colspan"),d=d+(null!=g?parseInt(g):1);b=b.insertRow(c);for(k=0;k<d;k++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=function(a,c){var b=a.tHead;if(null!=b)for(var e=
-0;e<b.rows.length;e++){var d=document.createElement("th");b.rows[e].appendChild(d);mxUtils.br(d)}b=a.tBodies[0];for(e=0;e<b.rows.length;e++)d=b.rows[e].insertCell(c),mxUtils.br(d);return b.rows[0].cells[0<=c?c:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,c){if(0<=c)for(var b=a.tBodies[0].rows,e=0;e<b.length;e++)b[e].cells.length>c&&b[e].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=function(a){var c;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){c=
-c.getRangeAt(0);c.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var e;e=b.firstChild;)lastNode=a.appendChild(e);c.insertNode(a)}}else(c=document.selection)&&"Control"!=c.type&&c.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,c){function b(a,c){a.length>c&&(a=a.substring(0,Math.round(c/2))+"..."+a.substring(a.length-Math.round(c/4)));return a}a=null!=a?a:"javascript:void(0);";if(null==c||0==c.length)c=this.isCustomLink(a)?
-this.getLinkTitle(a):a;var e=document.createElement("a");e.setAttribute("rel",this.linkRelation);e.setAttribute("href",this.getAbsoluteUrl(a));e.setAttribute("title",b(this.isCustomLink(a)?this.getLinkTitle(a):a,80));null!=this.linkTarget&&e.setAttribute("target",this.linkTarget);mxUtils.write(e,b(c,40));this.isCustomLink(a)&&mxEvent.addListener(e,"click",mxUtils.bind(this,function(c){this.customLinkClicked(a);mxEvent.consume(c)}));return e};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=
+"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),b=c.createRange(),b.setEndPoint("StartToStart",a),b.select())};Graph.prototype.insertRow=function(a,c){for(var b=a.tBodies[0],f=b.rows[0].cells,d=0,e=0;e<f.length;e++)var g=f[e].getAttribute("colspan"),d=d+(null!=g?parseInt(g):1);b=b.insertRow(c);for(e=0;e<d;e++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=function(a,c){var b=a.tHead;if(null!=b)for(var f=
+0;f<b.rows.length;f++){var d=document.createElement("th");b.rows[f].appendChild(d);mxUtils.br(d)}b=a.tBodies[0];for(f=0;f<b.rows.length;f++)d=b.rows[f].insertCell(c),mxUtils.br(d);return b.rows[0].cells[0<=c?c:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,c){if(0<=c)for(var b=a.tBodies[0].rows,f=0;f<b.length;f++)b[f].cells.length>c&&b[f].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=function(a){var c;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){c=
+c.getRangeAt(0);c.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var f;f=b.firstChild;)lastNode=a.appendChild(f);c.insertNode(a)}}else(c=document.selection)&&"Control"!=c.type&&c.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,c){function b(a,c){a.length>c&&(a=a.substring(0,Math.round(c/2))+"..."+a.substring(a.length-Math.round(c/4)));return a}a=null!=a?a:"javascript:void(0);";if(null==c||0==c.length)c=this.isCustomLink(a)?
+this.getLinkTitle(a):a;var f=document.createElement("a");f.setAttribute("rel",this.linkRelation);f.setAttribute("href",this.getAbsoluteUrl(a));f.setAttribute("title",b(this.isCustomLink(a)?this.getLinkTitle(a):a,80));null!=this.linkTarget&&f.setAttribute("target",this.linkTarget);mxUtils.write(f,b(c,40));this.isCustomLink(a)&&mxEvent.addListener(f,"click",mxUtils.bind(this,function(c){this.customLinkClicked(a);mxEvent.consume(c)}));return f};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=
function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,c){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(c){c=a.apply(this,arguments);if(mxEvent.isTouchEvent(c.getEvent())&&null==c.getState()){var b=this.getCellAt(c.graphX,c.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,c.graphX,c.graphY)||(c.state=this.view.getState(b),null!=c.state&&null!=c.state.shape&&(this.container.style.cursor=
-c.state.shape.node.style.cursor))}null==c.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return c};var c=!1,b=!1,e=!1,d=this.fireMouseEvent;this.fireMouseEvent=function(a,k,g){a==mxEvent.MOUSE_DOWN&&(k=this.updateMouseEvent(k),c=this.isCellSelected(k.getCell()),b=this.isSelectionEmpty(),e=this.popupMenuHandler.isMenuShowing());d.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,d){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&
-(null==d.getState()||!d.isSource(d.getState().control))&&(this.popupMenuHandler.popupTrigger||!e&&!mxEvent.isMouseEvent(d.getEvent())&&(b&&null==d.getCell()&&this.isSelectionEmpty()||c&&this.isCellSelected(d.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),
-"TABLE",this.textarea)};mxCellEditor.prototype.alignText=function(a,c){!this.isTableSelected()==(null==c||!mxEvent.isShiftDown(c))&&(this.graph.cellEditor.setAlign(a),this.graph.processElements(this.textarea,function(a){a.removeAttribute("align");a.style.textAlign=null}));document.execCommand("justify"+a.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var c=[],b=0,e=a.rangeCount;b<e;++b)c.push(a.getRangeAt(b));
-return c}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var c=0,b=a.length;c<b;++c)sel.addRange(a[c])}else document.selection&&a.select&&a.select()}catch(W){}};var p=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds=
-"0"!=mxUtils.getValue(a.style,"nl2Br","1"));p.apply(this,arguments)};var u=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?u.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var v=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=
-function(a,c){v.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),e=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=e&&e.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=
-mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var B=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function c(a,b){b.originalNode=a;a=a.firstChild;for(var e=b.firstChild;null!=a&&null!=e;)c(a,e),a=a.nextSibling,e=e.nextSibling;return b}function b(a,c){if(null!=a)if(c.originalNode!=a)e(a);else for(a=a.firstChild,c=c.firstChild;null!=
-a;){var d=a.nextSibling;null==c?e(a):(b(a,c),c=c.nextSibling);a=d}}function e(a){for(var c=a.firstChild;null!=c;){var b=c.nextSibling;e(c);c=b}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),
-a.removeAttribute("border"))):a.parentNode.removeChild(a)}B.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var e=c(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]>"))&&b(this.textarea,e)}),0)}))};mxCellEditor.prototype.toggleViewMode=
-function(){var a=this.graph.view.getState(this.editingCell);if(null!=a){var c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){f=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<f.length&&"\n"==f.charAt(f.length-1)&&(f=f.substring(0,f.length-1));f=this.graph.sanitizeHtml(c?f.replace(/\n/g,"<br/>"):f,!0);this.textarea.className="mxCellEditor geContentEditable";var e=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),
-c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),d=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),k=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=
-mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(e*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(e)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=k?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=d;this.textarea.style.padding="0px";this.textarea.innerHTML!=f&&(this.textarea.innerHTML=f,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 f=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(f=mxUtils.replaceTrailingNewlines(f,"<div><br></div>"));f=this.graph.sanitizeHtml(c?f.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):f,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";
-var e=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(e*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(e)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=f&&(this.textarea.innerHTML=
-f);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()}};var c=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var e=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*e;this.bounds.height=
-60*e;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=d.x*this.bounds.width;this.bounds.y+=d.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/e)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/e)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<
-this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/e)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*e);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/e)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*e);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=
-Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=e:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+e+","+e+")")}else this.textarea.style.height="",this.textarea.style.overflow="",c.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,c){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell,
+c.state.shape.node.style.cursor))}null==c.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return c};var c=!1,b=!1,f=!1,d=this.fireMouseEvent;this.fireMouseEvent=function(a,e,g){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),c=this.isCellSelected(e.getCell()),b=this.isSelectionEmpty(),f=this.popupMenuHandler.isMenuShowing());d.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,d){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&
+(null==d.getState()||!d.isSource(d.getState().control))&&(this.popupMenuHandler.popupTrigger||!f&&!mxEvent.isMouseEvent(d.getEvent())&&(b&&null==d.getCell()&&this.isSelectionEmpty()||c&&this.isCellSelected(d.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),
+"TABLE",this.textarea)};mxCellEditor.prototype.alignText=function(a,c){!this.isTableSelected()==(null==c||!mxEvent.isShiftDown(c))&&(this.graph.cellEditor.setAlign(a),this.graph.processElements(this.textarea,function(a){a.removeAttribute("align");a.style.textAlign=null}));document.execCommand("justify"+a.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var c=[],b=0,f=a.rangeCount;b<f;++b)c.push(a.getRangeAt(b));
+return c}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var c=0,b=a.length;c<b;++c)sel.addRange(a[c])}else document.selection&&a.select&&a.select()}catch(T){}};var p=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds=
+"0"!=mxUtils.getValue(a.style,"nl2Br","1"));p.apply(this,arguments)};var u=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?u.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var x=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=
+function(a,c){x.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),f=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=f&&f.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=
+mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var B=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function c(a,b){b.originalNode=a;a=a.firstChild;for(var f=b.firstChild;null!=a&&null!=f;)c(a,f),a=a.nextSibling,f=f.nextSibling;return b}function b(a,c){if(null!=a)if(c.originalNode!=a)f(a);else for(a=a.firstChild,c=c.firstChild;null!=
+a;){var d=a.nextSibling;null==c?f(a):(b(a,c),c=c.nextSibling);a=d}}function f(a){for(var c=a.firstChild;null!=c;){var b=c.nextSibling;f(c);c=b}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),
+a.removeAttribute("border"))):a.parentNode.removeChild(a)}B.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var f=c(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]>"))&&b(this.textarea,f)}),0)}))};mxCellEditor.prototype.toggleViewMode=
+function(){var a=this.graph.view.getState(this.editingCell);if(null!=a){var c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){l=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<l.length&&"\n"==l.charAt(l.length-1)&&(l=l.substring(0,l.length-1));l=this.graph.sanitizeHtml(c?l.replace(/\n/g,"<br/>"):l,!0);this.textarea.className="mxCellEditor geContentEditable";var f=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),
+c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),d=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=
+mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(f*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(f)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=d;this.textarea.style.padding="0px";this.textarea.innerHTML!=l&&(this.textarea.innerHTML=l,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 l=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(l=mxUtils.replaceTrailingNewlines(l,"<div><br></div>"));l=this.graph.sanitizeHtml(c?l.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):l,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";
+var f=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(f*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(f)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=l&&(this.textarea.innerHTML=
+l);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()}};var c=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var f=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*f;this.bounds.height=
+60*f;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=d.x*this.bounds.width;this.bounds.y+=d.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/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";mxClient.IS_VML?this.textarea.style.zoom=f:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+f+","+f+")")}else this.textarea.style.height="",this.textarea.style.overflow="",c.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,c){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell,
c);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var c=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return c="1"==mxUtils.getValue(a.style,"nl2Br","1")?c.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):c.replace(/\r\n/g,
-"").replace(/\n/g,"")};var e=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();e.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(Q){}};var k=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,c){this.graph.getModel().beginUpdate();try{if(k.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var b=
-mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),e=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==c&&b==mxConstants.NONE&&e==mxConstants.NONE&&this.graph.removeCells([a.cell],!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var c=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=c&&c!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style,
-mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(c=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null));c==mxConstants.NONE&&(c=null);return c};mxCellEditor.prototype.getMinimumSize=function(a){var c=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*c+20,30)};var q=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,c,b,e,d,k){mxEvent.isAltDown(k)&&(d=null);q.apply(this,arguments)};mxGraphView.prototype.formatUnitText=
-function(a){return a?b(a,this.unit):a};mxGraphHandler.prototype.updateHint=function(c){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var e=this.graph.view.translate,d=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/d-e.x);e=this.roundLength((this.bounds.y+this.currentDy)/d-e.y);d=this.graph.view.unit;this.hint.innerHTML=b(c,d)+", "+b(e,d);this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/
+"").replace(/\n/g,"")};var f=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();f.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(Z){}};var g=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,c){this.graph.getModel().beginUpdate();try{if(g.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var b=
+mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),f=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==c&&b==mxConstants.NONE&&f==mxConstants.NONE&&this.graph.removeCells([a.cell],!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var c=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=c&&c!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style,
+mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(c=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null));c==mxConstants.NONE&&(c=null);return c};mxCellEditor.prototype.getMinimumSize=function(a){var c=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*c+20,30)};var t=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,c,b,f,d,e){mxEvent.isAltDown(e)&&(d=null);t.apply(this,arguments)};mxGraphView.prototype.formatUnitText=
+function(a){return a?b(a,this.unit):a};mxGraphHandler.prototype.updateHint=function(c){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var f=this.graph.view.translate,d=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/d-f.x);f=this.roundLength((this.bounds.y+this.currentDy)/d-f.y);d=this.graph.view.unit;this.hint.innerHTML=b(c,d)+", "+b(f,d);this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/
2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,c){return!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!mxEvent.isControlDown(c.getEvent())&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,
"childLayout",null)};mxVertexHandler.prototype.isCenteredEvent=function(a,c){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(c.getEvent())||mxEvent.isMetaDown(c.getEvent())};var n=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),c=
this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(c/=2,a.x=this.sizers[0].bounds.width+c,a.y=this.sizers[0].bounds.height+c):a=n.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(c){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";
-else{c=this.state.view.scale;var e=this.state.view.unit;this.hint.innerHTML=b(this.roundLength(this.bounds.width/c),e)+" x "+b(this.roundLength(this.bounds.height/c),e)}c=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==c&&(c=this.bounds);this.hint.style.left=c.x+Math.round((c.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=c.y+c.height+12+"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 g=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(a,c){g.apply(this,arguments);null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none")};var x=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=
-function(a,c){x.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(c,e){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var d=this.graph.view.translate,k=this.graph.view.scale,g=this.roundLength(e.x/k-d.x),d=this.roundLength(e.y/k-d.y),k=this.graph.view.unit;this.hint.innerHTML=b(g,k)+", "+b(d,k);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=
-this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(g=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*g.x)+"%, "+Math.round(100*g.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(c.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(c.getGraphY(),e.y)+this.state.view.graph.gridSize+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=
+else{c=this.state.view.scale;var f=this.state.view.unit;this.hint.innerHTML=b(this.roundLength(this.bounds.width/c),f)+" x "+b(this.roundLength(this.bounds.height/c),f)}c=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==c&&(c=this.bounds);this.hint.style.left=c.x+Math.round((c.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=c.y+c.height+12+"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 l=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(a,c){l.apply(this,arguments);null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none")};var y=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=
+function(a,c){y.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(c,f){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var d=this.graph.view.translate,e=this.graph.view.scale,g=this.roundLength(f.x/e-d.x),d=this.roundLength(f.y/e-d.y),e=this.graph.view.unit;this.hint.innerHTML=b(g,e)+", "+b(d,e);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=
+this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(g=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*g.x)+"%, "+Math.round(100*g.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(c.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(c.getGraphY(),f.y)+this.state.view.graph.gridSize+"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(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><path d="m 7 7 L 11 11 M 7 11 L 11 7" stroke="#fff"/>'):new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="9" cy="9" r="2" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+
"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAVCAYAAACkCdXRAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAA6ZJREFUeNqM001IY1cUB/D/fYmm2sbR2lC1zYlgoRG6MpEyBlpxM9iFIGKFIm3s0lCKjOByhCLZCFqLBF1YFVJdSRbdFHRhBbULtRuFVBTzYRpJgo2mY5OX5N9Fo2TG+eiFA/dd3vvd8+65ByTxshARTdf1JySp6/oTEdFe9T5eg5lIcnBwkCSZyWS+exX40oyur68/KxaLf5Okw+H4X+A9JBaLfUySZ2dnnJqaosPhIAACeC34DJRKpb7IZrMcHx+nwWCgUopGo/EOKwf9fn/1CzERUevr6+9ls1mOjIwQAH0+H4PBIKPR6D2ofAQCgToRUeVYJUkuLy8TANfW1kiS8/PzCy84Mw4MDBAAZ2dnmc/nub+/X0MSEBF1cHDwMJVKsaGhgV6vl+l0mqOjo1+KyKfl1dze3l4NBoM/PZ+diFSLiIKIGBOJxA9bW1sEwNXVVSaTyQMRaRaRxrOzs+9J8ujoaE5EPhQRq67rcZ/PRwD0+/3Udf03EdEgIqZisZibnJykwWDg4eEhd3Z2xkXELCJvPpdBrYjUiEhL+Xo4HH4sIhUaAKNSqiIcDsNkMqG+vh6RSOQQQM7tdhsAQCkFAHC73UUATxcWFqypVApmsxnDw8OwWq2TADQNgAYAFosF+XweyWQSdru9BUBxcXFRB/4rEgDcPouIIx6P4+bmBi0tLSCpAzBqAIqnp6c/dnZ2IpfLYXNzE62traMADACKNputpr+/v8lms9UAKAAwiMjXe3t7KBQKqKurQy6Xi6K0i2l6evpROp1mbW0t29vbGY/Hb8/IVIqq2zlJXl1dsaOjg2azmefn5wwEAl+JSBVExCgi75PkzMwMlVJsbGxkIpFgPp8PX15ePopEIs3JZPITXdf/iEajbGpqolKKExMT1HWdHo/nIxGpgIgoEXnQ3d39kCTHxsYIgC6Xi3NzcwyHw8xkMozFYlxaWmJbWxuVUuzt7WUul6PX6/1cRN4WEe2uA0SkaWVl5XGpRVhdXU0A1DSNlZWVdz3qdDrZ09PDWCzG4+Pjn0XEWvp9KJKw2WwKwBsA3gHQHAqFfr24uMDGxgZ2d3cRiUQAAHa7HU6nE319fTg5Ofmlq6vrGwB/AngaCoWK6rbsNptNA1AJoA7Aux6Pp3NoaMhjsVg+QNmIRqO/u1yubwFEASRKUAEA7rASqABUAKgC8KAUb5XWCOAfAFcA/gJwDSB7C93DylCtdM8qABhLc5TumV6KQigUeubjfwcAHkQJ94ndWeYAAAAASUVORK5CYII=":
@@ -2471,239 +2473,240 @@ HoverIcons.prototype.triangleDown.src,(new Image).src=HoverIcons.prototype.trian
function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-24,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=
function(a){var c=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(c)||mxEvent.isPopupTrigger(c)&&(null==a.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))};var A=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,c){A.apply(this,arguments);mxEvent.isTouchEvent(c.getEvent())&&this.graph.isCellSelected(c.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var c=
a.getEvent();return mxEvent.isLeftMouseButton(c)&&(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(c)&&!mxEvent.isShiftDown(c))||this.usePopupTrigger&&mxEvent.isPopupTrigger(c)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.mouseUp=function(a,c){var b=null!=this.div&&"none"!=this.div.style.display,
-e=null,d=null,k=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(e=this.first.x,d=this.first.y,k=(this.currentX-e)/this.graph.view.scale,g=(this.currentY-d)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(k=this.graph.snap(k),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(k)<this.graph.tolerance&&(k=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(b){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var k=new mxRectangle(this.x,
-this.y,this.width,this.height),f=this.graph.getCells(k.x,k.y,k.width,k.height);this.graph.removeSelectionCells(f)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(f=this.graph.getCellsBeyond(e,d,this.graph.getDefaultParent(),!0,!0),b=0;b<f.length;b++)if(this.graph.isCellMovable(f[b])){var n=this.graph.view.getState(f[b]),z=this.graph.getCellGeometry(f[b]);null!=n&&null!=z&&(z=z.clone(),z.translate(k,g),this.graph.model.setGeometry(f[b],z))}}finally{this.graph.model.endUpdate()}}else k=
-new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(k,c.getEvent());c.consume()}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),e=mxUtils.getOffset(this.graph.container);b.x-=e.x;b.y-=e.y;var e=c.getX()+b.x,b=c.getY()+b.y,d=this.first.x-e,k=this.first.y-b,g=this.graph.tolerance;if(null!=this.div||Math.abs(d)>g||Math.abs(k)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),
-this.update(e,b),this.isSpaceEvent(c)?(e=this.x+this.width,b=this.y+this.height,d=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/d)*d,this.height=this.graph.snap(this.height/d)*d,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=e-this.width),this.y<this.first.y&&(this.y=b-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor=
+f=null,d=null,e=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(f=this.first.x,d=this.first.y,e=(this.currentX-f)/this.graph.view.scale,g=(this.currentY-d)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(e=this.graph.snap(e),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(b){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var e=new mxRectangle(this.x,
+this.y,this.width,this.height),l=this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(l)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(l=this.graph.getCellsBeyond(f,d,this.graph.getDefaultParent(),!0,!0),b=0;b<l.length;b++)if(this.graph.isCellMovable(l[b])){var n=this.graph.view.getState(l[b]),v=this.graph.getCellGeometry(l[b]);null!=n&&null!=v&&(v=v.clone(),v.translate(e,g),this.graph.model.setGeometry(l[b],v))}}finally{this.graph.model.endUpdate()}}else e=
+new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(e,c.getEvent());c.consume()}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),f=mxUtils.getOffset(this.graph.container);b.x-=f.x;b.y-=f.y;var f=c.getX()+b.x,b=c.getY()+b.y,d=this.first.x-f,e=this.first.y-b,g=this.graph.tolerance;if(null!=this.div||Math.abs(d)>g||Math.abs(e)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),
+this.update(f,b),this.isSpaceEvent(c)?(f=this.x+this.width,b=this.y+this.height,d=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/d)*d,this.height=this.graph.snap(this.height/d)*d,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=f-this.width),this.y<this.first.y&&(this.y=b-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)),c.consume()}};var t=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
-this.secondDiv=null);t.apply(this,arguments)};var F=(new Date).getTime(),y=0,E=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,e){E.apply(this,arguments);b!=this.currentTerminalState?(F=(new Date).getTime(),y=0):y=(new Date).getTime()-F;this.currentTerminalState=b};var D=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&
-2E3<y||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&D.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,c){var b=null!=a&&0==a,e=this.state.getVisibleTerminalState(b),d=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,
-e,b):null,b=null!=(null!=d?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),d):null)?this.fixedHandleImage:null!=d&&null!=e?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var z=mxVertexHandler.prototype.createSizerShape;
-mxVertexHandler.prototype.createSizerShape=function(a,c,b){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return z.apply(this,arguments)};var L=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),b=c.getParent(a[0]),e=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=e&&e.relative&&(c=this.graph.view.getState(a[0]),
-null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return L.apply(this,arguments)};var O=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=O.apply(this,arguments),c=[],b=0;b<a.length;b++)"1"!=mxUtils.getValue(a[b].style,"part","0")&&c.push(a[b]);return c};var I=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),
-b=c.getParent(a.cell),e=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=e&&e.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):I.apply(this,arguments)};var S=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),e=b.getParent(this.state.cell),d=this.graph.getCellGeometry(this.state.cell);
-(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(e)||null==d||!d.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&S.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};
+"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)),c.consume()}};var q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
+this.secondDiv=null);q.apply(this,arguments)};var E=(new Date).getTime(),z=0,G=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,f){G.apply(this,arguments);b!=this.currentTerminalState?(E=(new Date).getTime(),z=0):z=(new Date).getTime()-E;this.currentTerminalState=b};var D=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&
+2E3<z||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&D.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,c){var b=null!=a&&0==a,f=this.state.getVisibleTerminalState(b),d=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,
+f,b):null,b=null!=(null!=d?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),d):null)?this.fixedHandleImage:null!=d&&null!=f?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var v=mxVertexHandler.prototype.createSizerShape;
+mxVertexHandler.prototype.createSizerShape=function(a,c,b){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return v.apply(this,arguments)};var H=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),b=c.getParent(a[0]),f=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=f&&f.relative&&(c=this.graph.view.getState(a[0]),
+null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return H.apply(this,arguments)};var M=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=M.apply(this,arguments),c=[],b=0;b<a.length;b++)"1"!=mxUtils.getValue(a[b].style,"part","0")&&c.push(a[b]);return c};var J=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),
+b=c.getParent(a.cell),f=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=f&&f.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):J.apply(this,arguments)};var S=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),f=b.getParent(this.state.cell),d=this.graph.getCellGeometry(this.state.cell);
+(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(f)||null==d||!d.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&S.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};
var C=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){C.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 K=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){K.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="")};var P=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){P.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var c=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&
+(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};var N=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){N.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));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(a,b){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(a,c){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,
-this.editingHandler);var b=this.graph.getLinkForCell(this.state.cell),e=this.graph.getLinksForState(this.state);this.updateLinkHint(b,e);if(null!=b||null!=e&&0<e.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(c,b){if(null==c&&(null==b||0==b.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=c||null!=b&&0<b.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding=
-"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=c&&(this.linkHint.appendChild(this.graph.createLinkForHint(c)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var e=document.createElement("img");e.setAttribute("src",Editor.editImage);e.setAttribute("title",mxResources.get("editLink"));e.setAttribute("width","11");e.setAttribute("height","11");e.style.marginLeft="10px";
-e.style.marginBottom="-1px";e.style.cursor="pointer";this.linkHint.appendChild(e);mxEvent.addListener(e,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));e=document.createElement("img");e.setAttribute("src",Dialog.prototype.clearImage);e.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));e.setAttribute("width","13");e.setAttribute("height","10");e.style.marginLeft="4px";e.style.marginBottom="-1px";
-e.style.cursor="pointer";this.linkHint.appendChild(e);mxEvent.addListener(e,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=b)for(e=0;e<b.length;e++){var d=document.createElement("div");d.style.marginTop=null!=c||0<e?"6px":"0px";d.appendChild(this.graph.createLinkForHint(b[e].getAttribute("href"),mxUtils.getTextContent(b[e])));this.linkHint.appendChild(d)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;
-var T=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){T.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=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?"":
+this.editingHandler);var b=this.graph.getLinkForCell(this.state.cell),f=this.graph.getLinksForState(this.state);this.updateLinkHint(b,f);if(null!=b||null!=f&&0<f.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(c,b){if(null==c&&(null==b||0==b.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=c||null!=b&&0<b.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding=
+"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=c&&(this.linkHint.appendChild(this.graph.createLinkForHint(c)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var f=document.createElement("img");f.setAttribute("src",Editor.editImage);f.setAttribute("title",mxResources.get("editLink"));f.setAttribute("width","11");f.setAttribute("height","11");f.style.marginLeft="10px";
+f.style.marginBottom="-1px";f.style.cursor="pointer";this.linkHint.appendChild(f);mxEvent.addListener(f,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));f=document.createElement("img");f.setAttribute("src",Dialog.prototype.clearImage);f.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));f.setAttribute("width","13");f.setAttribute("height","10");f.style.marginLeft="4px";f.style.marginBottom="-1px";
+f.style.cursor="pointer";this.linkHint.appendChild(f);mxEvent.addListener(f,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=b)for(f=0;f<b.length;f++){var d=document.createElement("div");d.style.marginTop=null!=c||0<f?"6px":"0px";d.appendChild(this.graph.createLinkForHint(b[f].getAttribute("href"),mxUtils.getTextContent(b[f])));this.linkHint.appendChild(d)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;
+var P=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){P.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=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(c,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var c=this.graph.getLinkForCell(this.state.cell),b=this.graph.getLinksForState(this.state);if(null!=c||null!=b&&0<b.length)this.updateLinkHint(c,b),this.redrawHandles()};
-var ba=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){ba.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Y=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?
-"none":"");Y.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),c=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(c,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null;null==b&&(b=this.state);b=b.y+b.height;
-null!=c&&(b=Math.max(b,c.y+c.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var G=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){G.apply(this,arguments);null!=this.linkHint&&(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 aa=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(aa.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));
-this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var ea=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ea.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var fa=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){fa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
-this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function f(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function l(){mxCylinder.call(this)}function m(){mxActor.call(this)}function p(){mxCylinder.call(this)}function u(){mxActor.call(this)}function v(){mxActor.call(this)}function B(){mxActor.call(this)}function c(){mxActor.call(this)}function e(){mxActor.call(this)}function k(){mxActor.call(this)}function q(){mxActor.call(this)}function n(a,c){this.canvas=
+var ca=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){ca.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var V=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?
+"none":"");V.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),c=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(c,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null;null==b&&(b=this.state);b=b.y+b.height;
+null!=c&&(b=Math.max(b,c.y+c.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var F=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){F.apply(this,arguments);null!=this.linkHint&&(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 Y=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Y.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=
+Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var fa=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){fa.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 a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function m(){mxActor.call(this)}function p(){mxCylinder.call(this)}function u(){mxActor.call(this)}function x(){mxActor.call(this)}function B(){mxActor.call(this)}function c(){mxActor.call(this)}function f(){mxActor.call(this)}function g(){mxActor.call(this)}function t(){mxActor.call(this)}function n(a,c){this.canvas=
a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=c;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,n.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,n.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,n.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,n.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,n.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,n.prototype.arcTo)}function g(){mxRectangleShape.call(this)}function x(){mxRectangleShape.call(this)}function A(){mxActor.call(this)}function t(){mxActor.call(this)}function F(){mxActor.call(this)}function y(){mxRectangleShape.call(this)}function E(){mxRectangleShape.call(this)}function D(){mxCylinder.call(this)}function z(){mxShape.call(this)}function L(){mxShape.call(this)}
-function O(){mxEllipse.call(this)}function I(){mxShape.call(this)}function S(){mxShape.call(this)}function C(){mxRectangleShape.call(this)}function K(){mxShape.call(this)}function P(){mxShape.call(this)}function T(){mxShape.call(this)}function ba(){mxShape.call(this)}function Y(){mxShape.call(this)}function G(){mxCylinder.call(this)}function aa(){mxDoubleEllipse.call(this)}function ea(){mxDoubleEllipse.call(this)}function fa(){mxArrowConnector.call(this);this.spacing=0}function Q(){mxArrowConnector.call(this);
-this.spacing=0}function ha(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function W(){mxActor.call(this)}function la(){mxActor.call(this)}function ma(){mxActor.call(this)}function X(){mxActor.call(this)}function ia(){mxActor.call(this)}function N(){mxActor.call(this)}function M(){mxActor.call(this)}function ja(){mxActor.call(this)}function R(){mxActor.call(this)}function U(){mxActor.call(this)}function ga(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}function H(){mxEllipse.call(this)}
-function oa(){mxRhombus.call(this)}function ca(){mxEllipse.call(this)}function da(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}function za(){mxActor.call(this)}function na(){mxActor.call(this)}function ka(){mxActor.call(this)}function ra(){mxConnector.call(this)}function Ea(a,c,b,e,d,k,g,f,n,z){g+=n;var J=e.clone();e.x-=d*(2*g+n);e.y-=k*(2*g+n);d*=g+n;k*=g+n;return function(){a.ellipse(J.x-d-g,J.y-k-g,2*g,2*g);z?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
-mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,c,b,e,d){var k=Math.max(0,Math.min(e,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),J=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(c,b);a.begin();a.moveTo(0,0);a.lineTo(e-k,0);a.lineTo(e,
-k);a.lineTo(e,d);a.lineTo(k,d);a.lineTo(0,d-k);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(e-k,0),a.lineTo(e,k),a.lineTo(k,k),a.close(),a.fill()),0!=J&&(a.setFillAlpha(Math.abs(J)),a.setFillColor(0>J?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(k,k),a.lineTo(k,d),a.lineTo(0,d-k),a.close(),a.fill()),a.begin(),a.moveTo(k,d),a.lineTo(k,k),a.lineTo(0,
-0),a.moveTo(k,k),a.lineTo(e,k),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var sa=Math.tan(mxUtils.toRadians(30)),pa=(.5-sa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,c,b,e,d){c=Math.min(e,d/sa);a.translate((e-c)/2,(d-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*
-c,c*pa);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-pa)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(f,mxCylinder);f.prototype.size=20;f.prototype.redrawPath=function(a,c,b,e,d,k){c=Math.min(e,d/(.5+sa));k?(a.moveTo(0,.25*c),a.lineTo(.5*c,(.5-pa)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-pa)*c),a.lineTo(.5*c,(1-pa)*c)):(a.translate((e-c)/2,(d-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*pa),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-pa)*c),a.lineTo(0,
-.75*c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",f);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,c,b,e,d,k){c=Math.min(d/2,Math.round(d/8)+this.strokewidth-1);if(k&&null!=this.fill||!k&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,e,2*c,e,c),k||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,e,2*c,e,c),k||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,e,2*c,e,c),k||(a.stroke(),a.begin()),a.translate(0,-c);k||(a.moveTo(0,
-c),a.curveTo(0,-c/3,e,-c/3,e,c),a.lineTo(e,d-c),a.curveTo(e,d+c/3,0,d+c/3,0,d-c),a.close())};d.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(l,mxCylinder);l.prototype.size=30;l.prototype.darkOpacity=0;l.prototype.paintVertexShape=function(a,c,b,e,d){var k=Math.max(0,Math.min(e,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=
-Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(c,b);a.begin();a.moveTo(0,0);a.lineTo(e-k,0);a.lineTo(e,k);a.lineTo(e,d);a.lineTo(0,d);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(e-k,0),a.lineTo(e-k,k),a.lineTo(e,k),a.close(),a.fill()),a.begin(),a.moveTo(e-k,0),a.lineTo(e-k,k),a.lineTo(e,k),a.end(),a.stroke())};
-mxCellRenderer.registerShape("note",l);mxUtils.extend(m,mxActor);m.prototype.redrawPath=function(a,c,b,e,d){a.moveTo(0,0);a.quadTo(e/2,.5*d,e,0);a.quadTo(.5*e,d/2,e,d);a.quadTo(e/2,.5*d,0,d);a.quadTo(.5*e,d/2,0,0);a.end()};mxCellRenderer.registerShape("switch",m);mxUtils.extend(p,mxCylinder);p.prototype.tabWidth=60;p.prototype.tabHeight=20;p.prototype.tabPosition="right";p.prototype.redrawPath=function(a,c,b,e,d,k){c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));
-b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);k?"left"==g?(a.moveTo(0,b),a.lineTo(c,b)):(a.moveTo(e-c,b),a.lineTo(e,b)):("left"==g?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,b),a.lineTo(e,b)):(a.moveTo(0,b),a.lineTo(e-c,b),a.lineTo(e-c,0),a.lineTo(e,0)),a.lineTo(e,d),a.lineTo(0,d),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.registerShape("folder",p);mxUtils.extend(u,mxActor);u.prototype.size=
-30;u.prototype.isRoundable=function(){return!0};u.prototype.redrawPath=function(a,c,b,e,d){c=Math.max(0,Math.min(e,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(e,0),new mxPoint(e,d),new mxPoint(0,d),new mxPoint(0,c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("card",u);mxUtils.extend(v,mxActor);v.prototype.size=.4;v.prototype.redrawPath=
-function(a,c,b,e,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,c/2);a.quadTo(e/4,1.4*c,e/2,c/2);a.quadTo(3*e/4,c*(1-1.4),e,c/2);a.lineTo(e,d-c/2);a.quadTo(3*e/4,d-1.4*c,e/2,d-c/2);a.quadTo(e/4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};v.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"size",this.size),b=a.width,e=a.height;if(null==this.direction||this.direction==
-mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=e,new mxRectangle(a.x,a.y+c,b,e-2*c);c*=b;return new mxRectangle(a.x+c,a.y,b-2*c,e)}return a};mxCellRenderer.registerShape("tape",v);mxUtils.extend(B,mxActor);B.prototype.size=.3;B.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};B.prototype.redrawPath=function(a,c,b,e,d){c=d*Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(e,0);a.lineTo(e,d-c/2);a.quadTo(3*e/4,d-1.4*c,e/2,d-c/2);a.quadTo(e/4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};mxCellRenderer.registerShape("document",B);var Ka=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,c,b,e){var d=mxUtils.getValue(this.style,"size");return null!=d?e*Math.max(0,Math.min(1,d)):Ka.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=
-function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*c),0,0)}return null};mxUtils.extend(c,mxActor);c.prototype.size=.2;c.prototype.isRoundable=function(){return!0};c.prototype.redrawPath=function(a,c,b,e,d){c=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(c,0),new mxPoint(e,0),new mxPoint(e-c,d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("parallelogram",c);mxUtils.extend(e,mxActor);e.prototype.size=.2;e.prototype.isRoundable=function(){return!0};e.prototype.redrawPath=function(a,c,b,e,d){c=e*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,
-d),new mxPoint(c,0),new mxPoint(e-c,0),new mxPoint(e,d)],this.isRounded,b,!0)};mxCellRenderer.registerShape("trapezoid",e);mxUtils.extend(k,mxActor);k.prototype.size=.5;k.prototype.redrawPath=function(a,c,b,e,d){a.setFillColor(null);c=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(e,0),new mxPoint(c,0),new mxPoint(c,d/2),new mxPoint(0,d/2),new mxPoint(c,
-d/2),new mxPoint(c,d),new mxPoint(e,d)],this.isRounded,b,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",k);mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(a,c,b,e,d){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=e/5;a.rect(0,0,c,d);a.fillAndStroke();a.rect(2*c,0,c,d);a.fillAndStroke();a.rect(4*c,0,c,d);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",q);n.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=
-c;this.firstX=a;this.firstY=c};n.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)};n.prototype.quadTo=function(a,c,b,e){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=e};n.prototype.curveTo=function(a,c,b,e,d,k){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=k};n.prototype.arcTo=function(a,c,b,e,
-d,k,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=k;this.lastY=g};n.prototype.lineTo=function(a,c){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},e=Math.abs(a-this.lastX),d=Math.abs(c-this.lastY),k=Math.sqrt(e*e+d*d);if(2>k){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var g=Math.round(k/10),f=this.defaultVariation;5>g&&(g=5,f/=3);for(var J=b(a-this.lastX)*e/g,b=b(c-this.lastY)*d/g,
-e=e/k,d=d/k,k=0;k<g;k++){var n=(Math.random()-.5)*f;this.originalLineTo.call(this.canvas,J*k+this.lastX-n*d,b*k+this.lastY-n*e)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};n.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};
-var Ba=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new n(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ba.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var La=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==
-this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&La.apply(this,arguments)};var Ca=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,c,b,e,d){if(null==a.handJiggle)Ca.apply(this,arguments);else{var k=!0;null!=this.style&&(k="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(k||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)k||null!=this.fill&&this.fill!=mxConstants.NONE||
-(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?k=Math.min(e/2,Math.min(d/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,k=Math.min(e*k,d*k)),a.moveTo(c+k,b),a.lineTo(c+e-k,b),a.quadTo(c+e,b,c+e,b+k),a.lineTo(c+e,b+d-k),a.quadTo(c+e,b+d,c+e-k,b+d),a.lineTo(c+k,b+d),a.quadTo(c,b+d,c,b+d-k),
-a.lineTo(c,b+k),a.quadTo(c,b,c+k,b)):(a.moveTo(c,b),a.lineTo(c+e,b),a.lineTo(c+e,b+d),a.lineTo(c,b+d),a.lineTo(c,b)),a.close(),a.end(),a.fillAndStroke()}};var xa=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,b,e,d){null==a.handJiggle&&xa.apply(this,arguments)};mxUtils.extend(g,mxRectangleShape);g.prototype.size=.1;g.prototype.isHtmlAllowed=function(){return!1};g.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,
-!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var c=a.width,b=a.height;a=new mxRectangle(a.x,a.y,c,b);var e=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(c*d,b*d));a.x+=Math.round(e);a.width-=Math.round(2*e)}return a};g.prototype.paintForeground=
-function(a,c,b,e,d){var k=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,k=Math.max(k,Math.min(e*g,d*g));k=Math.round(k);a.begin();a.moveTo(c+k,b);a.lineTo(c+k,b+d);a.moveTo(c+e-k,b);a.lineTo(c+e-k,b+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",g);mxUtils.extend(x,
-mxRectangleShape);x.prototype.paintBackground=function(a,c,b,e,d){a.setFillColor(mxConstants.NONE);a.rect(c,b,e,d);a.fill()};x.prototype.paintForeground=function(a,c,b,e,d){};mxCellRenderer.registerShape("transparent",x);mxUtils.extend(A,mxHexagon);A.prototype.size=30;A.prototype.position=.5;A.prototype.position2=.5;A.prototype.base=20;A.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};A.prototype.isRoundable=
-function(){return!0};A.prototype.redrawPath=function(a,c,b,e,d){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var k=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"base",this.base))));
-this.addPoints(a,[new mxPoint(0,0),new mxPoint(e,0),new mxPoint(e,d-b),new mxPoint(Math.min(e,k+f),d-b),new mxPoint(g,d),new mxPoint(Math.max(0,k),d-b),new mxPoint(0,d-b)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",A);mxUtils.extend(t,mxActor);t.prototype.size=.2;t.prototype.fixedSize=20;t.prototype.isRoundable=function(){return!0};t.prototype.redrawPath=function(a,c,b,e,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(e-c,0),new mxPoint(e,d/2),new mxPoint(e-c,d),new mxPoint(0,d),new mxPoint(c,d/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",t);mxUtils.extend(F,mxHexagon);F.prototype.size=.25;F.prototype.isRoundable=function(){return!0};F.prototype.redrawPath=
-function(a,c,b,e,d){c=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(e-c,0),new mxPoint(e,.5*d),new mxPoint(e-c,d),new mxPoint(c,d),new mxPoint(0,.5*d)],this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",F);mxUtils.extend(y,mxRectangleShape);y.prototype.isHtmlAllowed=function(){return!1};y.prototype.paintForeground=function(a,
-c,b,e,d){var k=Math.min(e/5,d/5)+1;a.begin();a.moveTo(c+e/2,b+k);a.lineTo(c+e/2,b+d-k);a.moveTo(c+k,b+d/2);a.lineTo(c+e-k,b+d/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",y);var ua=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+
-c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,b,e,d){ua.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var k=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=k;b+=k;e-=2*k;d-=2*k;0<e&&0<d&&(a.setShadow(!1),ua.apply(this,[a,c,b,e,d]))}};mxUtils.extend(E,mxRectangleShape);E.prototype.isHtmlAllowed=function(){return!1};E.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2,
-this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};E.prototype.paintForeground=function(a,c,b,e,d){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var k=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=k;b+=k;e-=2*k;d-=2*k;0<e&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var k=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+
-k]];if(null!=g){var f=this.style["symbol"+k+"Align"],J=this.style["symbol"+k+"VerticalAlign"],n=this.style["symbol"+k+"Width"],z=this.style["symbol"+k+"Height"],q=this.style["symbol"+k+"Spacing"]||0,t=this.style["symbol"+k+"VSpacing"]||q,x=this.style["symbol"+k+"ArcSpacing"];null!=x&&(x*=this.getArcSize(e+this.strokewidth,d+this.strokewidth),q+=x,t+=x);var x=c,l=b,x=f==mxConstants.ALIGN_CENTER?x+(e-n)/2:f==mxConstants.ALIGN_RIGHT?x+(e-n-q):x+q,l=J==mxConstants.ALIGN_MIDDLE?l+(d-z)/2:J==mxConstants.ALIGN_BOTTOM?
-l+(d-z-t):l+t;a.save();f=new g;f.style=this.style;g.prototype.paintVertexShape.call(f,a,x,l,n,z);a.restore()}k++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",E);mxUtils.extend(D,mxCylinder);D.prototype.redrawPath=function(a,c,b,e,d,k){k?(a.moveTo(0,0),a.lineTo(e/2,d/2),a.lineTo(e,0),a.end()):(a.moveTo(0,0),a.lineTo(e,0),a.lineTo(e,d),a.lineTo(0,d),a.close())};mxCellRenderer.registerShape("message",D);mxUtils.extend(z,mxShape);
-z.prototype.paintBackground=function(a,c,b,e,d){a.translate(c,b);a.ellipse(e/4,0,e/2,d/4);a.fillAndStroke();a.begin();a.moveTo(e/2,d/4);a.lineTo(e/2,2*d/3);a.moveTo(e/2,d/3);a.lineTo(0,d/3);a.moveTo(e/2,d/3);a.lineTo(e,d/3);a.moveTo(e/2,2*d/3);a.lineTo(0,d);a.moveTo(e/2,2*d/3);a.lineTo(e,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",z);mxUtils.extend(L,mxShape);L.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};L.prototype.paintBackground=function(a,
-c,b,e,d){a.translate(c,b);a.begin();a.moveTo(0,d/4);a.lineTo(0,3*d/4);a.end();a.stroke();a.begin();a.moveTo(0,d/2);a.lineTo(e/6,d/2);a.end();a.stroke();a.ellipse(e/6,0,5*e/6,d);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",L);mxUtils.extend(O,mxEllipse);O.prototype.paintVertexShape=function(a,c,b,e,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+e/8,b+d);a.lineTo(c+7*e/8,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",O);mxUtils.extend(I,
-mxShape);I.prototype.paintVertexShape=function(a,c,b,e,d){a.translate(c,b);a.begin();a.moveTo(e,0);a.lineTo(0,d);a.moveTo(0,0);a.lineTo(e,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",I);mxUtils.extend(S,mxShape);S.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};S.prototype.paintBackground=function(a,c,b,e,d){a.translate(c,b);a.begin();a.moveTo(3*e/8,d/8*1.1);a.lineTo(5*e/8,0);a.end();a.stroke();a.ellipse(0,d/8,e,7*d/8);a.fillAndStroke()};
-S.prototype.paintForeground=function(a,c,b,e,d){a.begin();a.moveTo(3*e/8,d/8*1.1);a.lineTo(5*e/8,d/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",S);mxUtils.extend(C,mxRectangleShape);C.prototype.size=40;C.prototype.isHtmlAllowed=function(){return!1};C.prototype.getLabelBounds=function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};C.prototype.paintBackground=function(a,c,b,e,
-d){var k=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,c,b,e,k):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=C&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,c,b,e,k),a.restore()));k<d&&(a.setDashed(!0),a.begin(),a.moveTo(c+e/2,b+k),a.lineTo(c+e/2,b+d),a.end(),a.stroke())};C.prototype.paintForeground=function(a,
-c,b,e,d){var k=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,b,e,Math.min(d,k))};mxCellRenderer.registerShape("umlLifeline",C);mxUtils.extend(K,mxShape);K.prototype.width=60;K.prototype.height=30;K.prototype.corner=10;K.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,
-"height",this.height)*this.scale))};K.prototype.paintBackground=function(a,c,b,e,d){var k=this.corner,g=Math.min(e,Math.max(k,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),f=Math.min(d,Math.max(1.5*k,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),n=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);n!=mxConstants.NONE&&(a.setFillColor(n),a.rect(c,b,e,d),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
-mxConstants.NONE?(this.getGradientBounds(a,c,b,e,d),a.setGradient(this.fill,this.gradient,c,b,e,d,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,b);a.lineTo(c+g,b);a.lineTo(c+g,b+Math.max(0,f-1.5*k));a.lineTo(c+Math.max(0,g-k),b+f);a.lineTo(c,b+f);a.close();a.fillAndStroke();a.begin();a.moveTo(c+g,b);a.lineTo(c+e,b);a.lineTo(c+e,b+d);a.lineTo(c,b+d);a.lineTo(c,b+f);a.stroke()};mxCellRenderer.registerShape("umlFrame",K);mxPerimeter.LifelinePerimeter=function(a,c,b,e){e=C.prototype.size;
-null!=c&&(e=mxUtils.getValue(c.style,"size",e)*c.view.scale);c=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;b.x<a.getCenterX()&&(c=-1*(c+1));return new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y+e,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,c,b,e){e=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);
-mxPerimeter.BackbonePerimeter=function(a,c,b,e){e=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;null!=c.style.backboneSize&&(e+=parseFloat(c.style.backboneSize)*c.view.scale/2-1);if("south"==c.style[mxConstants.STYLE_DIRECTION]||"north"==c.style[mxConstants.STYLE_DIRECTION])return b.x<a.getCenterX()&&(e=-1*(e+1)),new mxPoint(a.getCenterX()+e,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&(e=-1*(e+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)),
-a.getCenterY()+e)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,b,e){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",A.prototype.size))*c.view.scale))),c.style),c,b,e)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,e,d){var k=c.prototype.size;
-null!=b&&(k=mxUtils.getValue(b.style,"size",k));var g=a.x,f=a.y,n=a.width,J=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(k=J*Math.max(0,Math.min(1,k)),f=[new mxPoint(g,f),new mxPoint(g+n,f+k),new mxPoint(g+n,f+J),new mxPoint(g,f+J-k),new mxPoint(g,f)]):(k=n*Math.max(0,Math.min(1,k)),f=[new mxPoint(g+k,f),new mxPoint(g+n,f),new mxPoint(g+n-k,f+J),new mxPoint(g,
-f+J),new mxPoint(g+k,f)]);J=a.getCenterX();a=a.getCenterY();a=new mxPoint(J,a);d&&(e.x<g||e.x>g+n?a.y=e.y:a.x=e.x);return mxUtils.getPerimeterPoint(f,a,e)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,d){var k=e.prototype.size;null!=c&&(k=mxUtils.getValue(c.style,"size",k));var g=a.x,f=a.y,n=a.width,J=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;
-c==mxConstants.DIRECTION_EAST?(k=n*Math.max(0,Math.min(1,k)),f=[new mxPoint(g+k,f),new mxPoint(g+n-k,f),new mxPoint(g+n,f+J),new mxPoint(g,f+J),new mxPoint(g+k,f)]):c==mxConstants.DIRECTION_WEST?(k=n*Math.max(0,Math.min(1,k)),f=[new mxPoint(g,f),new mxPoint(g+n,f),new mxPoint(g+n-k,f+J),new mxPoint(g+k,f+J),new mxPoint(g,f)]):c==mxConstants.DIRECTION_NORTH?(k=J*Math.max(0,Math.min(1,k)),f=[new mxPoint(g,f+k),new mxPoint(g+n,f),new mxPoint(g+n,f+J),new mxPoint(g,f+J-k),new mxPoint(g,f+k)]):(k=J*Math.max(0,
-Math.min(1,k)),f=[new mxPoint(g,f),new mxPoint(g+n,f+k),new mxPoint(g+n,f+J-k),new mxPoint(g,f+J),new mxPoint(g,f)]);J=a.getCenterX();a=a.getCenterY();a=new mxPoint(J,a);d&&(b.x<g||b.x>g+n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(f,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,b,e){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),k=d?t.prototype.fixedSize:t.prototype.size;null!=c&&(k=mxUtils.getValue(c.style,
-"size",k));var g=a.x,f=a.y,n=a.width,J=a.height,z=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(d=d?Math.max(0,Math.min(n,k)):n*Math.max(0,Math.min(1,k)),f=[new mxPoint(g,f),new mxPoint(g+n-d,f),new mxPoint(g+n,a),new mxPoint(g+n-d,f+J),new mxPoint(g,f+J),new mxPoint(g+d,a),new mxPoint(g,f)]):c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(n,k)):n*Math.max(0,
-Math.min(1,k)),f=[new mxPoint(g+d,f),new mxPoint(g+n,f),new mxPoint(g+n-d,a),new mxPoint(g+n,f+J),new mxPoint(g+d,f+J),new mxPoint(g,a),new mxPoint(g+d,f)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(J,k)):J*Math.max(0,Math.min(1,k)),f=[new mxPoint(g,f+d),new mxPoint(z,f),new mxPoint(g+n,f+d),new mxPoint(g+n,f+J),new mxPoint(z,f+J-d),new mxPoint(g,f+J),new mxPoint(g,f+d)]):(d=d?Math.max(0,Math.min(J,k)):J*Math.max(0,Math.min(1,k)),f=[new mxPoint(g,f),new mxPoint(z,f+d),new mxPoint(g+
-n,f),new mxPoint(g+n,f+J-d),new mxPoint(z,f+J),new mxPoint(g,f+J-d),new mxPoint(g,f)]);z=new mxPoint(z,a);e&&(b.x<g||b.x>g+n?z.y=b.y:z.x=b.x);return mxUtils.getPerimeterPoint(f,z,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,b,e){var d=F.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d));var k=a.x,g=a.y,f=a.width,n=a.height,z=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,
-mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=n*Math.max(0,Math.min(1,d)),g=[new mxPoint(z,g),new mxPoint(k+f,g+d),new mxPoint(k+f,g+n-d),new mxPoint(z,g+n),new mxPoint(k,g+n-d),new mxPoint(k,g+d),new mxPoint(z,g)]):(d=f*Math.max(0,Math.min(1,d)),g=[new mxPoint(k+d,g),new mxPoint(k+f-d,g),new mxPoint(k+f,a),new mxPoint(k+f-d,g+n),new mxPoint(k+d,g+n),new mxPoint(k,a),new mxPoint(k+d,g)]);z=new mxPoint(z,a);e&&(b.x<k||b.x>k+
-f?z.y=b.y:z.x=b.x);return mxUtils.getPerimeterPoint(g,z,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(P,mxShape);P.prototype.size=10;P.prototype.paintBackground=function(a,c,b,e,d){var k=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,b);a.ellipse((e-k)/2,0,k,k);a.fillAndStroke();a.begin();a.moveTo(e/2,k);a.lineTo(e/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",P);mxUtils.extend(T,mxShape);T.prototype.size=
-10;T.prototype.inset=2;T.prototype.paintBackground=function(a,c,b,e,d){var k=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.begin();a.moveTo(e/2,k+g);a.lineTo(e/2,d);a.end();a.stroke();a.begin();a.moveTo((e-k)/2-g,k/2);a.quadTo((e-k)/2-g,k+g,e/2,k+g);a.quadTo((e+k)/2+g,k+g,(e+k)/2+g,k/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",T);mxUtils.extend(ba,mxShape);ba.prototype.paintBackground=
-function(a,c,b,e,d){a.translate(c,b);a.begin();a.moveTo(0,0);a.quadTo(e,0,e,d/2);a.quadTo(e,d,0,d);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",ba);mxUtils.extend(Y,mxShape);Y.prototype.inset=2;Y.prototype.paintBackground=function(a,c,b,e,d){var k=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.ellipse(0,k,e-2*k,d-2*k);a.fillAndStroke();a.begin();a.moveTo(e/2,0);a.quadTo(e,0,e,d/2);a.quadTo(e,d,e/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",
-Y);mxUtils.extend(G,mxCylinder);G.prototype.jettyWidth=32;G.prototype.jettyHeight=12;G.prototype.redrawPath=function(a,c,b,e,d,k){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,f=.3*d-c/2,n=.7*d-c/2;k?(a.moveTo(b,f),a.lineTo(g,f),a.lineTo(g,f+c),a.lineTo(b,f+c),a.moveTo(b,n),a.lineTo(g,n),a.lineTo(g,n+c),a.lineTo(b,n+c)):(a.moveTo(b,0),a.lineTo(e,0),a.lineTo(e,d),a.lineTo(b,d),
-a.lineTo(b,n+c),a.lineTo(0,n+c),a.lineTo(0,n),a.lineTo(b,n),a.lineTo(b,f+c),a.lineTo(0,f+c),a.lineTo(0,f),a.lineTo(b,f),a.close());a.end()};mxCellRenderer.registerShape("component",G);mxUtils.extend(aa,mxDoubleEllipse);aa.prototype.outerStroke=!0;aa.prototype.paintVertexShape=function(a,c,b,e,d){var k=Math.min(4,Math.min(e/5,d/5));0<e&&0<d&&(a.ellipse(c+k,b+k,e-2*k,d-2*k),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,b,e,d),a.stroke())};mxCellRenderer.registerShape("endState",
-aa);mxUtils.extend(ea,aa);ea.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ea);mxUtils.extend(fa,mxArrowConnector);fa.prototype.defaultWidth=4;fa.prototype.isOpenEnded=function(){return!0};fa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};fa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",fa);mxUtils.extend(Q,mxArrowConnector);Q.prototype.defaultWidth=
-10;Q.prototype.defaultArrowWidth=20;Q.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Q.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Q.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Q);mxUtils.extend(ha,mxActor);
-ha.prototype.size=30;ha.prototype.isRoundable=function(){return!0};ha.prototype.redrawPath=function(a,c,b,e,d){c=Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(0,c),new mxPoint(e,0),new mxPoint(e,d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",ha);mxUtils.extend(V,mxRectangleShape);V.prototype.dx=20;V.prototype.dy=20;
-V.prototype.isHtmlAllowed=function(){return!1};V.prototype.paintForeground=function(a,c,b,e,d){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var k=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,k=Math.max(k,Math.min(e*g,d*g));g=Math.max(k,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));k=Math.max(k,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,
-b+k);a.lineTo(c+e,b+k);a.end();a.stroke();a.begin();a.moveTo(c+g,b);a.lineTo(c+g,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",V);mxUtils.extend(W,mxActor);W.prototype.dx=20;W.prototype.dy=20;W.prototype.redrawPath=function(a,c,b,e,d){c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var k=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(e,0),new mxPoint(e,b),new mxPoint(c,b),new mxPoint(c,d),new mxPoint(0,d)],this.isRounded,k,!0);a.end()};mxCellRenderer.registerShape("corner",W);mxUtils.extend(la,mxActor);la.prototype.redrawPath=function(a,c,b,e,d){a.moveTo(0,0);a.lineTo(0,d);a.end();a.moveTo(e,0);a.lineTo(e,d);a.end();a.moveTo(0,d/2);a.lineTo(e,d/2);a.end()};mxCellRenderer.registerShape("crossbar",la);mxUtils.extend(ma,mxActor);
-ma.prototype.dx=20;ma.prototype.dy=20;ma.prototype.redrawPath=function(a,c,b,e,d){c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(e,0),new mxPoint(e,b),new mxPoint((e+c)/2,b),new mxPoint((e+c)/2,d),
-new mxPoint((e-c)/2,d),new mxPoint((e-c)/2,b),new mxPoint(0,b)],this.isRounded,k,!0);a.end()};mxCellRenderer.registerShape("tee",ma);mxUtils.extend(X,mxActor);X.prototype.arrowWidth=.3;X.prototype.arrowSize=.2;X.prototype.redrawPath=function(a,c,b,e,d){var k=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));b=(d-k)/2;var k=b+k,g=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(e-c,b),new mxPoint(e-c,0),new mxPoint(e,d/2),new mxPoint(e-c,d),new mxPoint(e-c,k),new mxPoint(0,k)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",X);mxUtils.extend(ia,mxActor);ia.prototype.redrawPath=function(a,c,b,e,d){var k=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",X.prototype.arrowWidth))));c=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"arrowSize",X.prototype.arrowSize))));b=(d-k)/2;var k=b+k,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(e-c,b),new mxPoint(e-c,0),new mxPoint(e,d/2),new mxPoint(e-c,d),new mxPoint(e-c,k),new mxPoint(c,k),new mxPoint(c,d)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",ia);mxUtils.extend(N,mxActor);N.prototype.size=.1;N.prototype.redrawPath=function(a,c,
-b,e,d){c=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,0);a.lineTo(e,0);a.quadTo(e-2*c,d/2,e,d);a.lineTo(c,d);a.quadTo(c-2*c,d/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",N);mxUtils.extend(M,mxActor);M.prototype.redrawPath=function(a,c,b,e,d){a.moveTo(0,0);a.quadTo(e,0,e,d/2);a.quadTo(e,d,0,d);a.close();a.end()};mxCellRenderer.registerShape("or",M);mxUtils.extend(ja,mxActor);ja.prototype.redrawPath=function(a,c,b,e,d){a.moveTo(0,
-0);a.quadTo(e,0,e,d/2);a.quadTo(e,d,0,d);a.quadTo(e/2,d/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",ja);mxUtils.extend(R,mxActor);R.prototype.size=20;R.prototype.isRoundable=function(){return!0};R.prototype.redrawPath=function(a,c,b,e,d){c=Math.min(e/2,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(e-c,0),new mxPoint(e,.8*c),new mxPoint(e,
-d),new mxPoint(0,d),new mxPoint(0,.8*c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("loopLimit",R);mxUtils.extend(U,mxActor);U.prototype.size=.375;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(a,c,b,e,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(e,0),new mxPoint(e,d-c),new mxPoint(e/
-2,d),new mxPoint(0,d-c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",U);mxUtils.extend(ga,mxEllipse);ga.prototype.paintVertexShape=function(a,c,b,e,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+e/2,b+d);a.lineTo(c+e,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",ga);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(a,c,b,e,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);
-a.begin();a.moveTo(c,b+d/2);a.lineTo(c+e,b+d/2);a.end();a.stroke();a.begin();a.moveTo(c+e/2,b);a.lineTo(c+e/2,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",ta);mxUtils.extend(H,mxEllipse);H.prototype.paintVertexShape=function(a,c,b,e,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*e,b+.145*d);a.lineTo(c+.855*e,b+.855*d);a.end();a.stroke();a.begin();a.moveTo(c+.855*e,b+.145*d);a.lineTo(c+.145*e,b+.855*d);a.end();a.stroke()};
-mxCellRenderer.registerShape("sumEllipse",H);mxUtils.extend(oa,mxRhombus);oa.prototype.paintVertexShape=function(a,c,b,e,d){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+d/2);a.lineTo(c+e,b+d/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",oa);mxUtils.extend(ca,mxEllipse);ca.prototype.paintVertexShape=function(a,c,b,e,d){a.begin();a.moveTo(c,b);a.lineTo(c+e,b);a.lineTo(c+e/2,b+d/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,
-b+d);a.lineTo(c+e,b+d);a.lineTo(c+e/2,b+d/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",ca);mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=function(a,c,b,e,d){var k=b+d-5;a.begin();a.moveTo(c,b);a.lineTo(c,b+d);a.moveTo(c,k);a.lineTo(c+10,k-5);a.moveTo(c,k);a.lineTo(c+10,k+5);a.moveTo(c,k);a.lineTo(c+e,k);a.moveTo(c+e,b);a.lineTo(c+e,b+d);a.moveTo(c+e,k);a.lineTo(c+e-10,k-5);a.moveTo(c+e,k);a.lineTo(c+e-10,k+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",
-da);mxUtils.extend(Aa,mxEllipse);Aa.prototype.paintVertexShape=function(a,c,b,e,d){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(c,b,e,d),a.fill(),a.begin(),a.moveTo(c,b),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+e,b):a.moveTo(c+e,b),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(c+e,b+d):a.moveTo(c+e,b+d),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,b+
-d):a.moveTo(c,b+d),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(c,b-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",Aa);mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(a,c,b,e,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+e/2,b),a.lineTo(c+e/2,b+d)):(a.moveTo(c,b+d/2),a.lineTo(c+e,b+d/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",
-wa);mxUtils.extend(za,mxActor);za.prototype.redrawPath=function(a,c,b,e,d){c=Math.min(e,d/2);a.moveTo(0,0);a.lineTo(e-c,0);a.quadTo(e,0,e,d/2);a.quadTo(e,d,e-c,d);a.lineTo(0,d);a.close();a.end()};mxCellRenderer.registerShape("delay",za);mxUtils.extend(na,mxActor);na.prototype.size=.2;na.prototype.redrawPath=function(a,c,b,e,d){c=Math.min(d,e);var k=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(d-k)/2;b=c+k;var g=(e-k)/2,k=g+k;a.moveTo(0,c);a.lineTo(g,c);a.lineTo(g,
-0);a.lineTo(k,0);a.lineTo(k,c);a.lineTo(e,c);a.lineTo(e,b);a.lineTo(k,b);a.lineTo(k,d);a.lineTo(g,d);a.lineTo(g,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross",na);mxUtils.extend(ka,mxActor);ka.prototype.size=.25;ka.prototype.redrawPath=function(a,c,b,e,d){c=Math.min(e,d/2);b=Math.min(e-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*e);a.moveTo(0,d/2);a.lineTo(b,0);a.lineTo(e-c,0);a.quadTo(e,0,e,d/2);a.quadTo(e,d,e-c,d);a.lineTo(b,d);a.close();a.end()};
-mxCellRenderer.registerShape("display",ka);mxUtils.extend(ra,mxConnector);ra.prototype.origPaintEdgeShape=ra.prototype.paintEdgeShape;ra.prototype.paintEdgeShape=function(a,c,b){for(var e=[],d=0;d<c.length;d++)e.push(mxUtils.clone(c[d]));var d=a.state.dashed,k=a.state.fixDash;ra.prototype.origPaintEdgeShape.apply(this,[a,e,b]);3<=a.state.strokeWidth&&(e=mxUtils.getValue(this.style,"fillColor",null),null!=e&&(a.setStrokeColor(e),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(d,k),ra.prototype.origPaintEdgeShape.apply(this,
-[a,c,b])))};mxCellRenderer.registerShape("filledEdge",ra);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==c.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return b}}();mxMarker.addMarker("dash",function(a,c,b,e,d,k,g,f,n,z){var q=d*(g+n+1),t=k*(g+n+1);return function(){a.begin();
-a.moveTo(e.x-q/2-t/2,e.y-t/2+q/2);a.lineTo(e.x+t/2-3*q/2,e.y-3*t/2-q/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,e,d,k,g,f,n,z){var q=d*(g+n+1),t=k*(g+n+1);return function(){a.begin();a.moveTo(e.x-q/2-t/2,e.y-t/2+q/2);a.lineTo(e.x+t/2-3*q/2,e.y-3*t/2-q/2);a.moveTo(e.x-q/2+t/2,e.y-t/2-q/2);a.lineTo(e.x-t/2-3*q/2,e.y-3*t/2+q/2);a.stroke()}});mxMarker.addMarker("circle",Ea);mxMarker.addMarker("circlePlus",function(a,c,b,e,d,k,g,f,n,z){var q=e.clone(),t=Ea.apply(this,arguments),x=d*(g+
-2*n),l=k*(g+2*n);return function(){t.apply(this,arguments);a.begin();a.moveTo(q.x-d*n,q.y-k*n);a.lineTo(q.x-2*x+d*n,q.y-2*l+k*n);a.moveTo(q.x-x-l+k*n,q.y-l+x-d*n);a.lineTo(q.x+l-x-k*n,q.y-l-x+d*n);a.stroke()}});mxMarker.addMarker("halfCircle",function(a,c,b,e,d,k,g,f,n,z){var q=d*(g+n+1),t=k*(g+n+1),x=e.clone();e.x-=q;e.y-=t;return function(){a.begin();a.moveTo(x.x-t,x.y+q);a.quadTo(e.x-t,e.y+q,e.x,e.y);a.quadTo(e.x+t,e.y-q,x.x+t,x.y-q);a.stroke()}});mxMarker.addMarker("async",function(a,c,b,e,d,
-k,g,f,n,z){c=d*n*1.118;b=k*n*1.118;d*=g+n;k*=g+n;var q=e.clone();q.x-=c;q.y-=b;e.x+=1*-d-c;e.y+=1*-k-b;return function(){a.begin();a.moveTo(q.x,q.y);f?a.lineTo(q.x-d-k/2,q.y-k+d/2):a.lineTo(q.x+k/2-d,q.y-k-d/2);a.lineTo(q.x-d,q.y-k);a.close();z?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,b,e,d,k,g,f,n,q,z){k*=f+q;g*=f+q;var t=d.clone();return function(){c.begin();c.moveTo(t.x,t.y);n?c.lineTo(t.x-k-g/a,t.y-g+k/a):c.lineTo(t.x+g/a-k,t.y-
-g-k/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Fa=function(a,c,b){return ya(a,["width"],c,function(c,e,d,k,g){g=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(k.x+e*c/4+d*g/2,k.y+d*c/4-e*g/2)},function(c,e,d,k,g,f){c=Math.sqrt(mxUtils.ptSegDistSq(k.x,k.y,g.x,g.y,f.x,f.y));a.style.width=Math.round(2*c)/a.view.scale-b})},ya=function(a,c,b,e,d){return Z(a,c,function(c){var d=a.absolutePoints,k=d.length-1;c=a.view.translate;var g=a.view.scale,f=b?d[0]:d[k],d=b?d[1]:d[k-
-1],k=d.x-f.x,n=d.y-f.y,q=Math.sqrt(k*k+n*n),f=e.call(this,q,k/q,n/q,f,d);return new mxPoint(f.x/g-c.x,f.y/g-c.y)},function(c,e,k){var g=a.absolutePoints,f=g.length-1;c=a.view.translate;var n=a.view.scale,q=b?g[0]:g[f],g=b?g[1]:g[f-1],f=g.x-q.x,z=g.y-q.y,t=Math.sqrt(f*f+z*z);e.x=(e.x+c.x)*n;e.y=(e.y+c.y)*n;d.call(this,t,f/t,z/t,q,g,e,k)})},va=function(a){return function(c){return[Z(c,["arrowWidth","arrowSize"],function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",X.prototype.arrowWidth))),
-e=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",X.prototype.arrowSize)));return new mxPoint(c.x+(1-e)*c.width,c.y+(1-b)*c.height/2)},function(c,b){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(c.y+c.height/2-b.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-b.x)/c.width))})]}},Ma=function(a,c,b){return function(e){var d=[Z(e,["size"],function(b){var e=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,
-"size",c)))))*a;return new mxPoint(b.x+e,b.y+e)},function(c,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(c.width,b.x-c.x),Math.min(c.height,b.y-c.y)))/a)})];b&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(qa(e));return d}},Ga=function(a,c,b,e,d){b=null!=b?b:1;return function(k){var g=[Z(k,["size"],function(c){var b=null!=d?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,e=parseFloat(mxUtils.getValue(this.state.style,"size",b?d:a));return new mxPoint(c.x+
-Math.max(0,Math.min(c.width,e*(b?1:c.width))),c.getCenterY())},function(a,c,e){var g=null!=d?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=g?c.x-a.x:Math.max(0,Math.min(b,(c.x-a.x)/a.width));g&&!mxEvent.isAltDown(e.getEvent())&&(a=k.view.graph.snap(a));this.state.style.size=a},null,e)];c&&mxUtils.getValue(k.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(qa(k));return g}},Na=function(a){return function(c){var b=[Z(c,["size"],function(c){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,
-"size",e.prototype.size))));return new mxPoint(c.x+b*c.width*.75,c.y+c.height/4)},function(c,b){this.state.style.size=Math.max(0,Math.min(a,(b.x-c.x)/(.75*c.width)))},null,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(qa(c));return b}},Da=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(qa(a));return c}},qa=function(a,c){return Z(a,[mxConstants.STYLE_ARCSIZE],function(b){var e=null!=c?c:b.height/8;if("1"==mxUtils.getValue(a.style,
-mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var d=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,d),b.y+e)}d=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(b.x+b.width-Math.min(Math.max(b.width/2,b.height/2),Math.min(b.width,b.height)*d),b.y+e)},function(c,b,e){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?
-this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(c.width,2*(c.x+c.width-b.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(c.width-b.x+c.x)/Math.min(c.width,c.height))))})},Z=function(a,c,b,e,d,k){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<c.length;a++)this.copyStyle(c[a])};g.getPosition=b;g.setPosition=e;g.ignoreGrid=null!=d?d:!0;if(k){var f=g.positionChanged;g.positionChanged=
-function(){f.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},Ha={link:function(a){return[Fa(a,!0,10),Fa(a,!1,10)]},flexArrow:function(a){var c=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ya(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,e,d,k){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;k=3*mxUtils.getNumber(a.style,
-mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(k+a.shape.strokewidth*a.view.scale)+e*c/2,d.y+e*(k+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,e,d,k,g,f,n){b=Math.sqrt(mxUtils.ptSegDistSq(k.x,k.y,g.x,g.y,f.x,f.y));e=mxUtils.ptLineDist(k.x,k.y,k.x+d,k.y-e,f.x,f.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(e-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=
-a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(n.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),b.push(ya(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,e,d,k){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;k=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
-5)*a.view.scale;return new mxPoint(d.x+b*(k+a.shape.strokewidth*a.view.scale)+e*c/2,d.y+e*(k+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,e,d,k,g,f,n){b=Math.sqrt(mxUtils.ptSegDistSq(k.x,k.y,g.x,g.y,f.x,f.y));e=mxUtils.ptLineDist(k.x,k.y,k.x+d,k.y-e,f.x,f.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(e-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=
-a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(n.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<c&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ya(a,
-["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,e,d,k){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;k=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(k+a.shape.strokewidth*a.view.scale)-e*c/2,d.y+e*(k+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,e,d,k,g,f,n){b=Math.sqrt(mxUtils.ptSegDistSq(k.x,k.y,g.x,g.y,f.x,f.y));e=mxUtils.ptLineDist(k.x,k.y,k.x+d,k.y-e,f.x,f.y);a.style[mxConstants.STYLE_ENDSIZE]=
-Math.round(100*(e-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(n.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(ya(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
-!1,function(c,b,e,d,k){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;k=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(k+a.shape.strokewidth*a.view.scale)-e*c/2,d.y+e*(k+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,e,d,k,g,f,n){b=Math.sqrt(mxUtils.ptSegDistSq(k.x,k.y,g.x,g.y,f.x,f.y));e=mxUtils.ptLineDist(k.x,k.y,k.x+d,k.y-e,f.x,f.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(e-a.shape.strokewidth)/
-3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(n.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-
-parseFloat(a.style.startWidth))<c&&(a.style.endWidth=a.style.startWidth))})));return b},swimlane:function(a){var c=[Z(a,[mxConstants.STYLE_STARTSIZE],function(c){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(c.getCenterX(),c.y+Math.max(0,Math.min(c.height,b))):new mxPoint(c.x+Math.max(0,Math.min(c.width,b)),c.getCenterY())},function(c,b){a.style[mxConstants.STYLE_STARTSIZE]=
-1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(c.height,b.y-c.y))):Math.round(Math.max(0,Math.min(c.width,b.x-c.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(qa(a,b/2))}return c},label:Da(),ext:Da(),rectangle:Da(),triangle:Da(),rhombus:Da(),umlLifeline:function(a){return[Z(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,
-parseFloat(mxUtils.getValue(this.state.style,"size",C.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[Z(a,["width","height"],function(a){var c=Math.max(K.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",K.prototype.width))),b=Math.max(1.5*K.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",K.prototype.height)));
-return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.width=Math.round(Math.max(K.prototype.corner,Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*K.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},process:function(a){var c=[Z(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size))));return new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,c){this.state.style.size=Math.max(0,Math.min(.5,
-(c.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(qa(a));return c},cross:function(a){return[Z(a,["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",na.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var b=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/b*2,Math.max(0,a.getCenterX()-c.x)/b*2)))})]},
-note:function(a){return[Z(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size)))));return new mxPoint(a.x+a.width-c,a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=[Z(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",ha.prototype.size)));
-return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(qa(a));return c},dataStorage:function(a){return[Z(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(a.x+(1-c)*a.width,a.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-
-c.x)/a.width))})]},callout:function(a){var c=[Z(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",A.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position)));mxUtils.getValue(this.state.style,"base",A.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style,"base",A.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,
-a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),Z(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",A.prototype.position2)));return new mxPoint(a.x+c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),Z(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",A.prototype.size))),
-b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position))),e=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",A.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+e),a.y+a.height-c)},function(a,c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,c.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,
-!1)&&c.push(qa(a));return c},internalStorage:function(a){var c=[Z(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",V.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",V.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,
-!1)&&c.push(qa(a));return c},corner:function(a){return[Z(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",W.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",W.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},tee:function(a){return[Z(a,["dx","dy"],function(a){var c=
-Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ma.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ma.prototype.dy)));return new mxPoint(a.x+(a.width+c)/2,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,c.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},singleArrow:va(1),doubleArrow:va(.5),folder:function(a){return[Z(a,["tabWidth","tabHeight"],function(a){var c=
-Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",p.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",p.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);return new mxPoint(a.x+c,a.y+b)},function(a,c){var b=Math.max(0,Math.min(a.width,c.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&
-(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},document:function(a){return[Z(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",B.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},tape:function(a){return[Z(a,["size"],function(a){var c=Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",v.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c*a.height/2)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[Z(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",U.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+
-a.height-c.y)/a.height))})]},step:Ga(t.prototype.size,!0,null,!0,t.prototype.fixedSize),hexagon:Ga(F.prototype.size,!0,.5,!0),curlyBracket:Ga(k.prototype.size,!1),display:Ga(ka.prototype.size,!1),cube:Ma(1,a.prototype.size,!1),card:Ma(.5,u.prototype.size,!0),loopLimit:Ma(.5,R.prototype.size,!0),trapezoid:Na(.5),parallelogram:Na(1)};Graph.createHandle=Z;Graph.handleFactory=Ha;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=
-this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=Ha[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=Ha[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=
-mxConstants.SHAPE_CONNECTOR);a=Ha[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Ia=new mxPoint(1,0),Ja=new mxPoint(1,0),va=mxUtils.toRadians(-30),Ia=mxUtils.getRotatedPoint(Ia,Math.cos(va),Math.sin(va)),va=mxUtils.toRadians(-150),Ja=mxUtils.getRotatedPoint(Ja,Math.cos(va),Math.sin(va));mxEdgeStyle.IsometricConnector=function(a,c,b,e,d){var k=a.view;e=null!=e&&0<e.length?e[0]:null;var g=a.absolutePoints,f=g[0],g=g[g.length-1];null!=
-e&&(e=k.transformControlPoint(a,e));null==f&&null!=c&&(f=new mxPoint(c.getCenterX(),c.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));var n=Ia.x,q=Ia.y,z=Ja.x,t=Ja.y,x="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=f){a=function(a,c,b){a-=l.x;var e=c-l.y;c=(t*a-z*e)/(n*t-q*z);a=(q*a-n*e)/(q*z-n*t);x?(b&&(l=new mxPoint(l.x+n*c,l.y+q*c),d.push(l)),l=new mxPoint(l.x+z*a,l.y+t*a)):(b&&(l=new mxPoint(l.x+z*a,l.y+t*a),d.push(l)),l=new mxPoint(l.x+
-n*c,l.y+q*c));d.push(l)};var l=f;null==e&&(e=new mxPoint(f.x+(g.x-f.x)/2,f.y+(g.y-f.y)/2));a(e.x,e.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Oa=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,c){if(c==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Oa.apply(this,arguments)};b.prototype.constraints=[];f.prototype.getConstraints=function(a,c,b){a=[];var e=
-Math.tan(mxUtils.toRadians(30)),d=(.5-e)/2,e=Math.min(c,b/(.5+e));c=(c-e)/2;b=(b-e)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b+.25*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*e,b+e*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+e,b+.25*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+e,b+.75*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*e,b+(1-d)*e));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,c,b+.75*e));return a};A.prototype.getConstraints=function(a,c,b){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b-e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b-e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,
-b-e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-e)));c>=2*e&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.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),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,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))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;y.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.getConstraints=function(a,c,b){a=[];var e=Math.max(0,Math.min(c,
-Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-e),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*e,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b+e)));a.push(new mxConnectionConstraint(new mxPoint(1,
-1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c>=2*e&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};u.prototype.getConstraints=function(a,c,b){a=[];var e=Math.max(0,Math.min(c,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(c+e),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*e,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b+e)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));c>=2*e&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};a.prototype.getConstraints=function(a,c,b){a=[];var e=Math.max(0,Math.min(c,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-e),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*e,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b+e)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+e),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*e,b-.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-e)));return a};
-p.prototype.getConstraints=function(a,c,b){a=[];var e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*e,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0)),a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,e,d)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+e),d))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*e,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-e,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-e,d)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-e),d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,c,.25*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.75*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.75*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};V.prototype.constraints=mxRectangleShape.prototype.constraints;N.prototype.constraints=mxRectangleShape.prototype.constraints;ga.prototype.constraints=mxEllipse.prototype.constraints;ta.prototype.constraints=mxEllipse.prototype.constraints;
-H.prototype.constraints=mxEllipse.prototype.constraints;wa.prototype.constraints=mxEllipse.prototype.constraints;ha.prototype.constraints=mxRectangleShape.prototype.constraints;za.prototype.constraints=mxRectangleShape.prototype.constraints;ka.prototype.getConstraints=function(a,c,b){a=[];var e=Math.min(c,b/2),d=Math.min(c-e,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-e),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-e,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-e),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));return a};R.prototype.constraints=mxRectangleShape.prototype.constraints;U.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)];z.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)];G.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)];m.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)];v.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)];t.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),
-!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
-.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];P.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=
-[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,
-.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),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)];c.prototype.constraints=mxRectangleShape.prototype.constraints;e.prototype.constraints=mxRectangleShape.prototype.constraints;B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(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;ma.prototype.getConstraints=function(a,c,b){a=[];var e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*c+.25*e,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+e),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+e),.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+e),b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(c-e),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-e),.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-e),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*c-.25*e,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*d));return a};W.prototype.getConstraints=function(a,c,b){a=[];var e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,
-"dx",this.dx)))),d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+e),d));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,e,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*e,b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return a};la.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)];X.prototype.getConstraints=function(a,c,b){a=[];var e=b*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)))),e=(b-e)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),b-e));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,b-e));return a};ia.prototype.getConstraints=function(a,c,b){a=[];var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",X.prototype.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",X.prototype.arrowSize)))),e=(b-e)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,e));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,b-e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));return a};na.prototype.getConstraints=function(a,c,b){a=[];var e=Math.min(b,c),d=Math.max(0,Math.min(e,e*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),e=(b-d)/2,k=e+d,g=(c-d)/2,d=g+d;a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,g,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b-.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b));a.push(new mxConnectionConstraint(new mxPoint(.5,
-1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b-.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,k));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,k));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(c+d),k));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,k));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,k));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,k));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,e));return a};C.prototype.constraints=
-null;M.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)];ja.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)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];Y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
-Actions.prototype.init=function(){function a(a){d.escape();var b=d.getDeletableCells(d.getSelectionCells());if(null!=b&&0<b.length){var f=d.selectParentAfterDelete?d.model.getParents(b):null;d.removeCells(b,a);if(null!=f){a=[];for(b=0;b<f.length;b++)d.model.contains(f[b])&&(d.model.isVertex(f[b])||d.model.isEdge(f[b]))&&a.push(f[b]);d.setSelectionCells(a)}}}var b=this.editorUi,f=b.editor,d=f.graph,l=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",
-function(){d.openLink(b.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var d=mxUtils.parseXml(a);f.graph.setSelectionCells(f.graph.importGraphModel(d.documentElement))}catch(c){mxUtils.alert(mxResources.get("invalidOrMissingFile")+
-": "+c.message)}}));b.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=l;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=l;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=l;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,296,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container,
-620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=l;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN?
-Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){mxClipboard.copy(d)},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&mxClipboard.paste(d)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){d.getModel().beginUpdate();
-try{var b=mxClipboard.paste(d);if(null!=b){a=!0;for(var f=0;f<b.length&&a;f++)a=a&&d.model.isEdge(b[f]);var c=d.view.translate,e=d.view.scale,k=c.x,q=c.y,c=null;if(1==b.length&&a){var n=d.getCellGeometry(b[0]);null!=n&&(c=n.getTerminalPoint(!0))}c=null!=c?c:d.getBoundingBoxFromGeometry(b,a);if(null!=c){var g=Math.round(d.snap(d.popupMenuHandler.triggerX/e-k)),x=Math.round(d.snap(d.popupMenuHandler.triggerY/e-q));d.cellsMoved(b,g-c.x,x-c.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("copySize",
-function(a){a=d.getSelectionCell();d.isEnabled()&&null!=a&&d.getModel().isVertex(a)&&(a=d.getCellGeometry(a),null!=a&&(b.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",function(a){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=b.copiedSize){d.getModel().beginUpdate();try{var f=d.getSelectionCells();for(a=0;a<f.length;a++)if(d.getModel().isVertex(f[a])){var l=d.getCellGeometry(f[a]);null!=l&&(l=l.clone(),l.width=b.copiedSize.width,l.height=
-b.copiedSize.height,d.getModel().setGeometry(f[a],l))}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{d.setSelectionCells(d.duplicateCells())}catch(u){b.handleError(u)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),
+this.canvas.curveTo=mxUtils.bind(this,n.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,n.prototype.arcTo)}function l(){mxRectangleShape.call(this)}function y(){mxRectangleShape.call(this)}function A(){mxActor.call(this)}function q(){mxActor.call(this)}function E(){mxActor.call(this)}function z(){mxRectangleShape.call(this)}function G(){mxRectangleShape.call(this)}function D(){mxCylinder.call(this)}function v(){mxShape.call(this)}function H(){mxShape.call(this)}
+function M(){mxEllipse.call(this)}function J(){mxShape.call(this)}function S(){mxShape.call(this)}function C(){mxRectangleShape.call(this)}function K(){mxShape.call(this)}function N(){mxShape.call(this)}function P(){mxShape.call(this)}function ca(){mxShape.call(this)}function V(){mxShape.call(this)}function F(){mxCylinder.call(this)}function Y(){mxRectangleShape.call(this)}function fa(){mxDoubleEllipse.call(this)}function la(){mxDoubleEllipse.call(this)}function Z(){mxArrowConnector.call(this);this.spacing=
+0}function ia(){mxArrowConnector.call(this);this.spacing=0}function U(){mxActor.call(this)}function T(){mxRectangleShape.call(this)}function ga(){mxActor.call(this)}function pa(){mxActor.call(this)}function X(){mxActor.call(this)}function aa(){mxActor.call(this)}function O(){mxActor.call(this)}function L(){mxActor.call(this)}function ja(){mxActor.call(this)}function R(){mxActor.call(this)}function Q(){mxActor.call(this)}function ea(){mxActor.call(this)}function ta(){mxEllipse.call(this)}function I(){mxEllipse.call(this)}
+function ma(){mxEllipse.call(this)}function da(){mxRhombus.call(this)}function ha(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function na(){mxActor.call(this)}function ka(){mxActor.call(this)}function ra(){mxActor.call(this)}function oa(){mxConnector.call(this)}function ua(a,c,b,f,d,e,g,l,n,v){g+=n;var ba=f.clone();f.x-=d*(2*g+n);f.y-=e*(2*g+n);d*=g+n;e*=g+n;return function(){a.ellipse(ba.x-d-g,ba.y-e-g,2*g,2*g);v?
+a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,c,b,f,d){var e=Math.max(0,Math.min(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ba=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(c,b);a.begin();
+a.moveTo(0,0);a.lineTo(f-e,0);a.lineTo(f,e);a.lineTo(f,d);a.lineTo(e,d);a.lineTo(0,d-e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(f-e,0),a.lineTo(f,e),a.lineTo(e,e),a.close(),a.fill()),0!=ba&&(a.setFillAlpha(Math.abs(ba)),a.setFillColor(0>ba?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(e,e),a.lineTo(e,d),a.lineTo(0,d-e),a.close(),a.fill()),a.begin(),
+a.moveTo(e,d),a.lineTo(e,e),a.lineTo(0,0),a.moveTo(e,e),a.lineTo(f,e),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var wa=Math.tan(mxUtils.toRadians(30)),qa=(.5-wa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f,d/wa);a.translate((f-
+c)/2,(d-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*c,c*qa);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-qa)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.redrawPath=function(a,c,b,f,d,e){c=Math.min(f,d/(.5+wa));e?(a.moveTo(0,.25*c),a.lineTo(.5*c,(.5-qa)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-qa)*c),a.lineTo(.5*c,(1-qa)*c)):(a.translate((f-c)/2,(d-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*qa),a.lineTo(c,.25*c),
+a.lineTo(c,.75*c),a.lineTo(.5*c,(1-qa)*c),a.lineTo(0,.75*c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",e);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,c,b,f,d,e){c=Math.min(d/2,Math.round(d/8)+this.strokewidth-1);if(e&&null!=this.fill||!e&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,f,2*c,f,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,f,2*c,f,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,f,2*c,f,c),
+e||(a.stroke(),a.begin()),a.translate(0,-c);e||(a.moveTo(0,c),a.curveTo(0,-c/3,f,-c/3,f,c),a.lineTo(f,d-c),a.curveTo(f,d+c/3,0,d+c/3,0,d-c),a.close())};d.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(k,mxCylinder);k.prototype.size=30;k.prototype.darkOpacity=0;k.prototype.paintVertexShape=function(a,c,b,f,d){var e=Math.max(0,Math.min(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(c,b);a.begin();a.moveTo(0,0);a.lineTo(f-e,0);a.lineTo(f,e);a.lineTo(f,d);a.lineTo(0,d);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(f-e,0),a.lineTo(f-e,e),a.lineTo(f,e),a.close(),a.fill()),a.begin(),a.moveTo(f-e,0),a.lineTo(f-e,e),a.lineTo(f,
+e),a.end(),a.stroke())};mxCellRenderer.registerShape("note",k);mxUtils.extend(m,mxActor);m.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.quadTo(f/2,.5*d,f,0);a.quadTo(.5*f,d/2,f,d);a.quadTo(f/2,.5*d,0,d);a.quadTo(.5*f,d/2,0,0);a.end()};mxCellRenderer.registerShape("switch",m);mxUtils.extend(p,mxCylinder);p.prototype.tabWidth=60;p.prototype.tabHeight=20;p.prototype.tabPosition="right";p.prototype.redrawPath=function(a,c,b,f,d,e){c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,
+"tabWidth",this.tabWidth))));b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);e?"left"==g?(a.moveTo(0,b),a.lineTo(c,b)):(a.moveTo(f-c,b),a.lineTo(f,b)):("left"==g?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,b),a.lineTo(f,b)):(a.moveTo(0,b),a.lineTo(f-c,b),a.lineTo(f-c,0),a.lineTo(f,0)),a.lineTo(f,d),a.lineTo(0,d),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.registerShape("folder",p);mxUtils.extend(u,
+mxActor);u.prototype.size=30;u.prototype.isRoundable=function(){return!0};u.prototype.redrawPath=function(a,c,b,f,d){c=Math.max(0,Math.min(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(f,0),new mxPoint(f,d),new mxPoint(0,d),new mxPoint(0,c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("card",u);mxUtils.extend(x,mxActor);x.prototype.size=
+.4;x.prototype.redrawPath=function(a,c,b,f,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,c/2);a.quadTo(f/4,1.4*c,f/2,c/2);a.quadTo(3*f/4,c*(1-1.4),f,c/2);a.lineTo(f,d-c/2);a.quadTo(3*f/4,d-1.4*c,f/2,d-c/2);a.quadTo(f/4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};x.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"size",this.size),b=a.width,f=a.height;if(null==this.direction||
+this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=f,new mxRectangle(a.x,a.y+c,b,f-2*c);c*=b;return new mxRectangle(a.x+c,a.y,b-2*c,f)}return a};mxCellRenderer.registerShape("tape",x);mxUtils.extend(B,mxActor);B.prototype.size=.3;B.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};B.prototype.redrawPath=function(a,c,b,
+f,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(f,0);a.lineTo(f,d-c/2);a.quadTo(3*f/4,d-1.4*c,f/2,d-c/2);a.quadTo(f/4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};mxCellRenderer.registerShape("document",B);var Ca=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,c,b,f){var d=mxUtils.getValue(this.style,"size");return null!=d?f*Math.max(0,Math.min(1,d)):Ca.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=
+function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*c),0,0)}return null};mxUtils.extend(c,mxActor);c.prototype.size=.2;c.prototype.isRoundable=function(){return!0};c.prototype.redrawPath=function(a,c,b,f,d){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(c,0),new mxPoint(f,0),new mxPoint(f-c,d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("parallelogram",c);mxUtils.extend(f,mxActor);f.prototype.size=.2;f.prototype.isRoundable=function(){return!0};f.prototype.redrawPath=function(a,c,b,f,d){c=f*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,
+d),new mxPoint(c,0),new mxPoint(f-c,0),new mxPoint(f,d)],this.isRounded,b,!0)};mxCellRenderer.registerShape("trapezoid",f);mxUtils.extend(g,mxActor);g.prototype.size=.5;g.prototype.redrawPath=function(a,c,b,f,d){a.setFillColor(null);c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(f,0),new mxPoint(c,0),new mxPoint(c,d/2),new mxPoint(0,d/2),new mxPoint(c,
+d/2),new mxPoint(c,d),new mxPoint(f,d)],this.isRounded,b,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",g);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(a,c,b,f,d){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=f/5;a.rect(0,0,c,d);a.fillAndStroke();a.rect(2*c,0,c,d);a.fillAndStroke();a.rect(4*c,0,c,d);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",t);n.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=
+c;this.firstX=a;this.firstY=c};n.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)};n.prototype.quadTo=function(a,c,b,f){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=f};n.prototype.curveTo=function(a,c,b,f,d,e){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=e};n.prototype.arcTo=function(a,c,b,f,
+d,e,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};n.prototype.lineTo=function(a,c){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},f=Math.abs(a-this.lastX),d=Math.abs(c-this.lastY),e=Math.sqrt(f*f+d*d);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var g=Math.round(e/10),l=this.defaultVariation;5>g&&(g=5,l/=3);for(var ba=b(a-this.lastX)*f/g,b=b(c-this.lastY)*d/
+g,f=f/e,d=d/e,e=0;e<g;e++){var n=(Math.random()-.5)*l;this.originalLineTo.call(this.canvas,ba*e+this.lastX-n*d,b*e+this.lastY-n*f)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};n.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};
+var Ma=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new n(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ma.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Da=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==
+this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Da.apply(this,arguments)};var xa=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,c,b,f,d){if(null==a.handJiggle)xa.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)e||null!=this.fill&&this.fill!=mxConstants.NONE||
+(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?e=Math.min(f/2,Math.min(d/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(f*e,d*e)),a.moveTo(c+e,b),a.lineTo(c+f-e,b),a.quadTo(c+f,b,c+f,b+e),a.lineTo(c+f,b+d-e),a.quadTo(c+f,b+d,c+f-e,b+d),a.lineTo(c+e,b+d),a.quadTo(c,b+d,c,b+d-e),
+a.lineTo(c,b+e),a.quadTo(c,b,c+e,b)):(a.moveTo(c,b),a.lineTo(c+f,b),a.lineTo(c+f,b+d),a.lineTo(c,b+d),a.lineTo(c,b)),a.close(),a.end(),a.fillAndStroke()}};var ya=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,b,f,d){null==a.handJiggle&&ya.apply(this,arguments)};mxUtils.extend(l,mxRectangleShape);l.prototype.size=.1;l.prototype.isHtmlAllowed=function(){return!1};l.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,
+!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var c=a.width,b=a.height;a=new mxRectangle(a.x,a.y,c,b);var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(c*d,b*d));a.x+=Math.round(f);a.width-=Math.round(2*f)}return a};l.prototype.paintForeground=
+function(a,c,b,f,d){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(f*g,d*g));e=Math.round(e);a.begin();a.moveTo(c+e,b);a.lineTo(c+e,b+d);a.moveTo(c+f-e,b);a.lineTo(c+f-e,b+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",l);mxUtils.extend(y,
+mxRectangleShape);y.prototype.paintBackground=function(a,c,b,f,d){a.setFillColor(mxConstants.NONE);a.rect(c,b,f,d);a.fill()};y.prototype.paintForeground=function(a,c,b,f,d){};mxCellRenderer.registerShape("transparent",y);mxUtils.extend(A,mxHexagon);A.prototype.size=30;A.prototype.position=.5;A.prototype.position2=.5;A.prototype.base=20;A.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};A.prototype.isRoundable=
+function(){return!0};A.prototype.redrawPath=function(a,c,b,f,d){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),l=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"base",this.base))));
+this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,d-b),new mxPoint(Math.min(f,e+l),d-b),new mxPoint(g,d),new mxPoint(Math.max(0,e),d-b),new mxPoint(0,d-b)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",A);mxUtils.extend(q,mxActor);q.prototype.size=.2;q.prototype.fixedSize=20;q.prototype.isRoundable=function(){return!0};q.prototype.redrawPath=function(a,c,b,f,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,
+"size",this.fixedSize)))):f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-c,d),new mxPoint(0,d),new mxPoint(c,d/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",q);mxUtils.extend(E,mxHexagon);E.prototype.size=.25;E.prototype.isRoundable=function(){return!0};E.prototype.redrawPath=
+function(a,c,b,f,d){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(f-c,0),new mxPoint(f,.5*d),new mxPoint(f-c,d),new mxPoint(c,d),new mxPoint(0,.5*d)],this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",E);mxUtils.extend(z,mxRectangleShape);z.prototype.isHtmlAllowed=function(){return!1};z.prototype.paintForeground=function(a,
+c,b,f,d){var e=Math.min(f/5,d/5)+1;a.begin();a.moveTo(c+f/2,b+e);a.lineTo(c+f/2,b+d-e);a.moveTo(c+e,b+d/2);a.lineTo(c+f-e,b+d/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",z);var Ga=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+
+c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,b,f,d){Ga.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;b+=e;f-=2*e;d-=2*e;0<f&&0<d&&(a.setShadow(!1),Ga.apply(this,[a,c,b,f,d]))}};mxUtils.extend(G,mxRectangleShape);G.prototype.isHtmlAllowed=function(){return!1};G.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2,
+this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};G.prototype.paintForeground=function(a,c,b,f,d){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;b+=e;f-=2*e;d-=2*e;0<f&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+
+e]];if(null!=g){var l=this.style["symbol"+e+"Align"],ba=this.style["symbol"+e+"VerticalAlign"],n=this.style["symbol"+e+"Width"],v=this.style["symbol"+e+"Height"],t=this.style["symbol"+e+"Spacing"]||0,q=this.style["symbol"+e+"VSpacing"]||t,y=this.style["symbol"+e+"ArcSpacing"];null!=y&&(y*=this.getArcSize(f+this.strokewidth,d+this.strokewidth),t+=y,q+=y);var y=c,k=b,y=l==mxConstants.ALIGN_CENTER?y+(f-n)/2:l==mxConstants.ALIGN_RIGHT?y+(f-n-t):y+t,k=ba==mxConstants.ALIGN_MIDDLE?k+(d-v)/2:ba==mxConstants.ALIGN_BOTTOM?
+k+(d-v-q):k+q;a.save();l=new g;l.style=this.style;g.prototype.paintVertexShape.call(l,a,y,k,n,v);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",G);mxUtils.extend(D,mxCylinder);D.prototype.redrawPath=function(a,c,b,f,d,e){e?(a.moveTo(0,0),a.lineTo(f/2,d/2),a.lineTo(f,0),a.end()):(a.moveTo(0,0),a.lineTo(f,0),a.lineTo(f,d),a.lineTo(0,d),a.close())};mxCellRenderer.registerShape("message",D);mxUtils.extend(v,mxShape);
+v.prototype.paintBackground=function(a,c,b,f,d){a.translate(c,b);a.ellipse(f/4,0,f/2,d/4);a.fillAndStroke();a.begin();a.moveTo(f/2,d/4);a.lineTo(f/2,2*d/3);a.moveTo(f/2,d/3);a.lineTo(0,d/3);a.moveTo(f/2,d/3);a.lineTo(f,d/3);a.moveTo(f/2,2*d/3);a.lineTo(0,d);a.moveTo(f/2,2*d/3);a.lineTo(f,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",v);mxUtils.extend(H,mxShape);H.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};H.prototype.paintBackground=function(a,
+c,b,f,d){a.translate(c,b);a.begin();a.moveTo(0,d/4);a.lineTo(0,3*d/4);a.end();a.stroke();a.begin();a.moveTo(0,d/2);a.lineTo(f/6,d/2);a.end();a.stroke();a.ellipse(f/6,0,5*f/6,d);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",H);mxUtils.extend(M,mxEllipse);M.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+f/8,b+d);a.lineTo(c+7*f/8,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",M);mxUtils.extend(J,
+mxShape);J.prototype.paintVertexShape=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(f,0);a.lineTo(0,d);a.moveTo(0,0);a.lineTo(f,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",J);mxUtils.extend(S,mxShape);S.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};S.prototype.paintBackground=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(3*f/8,d/8*1.1);a.lineTo(5*f/8,0);a.end();a.stroke();a.ellipse(0,d/8,f,7*d/8);a.fillAndStroke()};
+S.prototype.paintForeground=function(a,c,b,f,d){a.begin();a.moveTo(3*f/8,d/8*1.1);a.lineTo(5*f/8,d/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",S);mxUtils.extend(C,mxRectangleShape);C.prototype.size=40;C.prototype.isHtmlAllowed=function(){return!1};C.prototype.getLabelBounds=function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};C.prototype.paintBackground=function(a,c,b,f,
+d){var e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,c,b,f,e):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=C&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,c,b,f,e),a.restore()));e<d&&(a.setDashed(!0),a.begin(),a.moveTo(c+f/2,b+e),a.lineTo(c+f/2,b+d),a.end(),a.stroke())};C.prototype.paintForeground=function(a,
+c,b,f,d){var e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,b,f,Math.min(d,e))};mxCellRenderer.registerShape("umlLifeline",C);mxUtils.extend(K,mxShape);K.prototype.width=60;K.prototype.height=30;K.prototype.corner=10;K.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,
+"height",this.height)*this.scale))};K.prototype.paintBackground=function(a,c,b,f,d){var e=this.corner,g=Math.min(f,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),l=Math.min(d,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),n=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);n!=mxConstants.NONE&&(a.setFillColor(n),a.rect(c,b,f,d),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
+mxConstants.NONE?(this.getGradientBounds(a,c,b,f,d),a.setGradient(this.fill,this.gradient,c,b,f,d,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,b);a.lineTo(c+g,b);a.lineTo(c+g,b+Math.max(0,l-1.5*e));a.lineTo(c+Math.max(0,g-e),b+l);a.lineTo(c,b+l);a.close();a.fillAndStroke();a.begin();a.moveTo(c+g,b);a.lineTo(c+f,b);a.lineTo(c+f,b+d);a.lineTo(c,b+d);a.lineTo(c,b+l);a.stroke()};mxCellRenderer.registerShape("umlFrame",K);mxPerimeter.LifelinePerimeter=function(a,c,b,f){f=C.prototype.size;
+null!=c&&(f=mxUtils.getValue(c.style,"size",f)*c.view.scale);c=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;b.x<a.getCenterX()&&(c=-1*(c+1));return new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y+f,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,c,b,f){f=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);
+mxPerimeter.BackbonePerimeter=function(a,c,b,f){f=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;null!=c.style.backboneSize&&(f+=parseFloat(c.style.backboneSize)*c.view.scale/2-1);if("south"==c.style[mxConstants.STYLE_DIRECTION]||"north"==c.style[mxConstants.STYLE_DIRECTION])return b.x<a.getCenterX()&&(f=-1*(f+1)),new mxPoint(a.getCenterX()+f,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&(f=-1*(f+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)),
+a.getCenterY()+f)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,b,f){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",A.prototype.size))*c.view.scale))),c.style),c,b,f)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,f,d){var e=c.prototype.size;
+null!=b&&(e=mxUtils.getValue(b.style,"size",e));var g=a.x,l=a.y,n=a.width,v=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+n,l+e),new mxPoint(g+n,l+v),new mxPoint(g,l+v-e),new mxPoint(g,l)]):(e=n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g+e,l),new mxPoint(g+n,l),new mxPoint(g+n-e,l+v),new mxPoint(g,
+l+v),new mxPoint(g+e,l)]);v=a.getCenterX();a=a.getCenterY();a=new mxPoint(v,a);d&&(f.x<g||f.x>g+n?a.y=f.y:a.x=f.x);return mxUtils.getPerimeterPoint(l,a,f)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,d){var e=f.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));var g=a.x,l=a.y,n=a.width,v=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;
+c==mxConstants.DIRECTION_EAST?(e=n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g+e,l),new mxPoint(g+n-e,l),new mxPoint(g+n,l+v),new mxPoint(g,l+v),new mxPoint(g+e,l)]):c==mxConstants.DIRECTION_WEST?(e=n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+n,l),new mxPoint(g+n-e,l+v),new mxPoint(g+e,l+v),new mxPoint(g,l)]):c==mxConstants.DIRECTION_NORTH?(e=v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l+e),new mxPoint(g+n,l),new mxPoint(g+n,l+v),new mxPoint(g,l+v-e),new mxPoint(g,l+e)]):(e=v*Math.max(0,
+Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+n,l+e),new mxPoint(g+n,l+v-e),new mxPoint(g,l+v),new mxPoint(g,l)]);v=a.getCenterX();a=a.getCenterY();a=new mxPoint(v,a);d&&(b.x<g||b.x>g+n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(l,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,b,f){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=d?q.prototype.fixedSize:q.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,
+"size",e));var g=a.x,l=a.y,n=a.width,v=a.height,ba=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(d=d?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+n-d,l),new mxPoint(g+n,a),new mxPoint(g+n-d,l+v),new mxPoint(g,l+v),new mxPoint(g+d,a),new mxPoint(g,l)]):c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(n,e)):n*Math.max(0,
+Math.min(1,e)),l=[new mxPoint(g+d,l),new mxPoint(g+n,l),new mxPoint(g+n-d,a),new mxPoint(g+n,l+v),new mxPoint(g+d,l+v),new mxPoint(g,a),new mxPoint(g+d,l)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(v,e)):v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l+d),new mxPoint(ba,l),new mxPoint(g+n,l+d),new mxPoint(g+n,l+v),new mxPoint(ba,l+v-d),new mxPoint(g,l+v),new mxPoint(g,l+d)]):(d=d?Math.max(0,Math.min(v,e)):v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(ba,l+d),new mxPoint(g+
+n,l),new mxPoint(g+n,l+v-d),new mxPoint(ba,l+v),new mxPoint(g,l+v-d),new mxPoint(g,l)]);ba=new mxPoint(ba,a);f&&(b.x<g||b.x>g+n?ba.y=b.y:ba.x=b.x);return mxUtils.getPerimeterPoint(l,ba,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,b,f){var d=E.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d));var e=a.x,g=a.y,l=a.width,n=a.height,v=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,
+mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=n*Math.max(0,Math.min(1,d)),g=[new mxPoint(v,g),new mxPoint(e+l,g+d),new mxPoint(e+l,g+n-d),new mxPoint(v,g+n),new mxPoint(e,g+n-d),new mxPoint(e,g+d),new mxPoint(v,g)]):(d=l*Math.max(0,Math.min(1,d)),g=[new mxPoint(e+d,g),new mxPoint(e+l-d,g),new mxPoint(e+l,a),new mxPoint(e+l-d,g+n),new mxPoint(e+d,g+n),new mxPoint(e,a),new mxPoint(e+d,g)]);v=new mxPoint(v,a);f&&(b.x<e||b.x>e+
+l?v.y=b.y:v.x=b.x);return mxUtils.getPerimeterPoint(g,v,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(N,mxShape);N.prototype.size=10;N.prototype.paintBackground=function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,b);a.ellipse((f-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(f/2,e);a.lineTo(f/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",N);mxUtils.extend(P,mxShape);P.prototype.size=
+10;P.prototype.inset=2;P.prototype.paintBackground=function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.begin();a.moveTo(f/2,e+g);a.lineTo(f/2,d);a.end();a.stroke();a.begin();a.moveTo((f-e)/2-g,e/2);a.quadTo((f-e)/2-g,e+g,f/2,e+g);a.quadTo((f+e)/2+g,e+g,(f+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",P);mxUtils.extend(ca,mxShape);ca.prototype.paintBackground=
+function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(0,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",ca);mxUtils.extend(V,mxShape);V.prototype.inset=2;V.prototype.paintBackground=function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.ellipse(0,e,f-2*e,d-2*e);a.fillAndStroke();a.begin();a.moveTo(f/2,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,f/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",
+V);mxUtils.extend(F,mxCylinder);F.prototype.jettyWidth=32;F.prototype.jettyHeight=12;F.prototype.redrawPath=function(a,c,b,f,d,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,l=.3*d-c/2,n=.7*d-c/2;e?(a.moveTo(b,l),a.lineTo(g,l),a.lineTo(g,l+c),a.lineTo(b,l+c),a.moveTo(b,n),a.lineTo(g,n),a.lineTo(g,n+c),a.lineTo(b,n+c)):(a.moveTo(b,0),a.lineTo(f,0),a.lineTo(f,d),a.lineTo(b,d),
+a.lineTo(b,n+c),a.lineTo(0,n+c),a.lineTo(0,n),a.lineTo(b,n),a.lineTo(b,l+c),a.lineTo(0,l+c),a.lineTo(0,l),a.lineTo(b,l),a.close());a.end()};mxCellRenderer.registerShape("component",F);mxUtils.extend(Y,mxRectangleShape);Y.prototype.paintForeground=function(a,c,b,f,d){var e=f/2,g=d/2,l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(c+e,b),new mxPoint(c+f,b+g),new mxPoint(c+e,b+d),new mxPoint(c,b+g)],this.isRounded,l,!0);a.stroke();
+mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Y);mxUtils.extend(fa,mxDoubleEllipse);fa.prototype.outerStroke=!0;fa.prototype.paintVertexShape=function(a,c,b,f,d){var e=Math.min(4,Math.min(f/5,d/5));0<f&&0<d&&(a.ellipse(c+e,b+e,f-2*e,d-2*e),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,b,f,d),a.stroke())};mxCellRenderer.registerShape("endState",fa);mxUtils.extend(la,fa);la.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",
+la);mxUtils.extend(Z,mxArrowConnector);Z.prototype.defaultWidth=4;Z.prototype.isOpenEnded=function(){return!0};Z.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Z.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Z);mxUtils.extend(ia,mxArrowConnector);ia.prototype.defaultWidth=10;ia.prototype.defaultArrowWidth=20;ia.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+
+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};ia.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};ia.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",ia);mxUtils.extend(U,mxActor);U.prototype.size=30;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(a,
+c,b,f,d){c=Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(0,c),new mxPoint(f,0),new mxPoint(f,d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",U);mxUtils.extend(T,mxRectangleShape);T.prototype.dx=20;T.prototype.dy=20;T.prototype.isHtmlAllowed=function(){return!1};T.prototype.paintForeground=function(a,c,b,f,d){mxRectangleShape.prototype.paintForeground.apply(this,
+arguments);var e=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(f*g,d*g));g=Math.max(e,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,b+e);a.lineTo(c+f,b+e);a.end();a.stroke();a.begin();a.moveTo(c+g,b);a.lineTo(c+g,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",
+T);mxUtils.extend(ga,mxActor);ga.prototype.dx=20;ga.prototype.dy=20;ga.prototype.redrawPath=function(a,c,b,f,d){c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,b),new mxPoint(c,
+b),new mxPoint(c,d),new mxPoint(0,d)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("corner",ga);mxUtils.extend(pa,mxActor);pa.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.lineTo(0,d);a.end();a.moveTo(f,0);a.lineTo(f,d);a.end();a.moveTo(0,d/2);a.lineTo(f,d/2);a.end()};mxCellRenderer.registerShape("crossbar",pa);mxUtils.extend(X,mxActor);X.prototype.dx=20;X.prototype.dy=20;X.prototype.redrawPath=function(a,c,b,f,d){c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx))));b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,b),new mxPoint((f+c)/2,b),new mxPoint((f+c)/2,d),new mxPoint((f-c)/2,d),new mxPoint((f-c)/2,b),new mxPoint(0,b)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",X);mxUtils.extend(aa,
+mxActor);aa.prototype.arrowWidth=.3;aa.prototype.arrowSize=.2;aa.prototype.redrawPath=function(a,c,b,f,d){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));b=(d-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(f-c,b),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-
+c,d),new mxPoint(f-c,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",aa);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(a,c,b,f,d){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",aa.prototype.arrowWidth))));c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",aa.prototype.arrowSize))));b=(d-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;this.addPoints(a,[new mxPoint(0,d/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(f-c,b),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-c,d),new mxPoint(f-c,e),new mxPoint(c,e),new mxPoint(c,d)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",O);mxUtils.extend(L,mxActor);L.prototype.size=.1;L.prototype.redrawPath=function(a,c,b,f,d){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,0);a.lineTo(f,0);a.quadTo(f-2*c,d/2,
+f,d);a.lineTo(c,d);a.quadTo(c-2*c,d/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",L);mxUtils.extend(ja,mxActor);ja.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.close();a.end()};mxCellRenderer.registerShape("or",ja);mxUtils.extend(R,mxActor);R.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.quadTo(f/2,d/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",R);mxUtils.extend(Q,
+mxActor);Q.prototype.size=20;Q.prototype.isRoundable=function(){return!0};Q.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f/2,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(f-c,0),new mxPoint(f,.8*c),new mxPoint(f,d),new mxPoint(0,d),new mxPoint(0,.8*c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("loopLimit",Q);mxUtils.extend(ea,
+mxActor);ea.prototype.size=.375;ea.prototype.isRoundable=function(){return!0};ea.prototype.redrawPath=function(a,c,b,f,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,d-c),new mxPoint(f/2,d),new mxPoint(0,d-c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",ea);mxUtils.extend(ta,
+mxEllipse);ta.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+f/2,b+d);a.lineTo(c+f,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",ta);mxUtils.extend(I,mxEllipse);I.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+d/2);a.lineTo(c+f,b+d/2);a.end();a.stroke();a.begin();a.moveTo(c+f/2,b);a.lineTo(c+f/2,b+d);a.end();
+a.stroke()};mxCellRenderer.registerShape("orEllipse",I);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*f,b+.145*d);a.lineTo(c+.855*f,b+.855*d);a.end();a.stroke();a.begin();a.moveTo(c+.855*f,b+.145*d);a.lineTo(c+.145*f,b+.855*d);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",ma);mxUtils.extend(da,mxRhombus);da.prototype.paintVertexShape=function(a,c,b,
+f,d){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+d/2);a.lineTo(c+f,b+d/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",da);mxUtils.extend(ha,mxEllipse);ha.prototype.paintVertexShape=function(a,c,b,f,d){a.begin();a.moveTo(c,b);a.lineTo(c+f,b);a.lineTo(c+f/2,b+d/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,b+d);a.lineTo(c+f,b+d);a.lineTo(c+f/2,b+d/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",ha);mxUtils.extend(Aa,
+mxEllipse);Aa.prototype.paintVertexShape=function(a,c,b,f,d){var e=b+d-5;a.begin();a.moveTo(c,b);a.lineTo(c,b+d);a.moveTo(c,e);a.lineTo(c+10,e-5);a.moveTo(c,e);a.lineTo(c+10,e+5);a.moveTo(c,e);a.lineTo(c+f,e);a.moveTo(c+f,b);a.lineTo(c+f,b+d);a.moveTo(c+f,e);a.lineTo(c+f-10,e-5);a.moveTo(c+f,e);a.lineTo(c+f-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",Aa);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=function(a,c,b,f,d){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,
+arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(c,b,f,d),a.fill(),a.begin(),a.moveTo(c,b),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+f,b):a.moveTo(c+f,b),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(c+f,b+d):a.moveTo(c+f,b+d),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,b+d):a.moveTo(c,b+d),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(c,b-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",Ba);mxUtils.extend(za,
+mxEllipse);za.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+f/2,b),a.lineTo(c+f/2,b+d)):(a.moveTo(c,b+d/2),a.lineTo(c+f,b+d/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",za);mxUtils.extend(na,mxActor);na.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f,d/2);a.moveTo(0,0);a.lineTo(f-c,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,f-c,d);a.lineTo(0,
+d);a.close();a.end()};mxCellRenderer.registerShape("delay",na);mxUtils.extend(ka,mxActor);ka.prototype.size=.2;ka.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(d,f);var e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(d-e)/2;b=c+e;var g=(f-e)/2,e=g+e;a.moveTo(0,c);a.lineTo(g,c);a.lineTo(g,0);a.lineTo(e,0);a.lineTo(e,c);a.lineTo(f,c);a.lineTo(f,b);a.lineTo(e,b);a.lineTo(e,d);a.lineTo(g,d);a.lineTo(g,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross",
+ka);mxUtils.extend(ra,mxActor);ra.prototype.size=.25;ra.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f,d/2);b=Math.min(f-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*f);a.moveTo(0,d/2);a.lineTo(b,0);a.lineTo(f-c,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,f-c,d);a.lineTo(b,d);a.close();a.end()};mxCellRenderer.registerShape("display",ra);mxUtils.extend(oa,mxConnector);oa.prototype.origPaintEdgeShape=oa.prototype.paintEdgeShape;oa.prototype.paintEdgeShape=function(a,c,b){for(var f=
+[],d=0;d<c.length;d++)f.push(mxUtils.clone(c[d]));var d=a.state.dashed,e=a.state.fixDash;oa.prototype.origPaintEdgeShape.apply(this,[a,f,b]);3<=a.state.strokeWidth&&(f=mxUtils.getValue(this.style,"fillColor",null),null!=f&&(a.setStrokeColor(f),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(d,e),oa.prototype.origPaintEdgeShape.apply(this,[a,c,b])))};mxCellRenderer.registerShape("filledEdge",oa);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;
+StyleFormatPanel.prototype.getCustomColors=function(){var c=this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==c.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return b}}();mxMarker.addMarker("dash",function(a,c,b,f,d,e,g,l,n,v){var t=d*(g+n+1),q=e*(g+n+1);return function(){a.begin();a.moveTo(f.x-t/2-q/2,f.y-q/2+t/2);a.lineTo(f.x+q/2-3*t/2,f.y-3*q/2-t/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,f,d,e,g,l,n,
+v){var t=d*(g+n+1),q=e*(g+n+1);return function(){a.begin();a.moveTo(f.x-t/2-q/2,f.y-q/2+t/2);a.lineTo(f.x+q/2-3*t/2,f.y-3*q/2-t/2);a.moveTo(f.x-t/2+q/2,f.y-q/2-t/2);a.lineTo(f.x-q/2-3*t/2,f.y-3*q/2+t/2);a.stroke()}});mxMarker.addMarker("circle",ua);mxMarker.addMarker("circlePlus",function(a,c,b,f,d,e,g,l,n,v){var t=f.clone(),q=ua.apply(this,arguments),y=d*(g+2*n),k=e*(g+2*n);return function(){q.apply(this,arguments);a.begin();a.moveTo(t.x-d*n,t.y-e*n);a.lineTo(t.x-2*y+d*n,t.y-2*k+e*n);a.moveTo(t.x-
+y-k+e*n,t.y-k+y-d*n);a.lineTo(t.x+k-y-e*n,t.y-k-y+d*n);a.stroke()}});mxMarker.addMarker("halfCircle",function(a,c,b,f,d,e,g,l,n,v){var t=d*(g+n+1),q=e*(g+n+1),y=f.clone();f.x-=t;f.y-=q;return function(){a.begin();a.moveTo(y.x-q,y.y+t);a.quadTo(f.x-q,f.y+t,f.x,f.y);a.quadTo(f.x+q,f.y-t,y.x+q,y.y-t);a.stroke()}});mxMarker.addMarker("async",function(a,c,b,f,d,e,g,l,n,v){c=d*n*1.118;b=e*n*1.118;d*=g+n;e*=g+n;var t=f.clone();t.x-=c;t.y-=b;f.x+=1*-d-c;f.y+=1*-e-b;return function(){a.begin();a.moveTo(t.x,
+t.y);l?a.lineTo(t.x-d-e/2,t.y-e+d/2):a.lineTo(t.x+e/2-d,t.y-e-d/2);a.lineTo(t.x-d,t.y-e);a.close();v?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,b,f,d,e,g,l,n,v,t){e*=l+v;g*=l+v;var q=d.clone();return function(){c.begin();c.moveTo(q.x,q.y);n?c.lineTo(q.x-e-g/a,q.y-g+e/a):c.lineTo(q.x+g/a-e,q.y-g-e/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ha=function(a,c,b){return Fa(a,["width"],c,function(c,f,d,e,g){g=a.shape.getEdgeWidth()*
+a.view.scale+b;return new mxPoint(e.x+f*c/4+d*g/2,e.y+d*c/4-f*g/2)},function(c,f,d,e,g,l){c=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));a.style.width=Math.round(2*c)/a.view.scale-b})},Fa=function(a,c,b,f,d){return W(a,c,function(c){var d=a.absolutePoints,e=d.length-1;c=a.view.translate;var g=a.view.scale,l=b?d[0]:d[e],d=b?d[1]:d[e-1],e=d.x-l.x,n=d.y-l.y,v=Math.sqrt(e*e+n*n),l=f.call(this,v,e/v,n/v,l,d);return new mxPoint(l.x/g-c.x,l.y/g-c.y)},function(c,f,e){var g=a.absolutePoints,l=g.length-
+1;c=a.view.translate;var n=a.view.scale,v=b?g[0]:g[l],g=b?g[1]:g[l-1],l=g.x-v.x,t=g.y-v.y,q=Math.sqrt(l*l+t*t);f.x=(f.x+c.x)*n;f.y=(f.y+c.y)*n;d.call(this,q,l/q,t/q,v,g,f,e)})},va=function(a){return function(c){return[W(c,["arrowWidth","arrowSize"],function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",aa.prototype.arrowWidth))),f=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",aa.prototype.arrowSize)));return new mxPoint(c.x+(1-f)*c.width,c.y+(1-
+b)*c.height/2)},function(c,b){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(c.y+c.height/2-b.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-b.x)/c.width))})]}},Na=function(a,c,b){return function(f){var d=[W(f,["size"],function(b){var f=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",c)))))*a;return new mxPoint(b.x+f,b.y+f)},function(c,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(c.width,
+b.x-c.x),Math.min(c.height,b.y-c.y)))/a)})];b&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(sa(f));return d}},Ia=function(a,c,b,f,d){b=null!=b?b:1;return function(e){var g=[W(e,["size"],function(c){var b=null!=d?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,f=parseFloat(mxUtils.getValue(this.state.style,"size",b?d:a));return new mxPoint(c.x+Math.max(0,Math.min(c.width,f*(b?1:c.width))),c.getCenterY())},function(a,c,f){var g=null!=d?"0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0"):null;a=g?c.x-a.x:Math.max(0,Math.min(b,(c.x-a.x)/a.width));g&&!mxEvent.isAltDown(f.getEvent())&&(a=e.view.graph.snap(a));this.state.style.size=a},null,f)];c&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(sa(e));return g}},Oa=function(a){return function(c){var b=[W(c,["size"],function(c){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size))));return new mxPoint(c.x+b*c.width*.75,c.y+c.height/4)},function(c,b){this.state.style.size=
+Math.max(0,Math.min(a,(b.x-c.x)/(.75*c.width)))},null,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(sa(c));return b}},Ea=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(sa(a));return c}},sa=function(a,c){return W(a,[mxConstants.STYLE_ARCSIZE],function(b){var f=null!=c?c:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var d=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;return new mxPoint(b.x+b.width-Math.min(b.width/2,d),b.y+f)}d=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(b.x+b.width-Math.min(Math.max(b.width/2,b.height/2),Math.min(b.width,b.height)*d),b.y+f)},function(c,b,f){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(c.width,2*(c.x+c.width-b.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=
+Math.round(Math.min(50,Math.max(0,100*(c.width-b.x+c.x)/Math.min(c.width,c.height))))})},W=function(a,c,b,f,d,e){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<c.length;a++)this.copyStyle(c[a])};g.getPosition=b;g.setPosition=f;g.ignoreGrid=null!=d?d:!0;if(e){var l=g.positionChanged;g.positionChanged=function(){l.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},Ja={link:function(a){return[Ha(a,!0,10),
+Ha(a,!1,10)]},flexArrow:function(a){var c=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(Fa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,f,d,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)+f*c/2,d.y+
+f*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,f,d,e,g,l,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(n.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-
+parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),b.push(Fa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,f,d,e){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)+f*c/2,d.y+f*(e+a.shape.strokewidth*
+a.view.scale)-b*c/2)},function(b,f,d,e,g,l,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(n.getEvent())||
+(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<c&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(Fa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,f,d,e){c=(a.shape.getEdgeWidth()-
+a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)-f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,f,d,e,g,l,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*
+b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(n.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(Fa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,f,d,e){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*
+a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)-f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,f,d,e,g,l,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/
+a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(n.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<c&&(a.style.endWidth=a.style.startWidth))})));return b},
+swimlane:function(a){var c=[W(a,[mxConstants.STYLE_STARTSIZE],function(c){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(c.getCenterX(),c.y+Math.max(0,Math.min(c.height,b))):new mxPoint(c.x+Math.max(0,Math.min(c.width,b)),c.getCenterY())},function(c,b){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,
+Math.min(c.height,b.y-c.y))):Math.round(Math.max(0,Math.min(c.width,b.x-c.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(sa(a,b/2))}return c},label:Ea(),ext:Ea(),rectangle:Ea(),triangle:Ea(),rhombus:Ea(),umlLifeline:function(a){return[W(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",C.prototype.size))));return new mxPoint(a.getCenterX(),
+a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[W(a,["width","height"],function(a){var c=Math.max(K.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",K.prototype.width))),b=Math.max(1.5*K.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",K.prototype.height)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.width=Math.round(Math.max(K.prototype.corner,
+Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*K.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},process:function(a){var c=[W(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,c){this.state.style.size=Math.max(0,Math.min(.5,(c.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(sa(a));return c},cross:function(a){return[W(a,
+["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",ka.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var b=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/b*2,Math.max(0,a.getCenterX()-c.x)/b*2)))})]},note:function(a){return[W(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,
+"size",k.prototype.size)))));return new mxPoint(a.x+a.width-c,a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=[W(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",U.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))})];mxUtils.getValue(a.style,
+mxConstants.STYLE_ROUNDED,!1)&&c.push(sa(a));return c},dataStorage:function(a){return[W(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(a.x+(1-c)*a.width,a.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-c.x)/a.width))})]},callout:function(a){var c=[W(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",A.prototype.size))),
+b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position)));mxUtils.getValue(this.state.style,"base",A.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style,"base",A.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),W(a,["position2"],function(a){var c=Math.max(0,Math.min(1,
+mxUtils.getValue(this.state.style,"position2",A.prototype.position2)));return new mxPoint(a.x+c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),W(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",A.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position))),f=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
+"base",A.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+f),a.y+a.height-c)},function(a,c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,c.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(sa(a));return c},internalStorage:function(a){var c=[W(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
+"dx",T.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",T.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(sa(a));return c},corner:function(a){return[W(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
+"dx",ga.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ga.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},tee:function(a){return[W(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",X.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
+"dy",X.prototype.dy)));return new mxPoint(a.x+(a.width+c)/2,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,c.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},singleArrow:va(1),doubleArrow:va(.5),folder:function(a){return[W(a,["tabWidth","tabHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",p.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
+"tabHeight",p.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);return new mxPoint(a.x+c,a.y+b)},function(a,c){var b=Math.max(0,Math.min(a.width,c.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},document:function(a){return[W(a,
+["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",B.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},tape:function(a){return[W(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",x.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c*a.height/2)},function(a,c){this.state.style.size=
+Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[W(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ea.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},step:Ia(q.prototype.size,!0,null,!0,q.prototype.fixedSize),hexagon:Ia(E.prototype.size,!0,.5,!0),curlyBracket:Ia(g.prototype.size,!1),display:Ia(ra.prototype.size,
+!1),cube:Na(1,a.prototype.size,!1),card:Na(.5,u.prototype.size,!0),loopLimit:Na(.5,Q.prototype.size,!0),trapezoid:Oa(.5),parallelogram:Oa(1)};Graph.createHandle=W;Graph.handleFactory=Ja;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=Ja[a];null==a&&null!=this.state.shape&&
+this.state.shape.isRoundable()&&(a=Ja[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=Ja[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Ka=new mxPoint(1,0),La=new mxPoint(1,
+0),va=mxUtils.toRadians(-30),Ka=mxUtils.getRotatedPoint(Ka,Math.cos(va),Math.sin(va)),va=mxUtils.toRadians(-150),La=mxUtils.getRotatedPoint(La,Math.cos(va),Math.sin(va));mxEdgeStyle.IsometricConnector=function(a,c,b,f,d){var e=a.view;f=null!=f&&0<f.length?f[0]:null;var g=a.absolutePoints,l=g[0],g=g[g.length-1];null!=f&&(f=e.transformControlPoint(a,f));null==l&&null!=c&&(l=new mxPoint(c.getCenterX(),c.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));var n=Ka.x,v=Ka.y,
+t=La.x,q=La.y,y="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=l){a=function(a,c,b){a-=k.x;var f=c-k.y;c=(q*a-t*f)/(n*q-v*t);a=(v*a-n*f)/(v*t-n*q);y?(b&&(k=new mxPoint(k.x+n*c,k.y+v*c),d.push(k)),k=new mxPoint(k.x+t*a,k.y+q*a)):(b&&(k=new mxPoint(k.x+t*a,k.y+q*a),d.push(k)),k=new mxPoint(k.x+n*c,k.y+v*c));d.push(k)};var k=l;null==f&&(f=new mxPoint(l.x+(g.x-l.x)/2,l.y+(g.y-l.y)/2));a(f.x,f.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);
+var Pa=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,c){if(c==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Pa.apply(this,arguments)};b.prototype.constraints=[];e.prototype.getConstraints=function(a,c,b){a=[];var f=Math.tan(mxUtils.toRadians(30)),d=(.5-f)/2,f=Math.min(c,b/(.5+f));c=(c-f)/2;b=(b-f)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b+.25*f));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,c+.5*f,b+f*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+f,b+.25*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+f,b+.75*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*f,b+(1-d)*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b+.75*f));return a};A.prototype.getConstraints=function(a,c,b){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b-f)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-f)));c>=2*f&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.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),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),
+new mxConnectionConstraint(new mxPoint(.75,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))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;
+mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;z.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),0));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,c-f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*f,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b+f)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c>=2*f&&a.push(new mxConnectionConstraint(new mxPoint(.5,
+0),!1));return a};u.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.5*(b+f)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c>=2*f&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};a.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*f,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b+f)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),b));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,b-.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-f)));return a};p.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,
+"tabPosition",this.tabPosition)?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,d)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),d))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*f,0)),a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,c-f,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,d)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.25*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.75*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
+null,c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,
+1),!1));return a};T.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;ta.prototype.constraints=mxEllipse.prototype.constraints;I.prototype.constraints=mxEllipse.prototype.constraints;ma.prototype.constraints=mxEllipse.prototype.constraints;za.prototype.constraints=mxEllipse.prototype.constraints;U.prototype.constraints=mxRectangleShape.prototype.constraints;na.prototype.constraints=mxRectangleShape.prototype.constraints;ra.prototype.getConstraints=
+function(a,c,b){a=[];var f=Math.min(c,b/2),d=Math.min(c-f,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-f),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,c-f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-f),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));return a};Q.prototype.constraints=mxRectangleShape.prototype.constraints;ea.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)];v.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)];F.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)];m.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)];x.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)];q.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)];N.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)];c.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.constraints=mxRectangleShape.prototype.constraints;B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,
+0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(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;X.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx)))),d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*c+.25*f,d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(c+f),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.25*c-.25*f,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*d));return a};ga.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,b));a.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return a};pa.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)];aa.prototype.getConstraints=function(a,c,b){a=[];var f=b*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=(b-f)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),f));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-f));return a};O.prototype.getConstraints=function(a,c,b){a=[];var f=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",aa.prototype.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowSize",aa.prototype.arrowSize)))),f=(b-f)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,b-f));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d,b));return a};ka.prototype.getConstraints=function(a,c,b){a=[];var f=Math.min(b,c),d=Math.max(0,Math.min(f,f*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),f=(b-d)/2,e=f+d,g=(c-d)/2,d=g+d;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b-.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b-.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(c+d),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,f));return a};C.prototype.constraints=null;ja.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)];R.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)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.5),!1)];V.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
+Actions.prototype.init=function(){function a(a){d.escape();var b=d.getDeletableCells(d.getSelectionCells());if(null!=b&&0<b.length){var e=d.selectParentAfterDelete?d.model.getParents(b):null;d.removeCells(b,a);if(null!=e){a=[];for(b=0;b<e.length;b++)d.model.contains(e[b])&&(d.model.isVertex(e[b])||d.model.isEdge(e[b]))&&a.push(e[b]);d.setSelectionCells(a)}}}var b=this.editorUi,e=b.editor,d=e.graph,k=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",
+function(){d.openLink(b.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var d=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(d.documentElement))}catch(c){mxUtils.alert(mxResources.get("invalidOrMissingFile")+
+": "+c.message)}}));b.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=k;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,296,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container,
+620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=k;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN?
+Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{mxClipboard.copy(d)}catch(u){b.handleError(u)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&mxClipboard.paste(d)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){d.getModel().beginUpdate();
+try{var b=mxClipboard.paste(d);if(null!=b){a=!0;for(var e=0;e<b.length&&a;e++)a=a&&d.model.isEdge(b[e]);var c=d.view.translate,f=d.view.scale,g=c.x,t=c.y,c=null;if(1==b.length&&a){var n=d.getCellGeometry(b[0]);null!=n&&(c=n.getTerminalPoint(!0))}c=null!=c?c:d.getBoundingBoxFromGeometry(b,a);if(null!=c){var l=Math.round(d.snap(d.popupMenuHandler.triggerX/f-g)),y=Math.round(d.snap(d.popupMenuHandler.triggerY/f-t));d.cellsMoved(b,l-c.x,y-c.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("copySize",
+function(a){a=d.getSelectionCell();d.isEnabled()&&null!=a&&d.getModel().isVertex(a)&&(a=d.getCellGeometry(a),null!=a&&(b.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",function(a){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=b.copiedSize){d.getModel().beginUpdate();try{var e=d.getSelectionCells();for(a=0;a<e.length;a++)if(d.getModel().isVertex(e[a])){var k=d.getCellGeometry(e[a]);null!=k&&(k=k.clone(),k.width=b.copiedSize.width,k.height=
+b.copiedSize.height,d.getModel().setGeometry(e[a],k))}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{d.setSelectionCells(d.duplicateCells())}catch(u){b.handleError(u)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),
function(){d.turnShapes(d.getSelectionCells())},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){d.selectVertices()},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){d.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){d.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){d.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();
try{var a=d.isCellMovable(d.getSelectionCell())?1:0;d.toggleCellStyles(mxConstants.STYLE_MOVABLE,a);d.toggleCellStyles(mxConstants.STYLE_RESIZABLE,a);d.toggleCellStyles(mxConstants.STYLE_ROTATABLE,a);d.toggleCellStyles(mxConstants.STYLE_DELETABLE,a);d.toggleCellStyles(mxConstants.STYLE_EDITABLE,a);d.toggleCellStyles("connectable",a)}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){d.home()},null,null,"Home");this.addAction("exitGroup",function(){d.exitGroup()},
null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){d.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){d.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){d.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){d.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){d.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("group",
function(){1==d.getSelectionCount()?d.setCellStyles("container","1"):d.setSelectionCell(d.groupCells(null,0))},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){1==d.getSelectionCount()&&0==d.getModel().getChildCount(d.getSelectionCell())?d.setCellStyles("container","0"):d.setSelectionCells(d.ungroupCells())},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){d.removeCellsFromParent()});this.addAction("edit",function(){d.isEnabled()&&d.startEditingAtCell()},
-null,null,"F2/Enter");this.addAction("editData...",function(){var a=d.getSelectionCell()||d.getModel().getRoot();b.showDataDialog(a)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var d=a.getSelectionCell(),f="";if(mxUtils.isNode(d.value)){var c=d.value.getAttribute("tooltip");null!=c&&(f=c)}f=new TextareaDialog(b,mxResources.get("editTooltip")+":",f,function(c){a.setTooltipForCell(d,c)});b.showDialog(f.container,
-320,200,!0,!0);f.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var a=d.getLinkForCell(d.getSelectionCell());null!=a&&d.openLink(a)});this.addAction("editLink...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var d=a.getSelectionCell(),f=a.getLinkForCell(d)||"";b.showLinkDialog(f,mxResources.get("apply"),function(c){c=mxUtils.trim(c);a.setLinkForCell(d,0<c.length?c:null)})}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+
-"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),b.actions.get("image").funct())})).isEnabled=l;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),function(a,b){a=mxUtils.trim(a);if(0<a.length){var f=null,c=d.getLinkTitle(a);null!=b&&0<b.length&&(f=b[0].iconUrl,c=b[0].name||b[0].type,c=c.charAt(0).toUpperCase()+c.substring(1),30<c.length&&
-(c=c.substring(0,30)+"..."));var e=d.getFreeInsertPoint(),f=new mxCell(c,new mxGeometry(e.x,e.y,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;"));f.vertex=!0;d.setLinkForCell(f,a);d.cellSizeUpdated(f,!0);d.getModel().beginUpdate();try{f=d.addCell(f),d.fireEvent(new mxEventObject("cellsInserted","cells",[f]))}finally{d.getModel().endUpdate()}d.setSelectionCell(f);d.scrollCellToVisible(d.getSelectionCell())}})})).isEnabled=
-l;this.addAction("link...",mxUtils.bind(this,function(){var a=b.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var d=a.getSelectedElement(),f=a.getParentByName(d,"A",a.cellEditor.textarea),c="";if(null==f&&null!=d&&null!=d.getElementsByTagName)for(var e=d.getElementsByTagName("a"),k=0;k<e.length&&null==f;k++)e[k].textContent==d.textContent&&(f=e[k]);null!=f&&"A"==f.nodeName&&(c=f.getAttribute("href")||"",a.selectNode(f));var q=a.cellEditor.saveSelection();b.showLinkDialog(c,mxResources.get("apply"),
-mxUtils.bind(this,function(c){a.cellEditor.restoreSelection(q);null!=c&&a.insertLink(c)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=l;this.addAction("autosize",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var f=a[b];if(d.getModel().getChildCount(f))d.updateGroupBounds([f],20);else{var c=d.view.getState(f),e=d.getCellGeometry(f);d.getModel().isVertex(f)&&null!=c&&null!=c.text&&
-null!=e&&d.isWrapping(f)?(e=e.clone(),e.height=c.text.boundingBox.height/d.view.scale,d.getModel().setGeometry(f,e)):d.updateCellSize(f)}}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=d.getView().getState(d.getSelectionCell());if(null!=a){d.stopEditing();a="1"==a.style.html?null:"1";d.getModel().beginUpdate();try{for(var f=d.getSelectionCells(),l=0;l<f.length;l++)if(state=d.getView().getState(f[l]),null!=state){var c=mxUtils.getValue(state.style,
-"html","0");if("1"==c&&null==a){var e=d.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(e=e.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var k=document.createElement("div");k.innerHTML=e;e=mxUtils.extractTextWithWhitespace(k.childNodes);d.cellLabelChanged(state.cell,e);d.setCellStyles("html",a,[f[l]])}else"0"==c&&"1"==a&&(e=mxUtils.htmlEntities(d.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(e=e.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,
-d.sanitizeHtml(e)),d.setCellStyles("html",a,[f[l]]))}b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=a?a:"0"],"cells",f))}finally{d.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=d.getView().getState(d.getSelectionCell()),b="wrap";d.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(b=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,b)});this.addAction("rotation",function(){var a="0",f=d.getView().getState(d.getSelectionCell());
-null!=f&&(a=f.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(b,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");b.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){d.zoomTo(1);b.resetScrollbars()},null,null,Editor.ctrlKey+"+H");this.addAction("zoomIn",function(a){"fast"==urlParams.zoom?d.lazyZoom(!0,!0):d.zoomIn()},null,
-null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(a){"fast"==urlParams.zoom?d.lazyZoom(!1,!0):d.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var a=d.isSelectionEmpty()?d.getGraphBounds():d.getBoundingBox(d.getSelectionCells()),b=d.view.translate,f=d.view.scale;a.width/=f;a.height/=f;a.x=a.x/f-b.x;a.y=a.y/f-b.y;var f=d.container.clientWidth-10,c=d.container.clientHeight-10,e=Math.floor(20*Math.min(f/a.width,
-c/a.height))/20;d.zoomTo(e);mxUtils.hasScrollbars(d.container)&&(d.container.scrollTop=(a.y+b.y)*e-Math.max((c-a.height*e)/2+5,0),d.container.scrollLeft=(a.x+b.x)*e-Math.max((f-a.width*e)/2+5,0))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,b=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/a.width/b,(d.container.clientHeight-10)/a.height/b))/20);mxUtils.hasScrollbars(d.container)&&
+null,null,"F2/Enter");this.addAction("editData...",function(){var a=d.getSelectionCell()||d.getModel().getRoot();b.showDataDialog(a)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var d=a.getSelectionCell(),e="";if(mxUtils.isNode(d.value)){var c=d.value.getAttribute("tooltip");null!=c&&(e=c)}e=new TextareaDialog(b,mxResources.get("editTooltip")+":",e,function(c){a.setTooltipForCell(d,c)});b.showDialog(e.container,
+320,200,!0,!0);e.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var a=d.getLinkForCell(d.getSelectionCell());null!=a&&d.openLink(a)});this.addAction("editLink...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var d=a.getSelectionCell(),e=a.getLinkForCell(d)||"";b.showLinkDialog(e,mxResources.get("apply"),function(c){c=mxUtils.trim(c);a.setLinkForCell(d,0<c.length?c:null)})}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+
+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),b.actions.get("image").funct())})).isEnabled=k;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),function(a,b){a=mxUtils.trim(a);if(0<a.length){var e=null,c=d.getLinkTitle(a);null!=b&&0<b.length&&(e=b[0].iconUrl,c=b[0].name||b[0].type,c=c.charAt(0).toUpperCase()+c.substring(1),30<c.length&&
+(c=c.substring(0,30)+"..."));var f=d.getFreeInsertPoint(),e=new mxCell(c,new mxGeometry(f.x,f.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=e?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+e:"spacing=10;"));e.vertex=!0;d.setLinkForCell(e,a);d.cellSizeUpdated(e,!0);d.getModel().beginUpdate();try{e=d.addCell(e),d.fireEvent(new mxEventObject("cellsInserted","cells",[e]))}finally{d.getModel().endUpdate()}d.setSelectionCell(e);d.scrollCellToVisible(d.getSelectionCell())}})})).isEnabled=
+k;this.addAction("link...",mxUtils.bind(this,function(){var a=b.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var d=a.getSelectedElement(),e=a.getParentByName(d,"A",a.cellEditor.textarea),c="";if(null==e&&null!=d&&null!=d.getElementsByTagName)for(var f=d.getElementsByTagName("a"),g=0;g<f.length&&null==e;g++)f[g].textContent==d.textContent&&(e=f[g]);null!=e&&"A"==e.nodeName&&(c=e.getAttribute("href")||"",a.selectNode(e));var t=a.cellEditor.saveSelection();b.showLinkDialog(c,mxResources.get("apply"),
+mxUtils.bind(this,function(c){a.cellEditor.restoreSelection(t);null!=c&&a.insertLink(c)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var e=a[b];if(d.getModel().getChildCount(e))d.updateGroupBounds([e],20);else{var c=d.view.getState(e),f=d.getCellGeometry(e);d.getModel().isVertex(e)&&null!=c&&null!=c.text&&
+null!=f&&d.isWrapping(e)?(f=f.clone(),f.height=c.text.boundingBox.height/d.view.scale,d.getModel().setGeometry(e,f)):d.updateCellSize(e)}}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=d.getView().getState(d.getSelectionCell());if(null!=a){d.stopEditing();a="1"==a.style.html?null:"1";d.getModel().beginUpdate();try{for(var e=d.getSelectionCells(),k=0;k<e.length;k++)if(state=d.getView().getState(e[k]),null!=state){var c=mxUtils.getValue(state.style,
+"html","0");if("1"==c&&null==a){var f=d.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var g=document.createElement("div");g.innerHTML=f;f=mxUtils.extractTextWithWhitespace(g.childNodes);d.cellLabelChanged(state.cell,f);d.setCellStyles("html",a,[e[k]])}else"0"==c&&"1"==a&&(f=mxUtils.htmlEntities(d.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,
+d.sanitizeHtml(f)),d.setCellStyles("html",a,[e[k]]))}b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=a?a:"0"],"cells",e))}finally{d.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=d.getView().getState(d.getSelectionCell()),b="wrap";d.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(b=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,b)});this.addAction("rotation",function(){var a="0",e=d.getView().getState(d.getSelectionCell());
+null!=e&&(a=e.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(b,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");b.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){d.zoomTo(1);b.resetScrollbars()},null,null,Editor.ctrlKey+"+H");this.addAction("zoomIn",function(a){"fast"==urlParams.zoom?d.lazyZoom(!0,!0):d.zoomIn()},null,
+null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(a){"fast"==urlParams.zoom?d.lazyZoom(!1,!0):d.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var a=d.isSelectionEmpty()?d.getGraphBounds():d.getBoundingBox(d.getSelectionCells()),b=d.view.translate,e=d.view.scale;a.width/=e;a.height/=e;a.x=a.x/e-b.x;a.y=a.y/e-b.y;var e=d.container.clientWidth-10,c=d.container.clientHeight-10,f=Math.floor(20*Math.min(e/a.width,
+c/a.height))/20;d.zoomTo(f);mxUtils.hasScrollbars(d.container)&&(d.container.scrollTop=(a.y+b.y)*f-Math.max((c-a.height*f)/2+5,0),d.container.scrollLeft=(a.x+b.x)*f-Math.max((e-a.width*f)/2+5,0))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,b=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/a.width/b,(d.container.clientHeight-10)/a.height/b))/20);mxUtils.hasScrollbars(d.container)&&
(a=d.getPagePadding(),d.container.scrollTop=a.y*d.view.scale-1,d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,b=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/(2*a.width)/b,(d.container.clientHeight-10)/a.height/b))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),
d.container.scrollTop=Math.min(a.y,(d.container.scrollHeight-d.container.clientHeight)/2),d.container.scrollLeft=Math.min(a.x,(d.container.scrollWidth-d.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();d.zoomTo(Math.floor(20*(d.container.clientWidth-10)/d.pageFormat.width/d.pageScale)/20);if(mxUtils.hasScrollbars(d.container)){var a=d.getPagePadding();d.container.scrollLeft=Math.min(a.x*
d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&d.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,
function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&b.setPageScale(a/100)}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var m=null,m=this.addAction("grid",function(){d.setGridEnabled(!d.isGridEnabled());b.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.isGridEnabled()});
m.setEnabled(!1);m=this.addAction("guides",function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});m.setEnabled(!1);m=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled())});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});m=this.addAction("collapseExpand",
-function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!d.foldingEnabled;d.model.execute(a)});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.foldingEnabled});m.isEnabled=l;m=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.scrollbars});m=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!d.pageVisible)}));m.setToggleAction(!0);m.setSelectedCallback(function(){return d.pageVisible});
+function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!d.foldingEnabled;d.model.execute(a)});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.foldingEnabled});m.isEnabled=k;m=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.scrollbars});m=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!d.pageVisible)}));m.setToggleAction(!0);m.setSelectedCallback(function(){return d.pageVisible});
m=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionArrowsEnabled});m=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});
-m=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});m.isEnabled=l;m=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});m.setToggleAction(!0);m.setSelectedCallback(function(){return b.editor.autosave});m.isEnabled=l;m.visible=!1;this.addAction("help",function(){var a=
-"";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+a+".html")});var p=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){p||(b.showDialog((new AboutDialog(b)).container,320,280,!0,!0,function(){p=!1}),p=!0)},null,null,"F1"));m=mxUtils.bind(this,function(a,b,f,c){return this.addAction(a,function(){if(null!=f&&d.cellEditor.isContentEditing())f();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var a=
+m=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});m.isEnabled=k;m=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});m.setToggleAction(!0);m.setSelectedCallback(function(){return b.editor.autosave});m.isEnabled=k;m.visible=!1;this.addAction("help",function(){var a=
+"";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+a+".html")});var p=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){p||(b.showDialog((new AboutDialog(b)).container,320,280,!0,!0,function(){p=!1}),p=!0)},null,null,"F1"));m=mxUtils.bind(this,function(a,b,e,c){return this.addAction(a,function(){if(null!=e&&d.cellEditor.isContentEditing())e();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var a=
d.getSelectionCells();d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,b,a);(b&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontWeight=null;"B"==a.nodeName&&d.replaceElement(a)}):(b&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontStyle=null;"I"==a.nodeName&&d.replaceElement(a)}):(b&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(d.getSelectionCells(),
function(a){a.style.textDecoration=null;"U"==a.nodeName&&d.replaceElement(a)});for(var c=0;c<a.length;c++)0==d.model.getChildCount(a[c])&&d.autoSizeCell(a[c],!1)}finally{d.getModel().endUpdate()}}},null,null,c)});m("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");m("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");m("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",
!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){b.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){b.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){b.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,
@@ -2711,85 +2714,85 @@ function(a){a.style.textDecoration=null;"U"==a.nodeName&&d.replaceElement(a)});f
[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dashed",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});
this.addAction("dotted",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("sharp",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,
"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("rounded",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});
-this.addAction("toggleRounded",function(){if(!d.isSelectionEmpty()&&d.isEnabled()){d.getModel().beginUpdate();try{var a=d.getSelectionCells(),f=d.view.getState(a[0]),l=null!=f?f.style:d.getCellStyle(a[0]),c="1"==mxUtils.getValue(l,mxConstants.STYLE_ROUNDED,"0")?"0":"1";d.setCellStyles(mxConstants.STYLE_ROUNDED,c);d.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[c,"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});
-this.addAction("curved",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"1"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("collapsible",function(){var a=d.view.getState(d.getSelectionCell()),f="1";null!=a&&null!=d.getFoldingImage(a)&&(f="0");d.setCellStyles("collapsible",
-f);b.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[f],"cells",d.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var a=d.getSelectionCells();if(null!=a&&0<a.length){var b=d.getModel(),b=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",b.getStyle(a[0])||"",function(b){null!=b&&d.setCellStyle(mxUtils.trim(b),a)},null,null,400,220);this.editorUi.showDialog(b.container,420,300,!0,!0);b.init()}}),null,null,Editor.ctrlKey+
-"+E");this.addAction("setAsDefaultStyle",function(){d.isEnabled()&&!d.isSelectionEmpty()&&b.setDefaultStyle(d.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&&b.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=d.getSelectionCell();if(null!=a&&d.getModel().isEdge(a)){var b=f.graph.selectionCellsHandler.getHandler(a);if(b instanceof mxEdgeHandler){for(var l=d.view.translate,c=
-d.view.scale,e=l.x,l=l.y,a=d.getModel().getParent(a),k=d.getCellGeometry(a);d.getModel().isVertex(a)&&null!=k;)e+=k.x,l+=k.y,a=d.getModel().getParent(a),k=d.getCellGeometry(a);e=Math.round(d.snap(d.popupMenuHandler.triggerX/c-e));c=Math.round(d.snap(d.popupMenuHandler.triggerY/c-l));b.addPointAt(b.state,e,c)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=
-d.getSelectionCells();if(null!=a){a=d.addAllEdges(a);d.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var f=a[b];if(d.getModel().isEdge(f)){var c=d.getCellGeometry(f);null!=c&&(c=c.clone(),c.points=null,d.getModel().setGeometry(f,c))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");m=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");m=this.addAction("superscript",
-mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",f=d.getView().getState(d.getSelectionCell()),l="";null!=f&&(l=f.style[mxConstants.STYLE_IMAGE]||l);var c=d.cellEditor.saveSelection();b.showImageDialog(a,l,function(a,b,f){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(c),
-d.insertImage(a,b,f);else{var e=d.getSelectionCells();if(null!=a&&(0<a.length||0<e.length)){var k=null;d.getModel().beginUpdate();try{if(0==e.length){var q=d.getFreeInsertPoint(),k=e=[d.insertVertex(d.getDefaultParent(),null,"",q.x,q.y,b,f,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];d.fireEvent(new mxEventObject("cellsInserted","cells",k))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,e);var l=d.view.getState(e[0]),t=null!=l?l.style:d.getCellStyle(e[0]);
-"image"!=t[mxConstants.STYLE_SHAPE]&&"label"!=t[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",e):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,e);if(1==d.getSelectionCount()&&null!=b&&null!=f){var m=e[0],y=d.getModel().getGeometry(m);null!=y&&(y=y.clone(),y.width=b,y.height=f,d.getModel().setGeometry(m,y))}}finally{d.getModel().endUpdate()}null!=k&&(d.setSelectionCells(k),d.scrollCellToVisible(k[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=
-l;m=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers"))):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),
+this.addAction("toggleRounded",function(){if(!d.isSelectionEmpty()&&d.isEnabled()){d.getModel().beginUpdate();try{var a=d.getSelectionCells(),e=d.view.getState(a[0]),k=null!=e?e.style:d.getCellStyle(a[0]),c="1"==mxUtils.getValue(k,mxConstants.STYLE_ROUNDED,"0")?"0":"1";d.setCellStyles(mxConstants.STYLE_ROUNDED,c);d.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[c,"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});
+this.addAction("curved",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"1"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("collapsible",function(){var a=d.view.getState(d.getSelectionCell()),e="1";null!=a&&null!=d.getFoldingImage(a)&&(e="0");d.setCellStyles("collapsible",
+e);b.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[e],"cells",d.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var a=d.getSelectionCells();if(null!=a&&0<a.length){var b=d.getModel(),b=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",b.getStyle(a[0])||"",function(b){null!=b&&d.setCellStyle(mxUtils.trim(b),a)},null,null,400,220);this.editorUi.showDialog(b.container,420,300,!0,!0);b.init()}}),null,null,Editor.ctrlKey+
+"+E");this.addAction("setAsDefaultStyle",function(){d.isEnabled()&&!d.isSelectionEmpty()&&b.setDefaultStyle(d.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&&b.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=d.getSelectionCell();if(null!=a&&d.getModel().isEdge(a)){var b=e.graph.selectionCellsHandler.getHandler(a);if(b instanceof mxEdgeHandler){for(var k=d.view.translate,c=
+d.view.scale,f=k.x,k=k.y,a=d.getModel().getParent(a),g=d.getCellGeometry(a);d.getModel().isVertex(a)&&null!=g;)f+=g.x,k+=g.y,a=d.getModel().getParent(a),g=d.getCellGeometry(a);f=Math.round(d.snap(d.popupMenuHandler.triggerX/c-f));c=Math.round(d.snap(d.popupMenuHandler.triggerY/c-k));b.addPointAt(b.state,f,c)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=
+d.getSelectionCells();if(null!=a){a=d.addAllEdges(a);d.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var e=a[b];if(d.getModel().isEdge(e)){var c=d.getCellGeometry(e);null!=c&&(c=c.clone(),c.points=null,d.getModel().setGeometry(e,c))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");m=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");m=this.addAction("superscript",
+mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",e=d.getView().getState(d.getSelectionCell()),k="";null!=e&&(k=e.style[mxConstants.STYLE_IMAGE]||k);var c=d.cellEditor.saveSelection();b.showImageDialog(a,k,function(a,b,e){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(c),
+d.insertImage(a,b,e);else{var f=d.getSelectionCells();if(null!=a&&(0<a.length||0<f.length)){var g=null;d.getModel().beginUpdate();try{if(0==f.length){var t=d.getFreeInsertPoint(),g=f=[d.insertVertex(d.getDefaultParent(),null,"",t.x,t.y,b,e,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];d.fireEvent(new mxEventObject("cellsInserted","cells",g))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,f);var k=d.view.getState(f[0]),q=null!=k?k.style:d.getCellStyle(f[0]);
+"image"!=q[mxConstants.STYLE_SHAPE]&&"label"!=q[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",f):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==d.getSelectionCount()&&null!=b&&null!=e){var m=f[0],z=d.getModel().getGeometry(m);null!=z&&(z=z.clone(),z.width=b,z.height=e,d.getModel().setGeometry(m,z))}}finally{d.getModel().endUpdate()}null!=g&&(d.setSelectionCells(g),d.scrollCellToVisible(g[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=
+k;m=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers"))):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),
null,null,Editor.ctrlKey+"+Shift+L");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));m=this.addAction("formatPanel",mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));m=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=
new OutlineWindow(b,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,
-function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,b,f,d,l){var m;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),m=mxResources.get(a)+"..."):m=mxResources.get(a);return this.put(a,new Action(m,b,f,d,l))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};
-function Action(a,b,f,d,l){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=f?f:!0;this.iconCls=d;this.shortcut=l;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
+function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,b,e,d,k){var m;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),m=mxResources.get(a)+"..."):m=mxResources.get(a);return this.put(a,new Action(m,b,e,d,k))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};
+function Action(a,b,e,d,k){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=e?e:!0;this.iconCls=d;this.shortcut=k;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
Action.prototype.setToggleAction=function(a){this.toggleAction=a};Action.prototype.setSelectedCallback=function(a){this.selectedCallback=a};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(a,b){mxEventSource.call(this);this.ui=a;this.shadowData=this.data=b||"";this.shadowPages=null;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.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;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.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.reportEnabled=!0;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
DrawioFile.prototype.synchronizeFile=function(a,b){this.savingFile?null!=b&&b({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,b):this.updateFile(a,b)};
-DrawioFile.prototype.updateFile=function(a,b,f,d){null!=f&&f()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():this.getLatestVersion(mxUtils.bind(this,function(l){try{null!=f&&f()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():null!=l?this.mergeFile(l,a,b,d):this.reloadFile(a,b))}catch(m){null!=b&&b(m)}}),b))};
-DrawioFile.prototype.mergeFile=function(a,b,f,d){var l=!0;try{this.stats.fileMerged++;var m=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),p=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=p&&0<p.length){this.shadowPages=p;this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;var u=[this.ui.diffPages(null!=d?d:m,this.shadowPages)];if(!this.ignorePatches(u)){var v=this.ui.patchPages(m,
-u[0]);d={};var B=this.ui.getHashValueForPages(v,d),m={},c=this.ui.getHashValueForPages(this.shadowPages,m);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",u,"checksum",c==B,B);if(null!=B&&B!=c){var e=this.compressReportData(this.getAnonymizedXmlForPages(p)),k=this.compressReportData(this.getAnonymizedXmlForPages(v)),q=this.ui.hashValue(a.getCurrentEtag()),n=this.ui.hashValue(this.getCurrentEtag());this.checksumError(f,u,"Shadow Details: "+JSON.stringify(d)+
-"\nChecksum: "+B+"\nCurrent: "+c+"\nCurrent Details: "+JSON.stringify(m)+"\nFrom: "+q+"\nTo: "+n+"\n\nFile Data:\n"+e+"\nPatched Shadow:\n"+k,null,"mergeFile");return}this.patch(u,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw l=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(A){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=f&&f(A);try{if(l)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,A);else{var g=this.getCurrentUser(),x=null!=g?g.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,A)}}catch(t){}}};
-DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var b=new mxCodec(mxUtils.createXmlDocument()),f=b.document.createElement("mxfile");if(null!=a)for(var d=0;d<a.length;d++){var l=b.encode(new mxGraphModel(a[d].root));"1"!=urlParams.dev&&(l=this.ui.anonymizeNode(l,!0));l.setAttribute("id",a[d].getId());a[d].viewState&&this.ui.editor.graph.saveViewState(a[d].viewState,l,!0);f.appendChild(l)}return mxUtils.getPrettyXml(f)};
-DrawioFile.prototype.compressReportData=function(a,b,f){b=null!=b?b:1E4;null!=f&&null!=a&&a.length>f?a=a.substring(0,f)+"[...]":null!=a&&a.length>b&&(a=Graph.compress(a)+"\n");return a};
-DrawioFile.prototype.checksumError=function(a,b,f,d,l){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=b)for(a=0;a<b.length;a++)this.ui.anonymizePatch(b[a]);var m=mxUtils.bind(this,function(a){var d=this.compressReportData(JSON.stringify(b,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
-25E3):"n/a";this.sendErrorReport("Checksum Error in "+l+" "+this.getHash(),(null!=f?f:"")+"\n\nPatches:\n"+d+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==d?m(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?m(a):m(null)}),function(){})}else{var p=this.getCurrentUser(),u=null!=p?p.id:"unknown";EditorUi.logError("Checksum Error in "+l+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+u+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
-try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:l,label:"user_"+u+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(v){}}}catch(v){}};
-DrawioFile.prototype.sendErrorReport=function(a,b,f,d){try{var l=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),p=this.getCurrentUser(),u=null!=p?this.ui.hashValue(p.id):"unknown",v=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",B=this.getTitle(),c=B.lastIndexOf("."),p="xml";0<c&&(p=B.substring(c));var e=null!=f?f.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
-":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+p+")\nUser="+u+v+"\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!=b?"\n\n"+b:"")+
-(null!=f?"\n\nError: "+f.message:"")+"\n\nStack:\n"+e+"\n\nShadow:\n"+l+"\n\nData:\n"+m,d)}catch(k){}};
-DrawioFile.prototype.reloadFile=function(a,b){try{this.ui.spinner.stop();var f=mxUtils.bind(this,function(){this.stats.fileReloaded++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),f=this.ui.editor.graph.getSelectionCells(),m=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(m,b,f);null!=this.backupPatch&&this.patch([this.backupPatch]);var d=this.ui.getCurrentFile();null!=d&&(d.stats=
-this.stats);null!=a&&a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()}catch(d){null!=b&&b(d)}};DrawioFile.prototype.copyFile=function(a,b){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
-DrawioFile.prototype.ignorePatches=function(a){for(var b=!0,f=0;f<a.length&&b;f++)b=b&&0==Object.keys(a[f]).length;return b};
-DrawioFile.prototype.patch=function(a,b){var f=this.ui.editor.undoManager,d=f.history.slice(),l=f.indexOfNextAdd,m=this.ui.editor.graph;m.container.style.visibility="hidden";var p=this.changeListenerEnabled;this.changeListenerEnabled=!1;var u=m.foldingEnabled,v=m.mathEnabled,B=m.cellRenderer.redraw;m.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());B.apply(this,arguments)};m.model.beginUpdate();try{for(var c=
-0;c<a.length;c++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[c],!0,b,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=B;this.changeListenerEnabled=p;f.history=d;f.indexOfNextAdd=l;f.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)v!=
+DrawioFile.prototype.updateFile=function(a,b,e,d){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():this.getLatestVersion(mxUtils.bind(this,function(k){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():null!=k?this.mergeFile(k,a,b,d):this.reloadFile(a,b))}catch(m){null!=b&&b(m)}}),b))};
+DrawioFile.prototype.mergeFile=function(a,b,e,d){var k=!0;try{this.stats.fileMerged++;var m=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),p=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=p&&0<p.length){this.shadowPages=p;this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;var u=[this.ui.diffPages(null!=d?d:m,this.shadowPages)];if(!this.ignorePatches(u)){var x=this.ui.patchPages(m,
+u[0]);d={};var B=this.ui.getHashValueForPages(x,d),m={},c=this.ui.getHashValueForPages(this.shadowPages,m);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",u,"checksum",c==B,B);if(null!=B&&B!=c){var f=this.compressReportData(this.getAnonymizedXmlForPages(p)),g=this.compressReportData(this.getAnonymizedXmlForPages(x)),t=this.ui.hashValue(a.getCurrentEtag()),n=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,u,"Shadow Details: "+JSON.stringify(d)+
+"\nChecksum: "+B+"\nCurrent: "+c+"\nCurrent Details: "+JSON.stringify(m)+"\nFrom: "+t+"\nTo: "+n+"\n\nFile Data:\n"+f+"\nPatched Shadow:\n"+g,null,"mergeFile");return}this.patch(u,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(A){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=e&&e(A);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,A);else{var l=this.getCurrentUser(),y=null!=l?l.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),y,A)}}catch(q){}}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var b=new mxCodec(mxUtils.createXmlDocument()),e=b.document.createElement("mxfile");if(null!=a)for(var d=0;d<a.length;d++){var k=b.encode(new mxGraphModel(a[d].root));"1"!=urlParams.dev&&(k=this.ui.anonymizeNode(k,!0));k.setAttribute("id",a[d].getId());a[d].viewState&&this.ui.editor.graph.saveViewState(a[d].viewState,k,!0);e.appendChild(k)}return mxUtils.getPrettyXml(e)};
+DrawioFile.prototype.compressReportData=function(a,b,e){b=null!=b?b:1E4;null!=e&&null!=a&&a.length>e?a=a.substring(0,e)+"[...]":null!=a&&a.length>b&&(a=Graph.compress(a)+"\n");return a};
+DrawioFile.prototype.checksumError=function(a,b,e,d,k){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=b)for(a=0;a<b.length;a++)this.ui.anonymizePatch(b[a]);var m=mxUtils.bind(this,function(a){var d=this.compressReportData(JSON.stringify(b,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
+25E3):"n/a";this.sendErrorReport("Checksum Error in "+k+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+d+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==d?m(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?m(a):m(null)}),function(){})}else{var p=this.getCurrentUser(),u=null!=p?p.id:"unknown";EditorUi.logError("Checksum Error in "+k+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+u+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
+try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:k,label:"user_"+u+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(x){}}}catch(x){}};
+DrawioFile.prototype.sendErrorReport=function(a,b,e,d){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),p=this.getCurrentUser(),u=null!=p?this.ui.hashValue(p.id):"unknown",x=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",B=this.getTitle(),c=B.lastIndexOf("."),p="xml";0<c&&(p=B.substring(c));var f=null!=e?e.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
+":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+p+")\nUser="+u+x+"\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!=b?"\n\n"+b:"")+
+(null!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+f+"\n\nShadow:\n"+k+"\n\nData:\n"+m,d)}catch(g){}};
+DrawioFile.prototype.reloadFile=function(a,b){try{this.ui.spinner.stop();var e=mxUtils.bind(this,function(){this.stats.fileReloaded++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),e=this.ui.editor.graph.getSelectionCells(),m=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(m,b,e);null!=this.backupPatch&&this.patch([this.backupPatch]);var d=this.ui.getCurrentFile();null!=d&&(d.stats=
+this.stats);null!=a&&a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}catch(d){null!=b&&b(d)}};DrawioFile.prototype.copyFile=function(a,b){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
+DrawioFile.prototype.ignorePatches=function(a){for(var b=!0,e=0;e<a.length&&b;e++)b=b&&0==Object.keys(a[e]).length;return b};
+DrawioFile.prototype.patch=function(a,b){var e=this.ui.editor.undoManager,d=e.history.slice(),k=e.indexOfNextAdd,m=this.ui.editor.graph;m.container.style.visibility="hidden";var p=this.changeListenerEnabled;this.changeListenerEnabled=!1;var u=m.foldingEnabled,x=m.mathEnabled,B=m.cellRenderer.redraw;m.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());B.apply(this,arguments)};m.model.beginUpdate();try{for(var c=
+0;c<a.length;c++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[c],!0,b,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=B;this.changeListenerEnabled=p;e.history=d;e.indexOfNextAdd=k;e.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)x!=
m.mathEnabled?(this.ui.editor.updateGraphComponents(),m.refresh()):(u!=m.foldingEnabled?m.view.revalidate():m.view.validate(),m.sizeDidChange());this.ui.updateTabContainer()}};
-DrawioFile.prototype.save=function(a,b,f,d,l,m){try{if(this.isEditable())if(!l&&this.invalidChecksum)if(null!=f)f({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=b&&b();else if(null!=f)f({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(p){if(null!=f)f(p);else throw p;}};
-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 a=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=a?"false"!=a:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(a,b,f){};DrawioFile.prototype.saveFile=function(a,b,f,d){};
-DrawioFile.prototype.getPublicUrl=function(a){a(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,b,f){};
-DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(a,b,f){};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};
+DrawioFile.prototype.save=function(a,b,e,d,k,m){try{if(this.isEditable())if(!k&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=b&&b();else if(null!=e)e({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(p){if(null!=e)e(p);else throw p;}};
+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 a=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=a?"false"!=a:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(a,b,e){};DrawioFile.prototype.saveFile=function(a,b,e,d){};
+DrawioFile.prototype.getPublicUrl=function(a){a(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,b,e){};
+DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(a,b,e){};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};
DrawioFile.prototype.setData=function(a){this.data=a};DrawioFile.prototype.getData=function(){return this.data};DrawioFile.prototype.open=function(){this.stats.opened++;var a=this.getData();null!=a&&(this.ui.setFileData(a),this.isModified()||(this.shadowData=mxUtils.getXml(this.ui.getXmlFileData()),this.shadowPages=null));this.installListeners();this.isSyncSupported()&&this.startSync()};DrawioFile.prototype.isSyncSupported=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};
DrawioFile.prototype.getRevisions=function(a,b){a(null)};DrawioFile.prototype.loadDescriptor=function(a,b){a(null)};DrawioFile.prototype.loadPatchDescriptor=function(a,b){this.loadDescriptor(mxUtils.bind(this,function(b){a(b)}),b)};DrawioFile.prototype.patchDescriptor=function(a,b){this.setDescriptorEtag(a,this.getDescriptorEtag(b))};
DrawioFile.prototype.startSync=function(){"auto"!=DrawioFile.SYNC||"1"==urlParams.stealth||"1"!=urlParams.rt&&this.ui.editor.chromeless&&!this.ui.editor.editable||(null==this.sync&&(this.sync=new DrawioFileSync(this)),this.sync.start())};DrawioFile.prototype.isConflict=function(){return!1};DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(a){return null};DrawioFile.prototype.getCurrentUser=function(){return null};
DrawioFile.prototype.getLatestVersion=function(a,b){a(null)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};DrawioFile.prototype.setCurrentRevisionId=function(a){this.setDescriptorRevisionId(this.getDescriptor(),a)};DrawioFile.prototype.getCurrentRevisionId=function(){return this.getDescriptorRevisionId(this.getDescriptor())};DrawioFile.prototype.setCurrentEtag=function(a){this.setDescriptorEtag(this.getDescriptor(),a)};DrawioFile.prototype.getCurrentEtag=function(){return this.getDescriptorEtag(this.getDescriptor())};
DrawioFile.prototype.getDescriptor=function(){return null};DrawioFile.prototype.setDescriptor=function(){};DrawioFile.prototype.setDescriptorRevisionId=function(a,b){this.setDescriptorEtag(a,b)};DrawioFile.prototype.getDescriptorRevisionId=function(a){return this.getDescriptorEtag(a)};DrawioFile.prototype.setDescriptorEtag=function(a,b){};DrawioFile.prototype.getDescriptorEtag=function(a){return null};DrawioFile.prototype.getDescriptorSecret=function(a){return null};
-DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(a,b){var f=null!=b?b.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=f&&f.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
+DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(a,b){var e=null!=b?b.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=e&&e.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
this.changeListener),this.ui.addListener("pageScaleChanged",this.changeListener),this.ui.addListener("backgroundColorChanged",this.changeListener),this.ui.addListener("backgroundImageChanged",this.changeListener),this.ui.addListener("foldingEnabledChanged",this.changeListener),this.ui.addListener("mathEnabledChanged",this.changeListener),this.ui.addListener("gridEnabledChanged",this.changeListener),this.ui.addListener("guidesEnabledChanged",this.changeListener),this.ui.addListener("pageViewChanged",
this.changeListener),this.ui.addListener("connectionPointsChanged",this.changeListener),this.ui.addListener("connectionArrowsChanged",this.changeListener))};
DrawioFile.prototype.addAllSavedStatus=function(a){null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this&&(a=null!=a?a:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey)),this.ui.editor.setStatus('<div title="'+a+'">'+a+"</div>"),a=this.ui.statusContainer.getElementsByTagName("div"),0<a.length&&this.isRevisionHistorySupported()&&(a[0].style.cursor="pointer",a[0].style.textDecoration="underline",mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))))};
-DrawioFile.prototype.addUnsavedStatus=function(a){if(!this.inConflictState&&null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this)if(a instanceof Error&&null!=a.message&&""!=a.message){var b=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+b+'" class="geStatusAlert" style="overflow:hidden;">'+b+" ("+mxUtils.htmlEntities(a.message)+")</div>")}else{b=this.getErrorMessage(a);if(null==b&&null!=this.lastSaved){var f=this.ui.timeSince(new Date(this.lastSaved));
-null!=f&&(b=mxResources.get("lastSaved",[f]))}null!=b&&60<b.length&&(b=b.substring(0,60)+"...");b=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=b&&""!=b?" ("+mxUtils.htmlEntities(b)+")":"");this.ui.editor.setStatus('<div title="'+b+'" class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+b+"</div>");b=this.ui.statusContainer.getElementsByTagName("div");null!=b&&0<b.length?mxEvent.addListener(b[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null!=
+DrawioFile.prototype.addUnsavedStatus=function(a){if(!this.inConflictState&&null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this)if(a instanceof Error&&null!=a.message&&""!=a.message){var b=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+b+'" class="geStatusAlert" style="overflow:hidden;">'+b+" ("+mxUtils.htmlEntities(a.message)+")</div>")}else{b=this.getErrorMessage(a);if(null==b&&null!=this.lastSaved){var e=this.ui.timeSince(new Date(this.lastSaved));
+null!=e&&(b=mxResources.get("lastSaved",[e]))}null!=b&&60<b.length&&(b=b.substring(0,60)+"...");b=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=b&&""!=b?" ("+mxUtils.htmlEntities(b)+")":"");this.ui.editor.setStatus('<div title="'+b+'" class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+b+"</div>");b=this.ui.statusContainer.getElementsByTagName("div");null!=b&&0<b.length?mxEvent.addListener(b[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null!=
this.ui.mode&&this.isEditable()?"save":"saveAs").funct()})):(b=mxUtils.htmlEntities(mxResources.get("unsavedChanges")),this.ui.editor.setStatus('<div title="'+b+'" class="geStatusAlert" style="overflow:hidden;">'+b+" ("+mxUtils.htmlEntities(a.message)+")</div>"))}};
-DrawioFile.prototype.addConflictStatus=function(a,b){this.invalidChecksum&&null==b&&(b=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=b&&""!=b?" ("+mxUtils.htmlEntities(b)+")":""));this.ui.spinner.stop();this.clearAutosave();var f=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):null;null!=f&&0<f.length?mxEvent.addListener(f[0],"click",mxUtils.bind(this,function(b){"IMG"!=mxEvent.getSource(b).nodeName&&
+DrawioFile.prototype.addConflictStatus=function(a,b){this.invalidChecksum&&null==b&&(b=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=b&&""!=b?" ("+mxUtils.htmlEntities(b)+")":""));this.ui.spinner.stop();this.clearAutosave();var e=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):null;null!=e&&0<e.length?mxEvent.addListener(e[0],"click",mxUtils.bind(this,function(b){"IMG"!=mxEvent.getSource(b).nodeName&&
a()})):this.ui.alert(mxUtils.htmlEntities(mxResources.get("fileChangedSync")),a)};DrawioFile.prototype.setConflictStatus=function(a){this.ui.editor.setStatus('<div title="'+a+'" class="geStatusAlert geBlink" style="cursor:pointer;overflow:hidden;">'+a+' <a href="https://desk.draw.io/support/solutions/articles/16000087947" target="_blank"><img border="0" style="margin-left:2px;cursor:help;opacity:0.5;width:16px;height:16px;" valign="bottom" src="'+Editor.helpImage+'" style=""/></a></div>')};
-DrawioFile.prototype.showRefreshDialog=function(a,b,f){null==f&&(f=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(a,b)})):(this.addConflictStatus(mxUtils.bind(this,function(){this.showRefreshDialog(a,b)}),f),this.ui.showError(mxResources.get("error")+" ("+f+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(a,
+DrawioFile.prototype.showRefreshDialog=function(a,b,e){null==e&&(e=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(a,b)})):(this.addConflictStatus(mxUtils.bind(this,function(){this.showRefreshDialog(a,b)}),e),this.ui.showError(mxResources.get("error")+" ("+e+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(a,
b)}),null,mxResources.get("synchronize"),mxUtils.bind(this,function(){this.reloadFile(a,b)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),360,150))};
-DrawioFile.prototype.showCopyDialog=function(a,b,f){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(a,b)}),null,mxResources.get("overwrite"),f,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),360,150)};
+DrawioFile.prototype.showCopyDialog=function(a,b,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(a,b)}),null,mxResources.get("overwrite"),e,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),360,150)};
DrawioFile.prototype.showConflictDialog=function(a,b){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),a,null,mxResources.get("synchronize"),b,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),340,150)};
-DrawioFile.prototype.redirectToNewApp=function(a,b){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var f=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),d=mxResources.get("redirectToNewApp");null!=b&&(d+=" ("+b+")");var l=mxUtils.bind(this,function(){var b=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==f?window.location.reload():
-window.location.href=f});null==a&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()});null!=a?this.isModified()?this.ui.confirm(d,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;a()}),l,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(d,l,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;a()})):this.ui.alert(mxResources.get("redirectToNewApp"),
-l)}};DrawioFile.prototype.handleFileSuccess=function(a){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():a?(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(a,b){this.ui.spinner.stop();if(this.ui.getCurrentFile()==this)if(this.inConflictState)this.handleConflictError(a,b);else if(this.isModified()&&this.addUnsavedStatus(a),b)this.ui.handleError(a,null!=a?mxResources.get("errorSavingFile"):null);else if(!this.isModified()){var f=null!=a?null!=a.error?a.error.message:a.message:null;null!=f&&60<f.length&&(f=f.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+
-mxUtils.htmlEntities(mxResources.get("error"))+(null!=f?" ("+mxUtils.htmlEntities(f)+")":"")+"</div>")}};
-DrawioFile.prototype.handleConflictError=function(a,b){var f=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),l=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&(this.ui.editor.setStatus(""),this.save(!0,f,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage))}),m=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("saving"))&&this.save(!0,f,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(f,d,l):this.invalidChecksum?this.showRefreshDialog(f,d,this.getErrorMessage(a)):b?this.showConflictDialog(l,m):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
-this.synchronizeFile(f,d)}),this.getErrorMessage(a))};DrawioFile.prototype.getErrorMessage=function(a){return null!=a?null!=a.error?a.error.message:a.message:null};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
+DrawioFile.prototype.redirectToNewApp=function(a,b){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(),d=mxResources.get("redirectToNewApp");null!=b&&(d+=" ("+b+")");var k=mxUtils.bind(this,function(){var b=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==e?window.location.reload():
+window.location.href=e});null==a&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()});null!=a?this.isModified()?this.ui.confirm(d,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;a()}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(d,k,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;a()})):this.ui.alert(mxResources.get("redirectToNewApp"),
+k)}};DrawioFile.prototype.handleFileSuccess=function(a){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():a?(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(a,b){this.ui.spinner.stop();if(this.ui.getCurrentFile()==this)if(this.inConflictState)this.handleConflictError(a,b);else if(this.isModified()&&this.addUnsavedStatus(a),b)this.ui.handleError(a,null!=a?mxResources.get("errorSavingFile"):null);else if(!this.isModified()){var e=null!=a?null!=a.error?a.error.message:a.message:null;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(a,b){var e=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),k=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&(this.ui.editor.setStatus(""),this.save(!0,e,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage))}),m=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("saving"))&&this.save(!0,e,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(e,d,k):this.invalidChecksum?this.showRefreshDialog(e,d,this.getErrorMessage(a)):b?this.showConflictDialog(k,m):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
+this.synchronizeFile(e,d)}),this.getErrorMessage(a))};DrawioFile.prototype.getErrorMessage=function(a){return null!=a?null!=a.error?a.error.message:a.message:null};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()?(this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){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(a){this.handleFileError(a)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus())};
-DrawioFile.prototype.fileSaved=function(a,b,f,d){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=f&&f()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),b,f,d,a)}catch(p){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=d&&d(p);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,p);else{var l=
-this.getCurrentUser(),m=null!=l?l.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),m,p)}}catch(u){}}};
-DrawioFile.prototype.autosave=function(a,b,f,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());a=Date.now()-this.lastAutosave<b?a:0;this.clearAutosave();var l=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==l&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=f&&f(a)}),mxUtils.bind(this,
-function(a){null!=d&&d(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=f&&f(null)}),a);this.autosaveThread=l};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(a,b,e,d){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=e&&e()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),b,e,d,a)}catch(p){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=d&&d(p);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,p);else{var k=
+this.getCurrentUser(),m=null!=k?k.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),m,p)}}catch(u){}}};
+DrawioFile.prototype.autosave=function(a,b,e,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());a=Date.now()-this.lastAutosave<b?a: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 a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=e&&e(a)}),mxUtils.bind(this,
+function(a){null!=d&&d(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=e&&e(null)}),a);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.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-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(a){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,b){if(null!=a&&null!=b){var f=a.lastIndexOf("."),d=0<f?a.substring(f):"",f=b.lastIndexOf(".");return d===(0<f?b.substring(f):"")}return a==b};
+DrawioFile.prototype.close=function(a){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,b){if(null!=a&&null!=b){var e=a.lastIndexOf("."),d=0<e?a.substring(e):"",e=b.lastIndexOf(".");return d===(0<e?b.substring(e):"")}return a==b};
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.stats.destroyed++;this.clearAutosave();this.removeListeners();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(a,b){a([])};DrawioFile.prototype.addComment=function(a,b,f){b(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(a,b){return new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};LocalFile=function(a,b,f,d){DrawioFile.call(this,a,b);this.title=f;this.mode=d?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(a,b,f){this.saveAs(this.title,b,f)};LocalFile.prototype.saveAs=function(a,b,f){this.saveFile(a,!1,b,f)};
-LocalFile.prototype.saveFile=function(a,b,f,d){this.title=a;this.updateFileData();b=this.getData();var l=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),m=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,l?"image/png":"text/xml",l);else if(b.length<MAX_REQUEST_SIZE){var d=a.lastIndexOf("."),d=0<d?a.substring(d+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+d+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+
-(l?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=f&&f()});l?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){m(a)}),d,this.ui.getCurrentFile()!=this?this.getData():null):m(b)};LocalFile.prototype.rename=function(a,b,f){this.title=a;this.descriptorChanged();null!=b&&b()};
+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(a,b){a([])};DrawioFile.prototype.addComment=function(a,b,e){b(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(a,b){return new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};LocalFile=function(a,b,e,d){DrawioFile.call(this,a,b);this.title=e;this.mode=d?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(a,b,e){this.saveAs(this.title,b,e)};LocalFile.prototype.saveAs=function(a,b,e){this.saveFile(a,!1,b,e)};
+LocalFile.prototype.saveFile=function(a,b,e,d){this.title=a;this.updateFileData();b=this.getData();var k=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),m=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,k?"image/png":"text/xml",k);else if(b.length<MAX_REQUEST_SIZE){var d=a.lastIndexOf("."),d=0<d?a.substring(d+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+d+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+
+(k?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=e&&e()});k?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){m(a)}),d,this.ui.getCurrentFile()!=this?this.getData():null):m(b)};LocalFile.prototype.rename=function(a,b,e){this.title=a;this.descriptorChanged();null!=b&&b()};
LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){Editor.prototype.appName="draw.io";Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=":
IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==":
@@ -2813,53 +2816,53 @@ defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectangle
dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1.5,isVisible:function(a){return"1"==mxUtils.getValue(a.style,"comic","0")}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"collapsible",dispName:"Collapsible",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1},{name:"recursiveResize",
dispName:"Resize Children",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{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:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(a,c){return 0<a.vertices.length&&c.editorUi.editor.graph.isContainer(a.vertices[0])}}];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## 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## 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## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\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\nEvan 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-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan 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\nRon Donovan,System Admin,rdo,Office 3,Evan 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\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
-Editor.fastCompress=function(a){return null==a||0==a.length||"undefined"===typeof pako?a:pako.deflateRaw(a,{to:"string"})};Editor.fastDecompress=function(a){return null==a||0==a.length||"undefined"===typeof pako?a:pako.inflateRaw(a,{to:"string"})};Editor.extractGraphModel=function(a,c){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),e=[];if(null!=b&&0<b.length)for(var d=0;d<b.length;d++)if("mxgraph"==b[d].getAttribute("class")){e.push(b[d]);break}0<e.length&&
-(b=e[0].getAttribute("data-mxgraph"),null!=b?(e=JSON.parse(b),null!=e&&null!=e.xml&&(e=mxUtils.parseXml(e.xml),a=e.documentElement)):(e=e[0].getElementsByTagName("div"),0<e.length&&(b=mxUtils.getTextContent(e[0]),b=Graph.decompress(b),0<b.length&&(e=mxUtils.parseXml(b),a=e.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(b=a.getAttribute("content"),null!=b&&"<"!=b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)),
-null!=b&&0<b.length)a=mxUtils.parseXml(b).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||c||(e=null,"diagram"==a.nodeName?e=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(e=b[Math.max(0,Math.min(b.length-1,urlParams.page||0))])),null!=e&&(a=Editor.parseDiagramNode(e)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||(a=null);return a};Editor.parseDiagramNode=function(a){var c=mxUtils.trim(mxUtils.getTextContent(a)),b=null;0<
+Editor.fastCompress=function(a){return null==a||0==a.length||"undefined"===typeof pako?a:pako.deflateRaw(a,{to:"string"})};Editor.fastDecompress=function(a){return null==a||0==a.length||"undefined"===typeof pako?a:pako.inflateRaw(a,{to:"string"})};Editor.extractGraphModel=function(a,c){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),f=[];if(null!=b&&0<b.length)for(var d=0;d<b.length;d++)if("mxgraph"==b[d].getAttribute("class")){f.push(b[d]);break}0<f.length&&
+(b=f[0].getAttribute("data-mxgraph"),null!=b?(f=JSON.parse(b),null!=f&&null!=f.xml&&(f=mxUtils.parseXml(f.xml),a=f.documentElement)):(f=f[0].getElementsByTagName("div"),0<f.length&&(b=mxUtils.getTextContent(f[0]),b=Graph.decompress(b),0<b.length&&(f=mxUtils.parseXml(b),a=f.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(b=a.getAttribute("content"),null!=b&&"<"!=b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)),
+null!=b&&0<b.length)a=mxUtils.parseXml(b).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||c||(f=null,"diagram"==a.nodeName?f=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(f=b[Math.max(0,Math.min(b.length-1,urlParams.page||0))])),null!=f&&(a=Editor.parseDiagramNode(f)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||(a=null);return a};Editor.parseDiagramNode=function(a){var c=mxUtils.trim(mxUtils.getTextContent(a)),b=null;0<
c.length?(a=Graph.decompress(c),null!=a&&0<a.length&&(b=mxUtils.parseXml(a).documentElement)):(a=mxUtils.getChildNodes(a),0<a.length&&(b=mxUtils.createXmlDocument(),b.appendChild(b.importNode(a[0],!0)),b=b.documentElement));return b};Editor.getDiagramNodeXml=function(a){var c=mxUtils.getTextContent(a),b=null;0<c.length?b=Graph.decompress(c):null!=a.firstChild&&(b=mxUtils.getXml(a.firstChild));return b};Editor.extractGraphModelFromPng=function(a){var c=null;try{var b=a.substring(a.indexOf(",")+1),
-e=window.atob&&!mxClient.IS_SF?atob(b):Base64.decode(b,!0);EditorUi.parsePng(e,mxUtils.bind(this,function(a,b,d){a=e.substring(a+8,a+8+d);"zTXt"==b?(d=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,d)&&(a=pako.inflateRaw(a.substring(d+2),{to:"string"}).replace(/\+/g," "),null!=a&&0<a.length&&(c=a))):"tEXt"==b&&(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(c=a[1]));if(null!=c||"IDAT"==b)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(a,c){var b=null,e=null!=a?a.getElementsByTagName("parsererror"):null;null!=e&&0<e.length&&(b=c||mxResources.get("invalidChars"),e=e[0].getElementsByTagName("div"),0<e.length&&(b=mxUtils.getTextContent(e[0])));return b};Editor.configure=function(a,c){if(null!=a){Editor.config=a;Editor.configVersion=a.version;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
+f=window.atob&&!mxClient.IS_SF?atob(b):Base64.decode(b,!0);EditorUi.parsePng(f,mxUtils.bind(this,function(a,b,d){a=f.substring(a+8,a+8+d);"zTXt"==b?(d=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,d)&&(a=pako.inflateRaw(a.substring(d+2),{to:"string"}).replace(/\+/g," "),null!=a&&0<a.length&&(c=a))):"tEXt"==b&&(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(c=a[1]));if(null!=c||"IDAT"==b)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(a,c){var b=null,f=null!=a?a.getElementsByTagName("parsererror"):null;null!=f&&0<f.length&&(b=c||mxResources.get("invalidChars"),f=f[0].getElementsByTagName("div"),0<f.length&&(b=mxUtils.getTextContent(f[0])));return b};Editor.configure=function(a,c){if(null!=a){Editor.config=a;Editor.configVersion=a.version;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=a.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=a.autosaveDelay||DrawioFile.prototype.autosaveDelay;null!=a.templateFile&&(EditorUi.templateFile=a.templateFile);null!=a.globalVars&&
(Editor.globalVars=a.globalVars);null!=a.compressXml&&(Editor.compressXml=a.compressXml);a.customFonts&&(Menus.prototype.defaultFonts=a.customFonts.concat(Menus.prototype.defaultFonts));a.customPresetColors&&(ColorDialog.prototype.presetColors=a.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=a.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=a.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=a.css){var b=document.createElement("style");
-b.setAttribute("type","text/css");b.appendChild(document.createTextNode(a.css));var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(b,e)}null!=a.libraries&&(Sidebar.prototype.customEntries=a.libraries);null!=a.enabledLibraries&&(Sidebar.prototype.enabledLibraries=a.enabledLibraries);null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=a.defaultCustomLibraries);null!=a.enableCustomLibraries&&
+b.setAttribute("type","text/css");b.appendChild(document.createTextNode(a.css));var f=document.getElementsByTagName("script")[0];f.parentNode.insertBefore(b,f)}null!=a.libraries&&(Sidebar.prototype.customEntries=a.libraries);null!=a.enabledLibraries&&(Sidebar.prototype.enabledLibraries=a.enabledLibraries);null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=a.defaultCustomLibraries);null!=a.enableCustomLibraries&&
(Editor.enableCustomLibraries=a.enableCustomLibraries);null!=a.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=a.defaultVertexStyle);null!=a.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=a.defaultEdgeStyle);a.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=a.emptyDiagramXml);a.thumbWidth&&(Sidebar.prototype.thumbWidth=a.thumbWidth);a.thumbHeight&&(Sidebar.prototype.thumbHeight=a.thumbHeight);a.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=a.emptyLibraryXml);a.sidebarWidth&&
-(EditorUi.prototype.hsplitPosition=a.sidebarWidth);a.fontCss&&(b=document.createElement("style"),b.setAttribute("type","text/css"),b.appendChild(document.createTextNode(a.fontCss)),e=document.getElementsByTagName("script")[0],e.parentNode.insertBefore(b,e),Editor.prototype.fontCss=a.fontCss);null!=a.autosaveDelay&&(b=parseInt(a.autosaveDelay),!isNaN(b)&&0<b?DrawioFile.prototype.autosaveDelay=b:EditorUi.debug("Invalid autosaveDelay: "+a.autosaveDelay));if(null!=a.plugins&&!c)for(App.initPluginCallback(),
+(EditorUi.prototype.hsplitPosition=a.sidebarWidth);a.fontCss&&(b=document.createElement("style"),b.setAttribute("type","text/css"),b.appendChild(document.createTextNode(a.fontCss)),f=document.getElementsByTagName("script")[0],f.parentNode.insertBefore(b,f),Editor.prototype.fontCss=a.fontCss);null!=a.autosaveDelay&&(b=parseInt(a.autosaveDelay),!isNaN(b)&&0<b?DrawioFile.prototype.autosaveDelay=b:EditorUi.debug("Invalid autosaveDelay: "+a.autosaveDelay));if(null!=a.plugins&&!c)for(App.initPluginCallback(),
b=0;b<a.plugins.length;b++)mxscript(a.plugins[b])}};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(a){a=null!=a?a:Editor.GUID_LENGTH;for(var c=[],b=0;b<a;b++)c.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return c.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!1;Editor.prototype.editButtonLink=
-null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(c){c=null!=c&&"mxlibrary"!=c.nodeName?this.extractGraphModel(c):null;if(null!=c){var b=c.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],e=b.getElementsByTagName("div");null!=e&&0<e.length&&(b=e[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==c.nodeName){b=c.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=
-b&&""!=b)b!=this.graph.currentStyle&&(e=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=e&&(d=new mxCodec(e.ownerDocument),d.decode(e,this.graph.getStylesheet())));else if(e=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=e){var d=new mxCodec(e.ownerDocument);d.decode(e,this.graph.getStylesheet())}this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||
+null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(c){c=null!=c&&"mxlibrary"!=c.nodeName?this.extractGraphModel(c):null;if(null!=c){var b=c.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],f=b.getElementsByTagName("div");null!=f&&0<f.length&&(b=f[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==c.nodeName){b=c.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=
+b&&""!=b)b!=this.graph.currentStyle&&(f=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=f&&(d=new mxCodec(f.ownerDocument),d.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 d=new mxCodec(f.ownerDocument);d.decode(f,this.graph.getStylesheet())}this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||
"1"==c.getAttribute("math");b=c.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==c.getAttribute("shadow"),!1);if(b=
-c.getAttribute("extFonts"))try{for(b=b.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}}),e=0;e<b.length;e++)this.graph.addExtFont(b[e].name,b[e].url)}catch(S){console.log("ExtFonts format error: "+S.message)}}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=b.apply(this,arguments);null!=this.graph.currentStyle&&
-"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));c.setAttribute("math",this.graph.mathEnabled?"1":"0");c.setAttribute("shadow",this.graph.shadowVisible?"1":"0");if(null!=this.graph.extFonts&&0<this.graph.extFonts.length){var e=this.graph.extFonts.map(function(a){return a.name+"^"+a.url});c.setAttribute("extFonts",e.join("|"))}return c};Editor.prototype.isDataSvg=
-function(a){try{var c=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(I){}return!1};Editor.prototype.extractGraphModel=function(a,c){return Editor.extractGraphModel.apply(this,arguments)};var f=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();f.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.apply(this,
+c.getAttribute("extFonts"))try{for(b=b.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}}),f=0;f<b.length;f++)this.graph.addExtFont(b[f].name,b[f].url)}catch(S){console.log("ExtFonts format error: "+S.message)}}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=b.apply(this,arguments);null!=this.graph.currentStyle&&
+"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));c.setAttribute("math",this.graph.mathEnabled?"1":"0");c.setAttribute("shadow",this.graph.shadowVisible?"1":"0");if(null!=this.graph.extFonts&&0<this.graph.extFonts.length){var f=this.graph.extFonts.map(function(a){return a.name+"^"+a.url});c.setAttribute("extFonts",f.join("|"))}return c};Editor.prototype.isDataSvg=
+function(a){try{var c=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(J){}return!1};Editor.prototype.extractGraphModel=function(a,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 d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.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.initMath=function(a,c){a=null!=a?a:DRAW_MATH_URL+"/MathJax.js?config=TeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){window.setTimeout(function(){"hidden"!=a.style.visibility&&MathJax.Hub.Queue(["Typeset",
MathJax.Hub,a])},0)};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(c||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],"HTML-CSS":{imageFont:null},TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=
0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var b=Editor.prototype.init;Editor.prototype.init=function(){b.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,c){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&
-Editor.MathJaxRender(this.graph.container)}))};var e=document.getElementsByTagName("script");if(null!=e&&0<e.length){var d=document.createElement("script");d.type="text/javascript";d.src=a;e[0].parentNode.appendChild(d)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;var c=
-[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,b,e,d){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==e?c.push(e.replace(/\\"/g,'"')):void 0!==d&&c.push(d);return""});/,\s*$/.test(a)&&c.push("");return c};Editor.prototype.isCorsEnabledForUrl=function(a){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));
+Editor.MathJaxRender(this.graph.container)}))};var f=document.getElementsByTagName("script");if(null!=f&&0<f.length){var d=document.createElement("script");d.type="text/javascript";d.src=a;f[0].parentNode.appendChild(d)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;var c=
+[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,b,f,d){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==f?c.push(f.replace(/\\"/g,'"')):void 0!==d&&c.push(d);return""});/,\s*$/.test(a)&&c.push("");return c};Editor.prototype.isCorsEnabledForUrl=function(a){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(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.blob.core.windows.net\//.test(a)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};Editor.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var c=a.convert,
-b=this;a.convert=function(e){if(null!=e){var d="http://"==e.substring(0,7)||"https://"==e.substring(0,8);d&&!navigator.onLine?e=EditorUi.prototype.svgBrokenImage.src:!d||e.substring(0,a.baseUrl.length)==a.baseUrl||EditorUi.prototype.crossOriginImages&&b.isCorsEnabledForUrl(e)?"chrome-extension://"==e.substring(0,19)||mxClient.IS_CHROMEAPP||(e=c.apply(this,arguments)):e=PROXY_URL+"?url="+encodeURIComponent(e)}return e};return a};Editor.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+
-btoa(unescape(encodeURIComponent(a)))};Editor.prototype.convertImageToDataUri=function(a,c){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){c(this.createSvgDataUri(a.getText()))}),function(){c(EditorUi.prototype.svgBrokenImage.src)});else{var b=new Image;EditorUi.prototype.crossOriginImages&&(b.crossOrigin="anonymous");b.onload=function(){var a=document.createElement("canvas"),e=a.getContext("2d");a.height=b.height;a.width=b.width;e.drawImage(b,0,0);try{c(a.toDataURL())}catch(C){c(EditorUi.prototype.svgBrokenImage.src)}};
-b.onerror=function(){c(EditorUi.prototype.svgBrokenImage.src)};b.src=a}};Editor.prototype.convertImages=function(a,c,b,e){null==e&&(e=this.createImageUrlConverter());var d=0,k=b||{};b=mxUtils.bind(this,function(b,g){for(var f=a.getElementsByTagName(b),n=0;n<f.length;n++)mxUtils.bind(this,function(b){var f=e.convert(b.getAttribute(g));if(null!=f&&"data:"!=f.substring(0,5)){var n=k[f];null==n?(d++,this.convertImageToDataUri(f,function(e){null!=e&&(k[f]=e,b.setAttribute(g,e));d--;0==d&&c(a)})):b.setAttribute(g,
-n)}else null!=f&&b.setAttribute(g,f)})(f[n])});b("image","xlink:href");b("img","src");0==d&&c(a)};Editor.prototype.base64Encode=function(a){for(var c="",b=0,e=a.length,d,k,g;b<e;){d=a.charCodeAt(b++)&255;if(b==e){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);c+="==";break}k=a.charCodeAt(b++);if(b==e){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>
-2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(k&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((k&15)<<2);c+="=";break}g=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(k&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((k&15)<<2|(g&192)>>6);
-c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return c};Editor.prototype.loadUrl=function(a,c,b,e,d,k){try{var g=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);d=null!=d?d:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=c){var e=a.getText();if(g){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=
-mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var e=Array(a.length),d=0;d<a.length;d++)e[d]=String.fromCharCode(a[d]);e=e.join("")}k=null!=k?k:"data:image/png;base64,";e=k+this.base64Encode(e)}c(e)}}else null!=b&&b({code:App.ERROR_UNKNOWN},a)}),function(){null!=b&&b({code:App.ERROR_UNKNOWN})},g,this.timeout,function(){d&&null!=b&&b({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(T){null!=b&&b(T)}};Editor.prototype.loadFonts=function(a){if(null!=this.fontCss&&null==this.resolvedFontCss){var c=
-function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.fontCss.split("url("),e=0,d={},k=mxUtils.bind(this,function(){if(0==e){for(var k=[b[0]],g=1;g<b.length;g++){var f=b[g].indexOf(")");k.push('url("');k.push(d[c(b[g].substring(0,f))]);k.push('"'+b[g].substring(f))}this.resolvedFontCss=k.join("");a()}});if(0<b.length)for(var g=1;g<b.length;g++){var f=b[g].indexOf(")"),n=null,q=b[g].indexOf("format(",f);0<q&&(n=c(b[g].substring(q+7,b[g].indexOf(")",
-q))));mxUtils.bind(this,function(a){if(null==d[a]){d[a]=a;e++;var c="application/x-font-ttf";if("svg"==n||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==n||"embedded-opentype"==n||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==n||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==n||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==n||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==n||/(\.sfnt)($|\?)/i.test(a))c=
-"application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){d[a]=c;e--;k()}),mxUtils.bind(this,function(a){e--;k()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[g].substring(0,f)),n)}}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var c=document.getElementsByTagName("style"),b=0;b<c.length;b++)0<mxUtils.getTextContent(c[b]).indexOf("MathJax")&&
+b=this;a.convert=function(f){if(null!=f){var d="http://"==f.substring(0,7)||"https://"==f.substring(0,8);d&&!navigator.onLine?f=EditorUi.prototype.svgBrokenImage.src:!d||f.substring(0,a.baseUrl.length)==a.baseUrl||EditorUi.prototype.crossOriginImages&&b.isCorsEnabledForUrl(f)?"chrome-extension://"==f.substring(0,19)||mxClient.IS_CHROMEAPP||(f=c.apply(this,arguments)):f=PROXY_URL+"?url="+encodeURIComponent(f)}return f};return a};Editor.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+
+btoa(unescape(encodeURIComponent(a)))};Editor.prototype.convertImageToDataUri=function(a,c){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){c(this.createSvgDataUri(a.getText()))}),function(){c(EditorUi.prototype.svgBrokenImage.src)});else{var b=new Image;EditorUi.prototype.crossOriginImages&&(b.crossOrigin="anonymous");b.onload=function(){var a=document.createElement("canvas"),f=a.getContext("2d");a.height=b.height;a.width=b.width;f.drawImage(b,0,0);try{c(a.toDataURL())}catch(C){c(EditorUi.prototype.svgBrokenImage.src)}};
+b.onerror=function(){c(EditorUi.prototype.svgBrokenImage.src)};b.src=a}};Editor.prototype.convertImages=function(a,c,b,f){null==f&&(f=this.createImageUrlConverter());var d=0,e=b||{};b=mxUtils.bind(this,function(b,g){for(var l=a.getElementsByTagName(b),n=0;n<l.length;n++)mxUtils.bind(this,function(b){var l=f.convert(b.getAttribute(g));if(null!=l&&"data:"!=l.substring(0,5)){var n=e[l];null==n?(d++,this.convertImageToDataUri(l,function(f){null!=f&&(e[l]=f,b.setAttribute(g,f));d--;0==d&&c(a)})):b.setAttribute(g,
+n)}else null!=l&&b.setAttribute(g,l)})(l[n])});b("image","xlink:href");b("img","src");0==d&&c(a)};Editor.prototype.base64Encode=function(a){for(var c="",b=0,f=a.length,d,e,g;b<f;){d=a.charCodeAt(b++)&255;if(b==f){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);c+="==";break}e=a.charCodeAt(b++);if(b==f){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>
+2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(e&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2);c+="=";break}g=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(e&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2|(g&192)>>6);
+c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return c};Editor.prototype.loadUrl=function(a,c,b,f,d,e){try{var g=f||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);d=null!=d?d:!0;var l=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=c){var f=a.getText();if(g){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=
+mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),d=0;d<a.length;d++)f[d]=String.fromCharCode(a[d]);f=f.join("")}e=null!=e?e:"data:image/png;base64,";f=e+this.base64Encode(f)}c(f)}}else null!=b&&b({code:App.ERROR_UNKNOWN},a)}),function(){null!=b&&b({code:App.ERROR_UNKNOWN})},g,this.timeout,function(){d&&null!=b&&b({code:App.ERROR_TIMEOUT,retry:l})})});l()}catch(P){null!=b&&b(P)}};Editor.prototype.loadFonts=function(a){if(null!=this.fontCss&&null==this.resolvedFontCss){var c=
+function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.fontCss.split("url("),f=0,d={},e=mxUtils.bind(this,function(){if(0==f){for(var e=[b[0]],g=1;g<b.length;g++){var l=b[g].indexOf(")");e.push('url("');e.push(d[c(b[g].substring(0,l))]);e.push('"'+b[g].substring(l))}this.resolvedFontCss=e.join("");a()}});if(0<b.length)for(var g=1;g<b.length;g++){var l=b[g].indexOf(")"),n=null,t=b[g].indexOf("format(",l);0<t&&(n=c(b[g].substring(t+7,b[g].indexOf(")",
+t))));mxUtils.bind(this,function(a){if(null==d[a]){d[a]=a;f++;var c="application/x-font-ttf";if("svg"==n||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==n||"embedded-opentype"==n||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==n||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==n||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==n||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==n||/(\.sfnt)($|\?)/i.test(a))c=
+"application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){d[a]=c;f--;e()}),mxUtils.bind(this,function(a){f--;e()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[g].substring(0,l)),n)}}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var c=document.getElementsByTagName("style"),b=0;b<c.length;b++)0<mxUtils.getTextContent(c[b]).indexOf("MathJax")&&
a[0].appendChild(c[b].cloneNode(!0))};Editor.prototype.addFontCss=function(a){var c=a.getElementsByTagName("defs");null!=this.fontCss&&null!=c&&0<c.length&&(a=a.ownerDocument,a=null!=a.createElementNS?a.createElementNS(mxConstants.NS_SVG,"style"):a.createElement("style"),a.setAttribute("type","text/css"),mxUtils.setTextContent(a,this.fontCss),c[0][0].appendChild(a))};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||(null==this.graph.extFonts||0==this.graph.extFonts.length)&&
-this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,c,b,e,d,k,g,f,n,q,t,l,x,A){k=null!=k?k:!0;l=null!=l?l:this.graph;x=null!=x?x:0;var z=n?null:l.background;z==mxConstants.NONE&&(z=null);null==z&&(z=e);null==z&&0==n&&(z=this.graph.defaultPageBackgroundColor);this.convertImages(l.getSvg(z,null,null,A,null,null!=g?g:!0,null,null,null,q),mxUtils.bind(this,function(b){var e=new Image;e.onload=mxUtils.bind(this,function(){try{var g=document.createElement("canvas"),n=parseInt(b.getAttribute("width")),
-q=parseInt(b.getAttribute("height"));f=null!=f?f:1;null!=c&&(f=k?Math.min(1,Math.min(3*c/(4*q),c/n)):c/n);n=Math.ceil(f*n)+2*x;q=Math.ceil(f*q)+2*x;g.setAttribute("width",n);g.setAttribute("height",q);var t=g.getContext("2d");null!=z&&(t.beginPath(),t.rect(0,0,n,q),t.fillStyle=z,t.fill());t.scale(f,f);mxClient.IS_SF?window.setTimeout(function(){t.drawImage(e,x/f,x/f);a(g)},0):(t.drawImage(e,x/f,x/f),a(g))}catch(ia){null!=d&&d(ia)}});e.onerror=function(a){null!=d&&d(a)};try{q&&this.graph.addSvgShadow(b);
-var g=mxUtils.bind(this,function(){if(null!=this.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.resolvedFontCss;b.getElementsByTagName("defs")[0].appendChild(a)}l.mathEnabled&&this.addMathCss(b);e.src=this.createSvgDataUri(mxUtils.getXml(b))});this.loadFonts(g)}catch(W){null!=d&&d(W)}}),b,t)};Editor.prototype.writeGraphModelToPng=function(a,c,b,e,d){function k(a,c){var b=n;n+=c;return a.substring(b,n)}function g(a){a=k(a,4);return a.charCodeAt(3)+
-(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function f(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var n=0;if(k(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(k(a,4),"IHDR"!=k(a,4))null!=d&&d();else{k(a,17);d=a.substring(0,n);do{var q=g(a);if("IDAT"==k(a,4)){d=a.substring(0,n-8);b=b+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):
-"")+e;e=4294967295;e=EditorUi.prototype.updateCRC(e,c,0,4);e=EditorUi.prototype.updateCRC(e,b,0,b.length);d+=f(b.length)+c+b+f(e^4294967295);d+=a.substring(n-8,a.length);break}d+=a.substring(n-8,n-4+q);k(a,q);k(a,4)}while(q);return"data:image/png;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";var l=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){l.apply(this,
+this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,c,b,f,d,e,g,l,n,t,q,k,y,A){e=null!=e?e:!0;k=null!=k?k:this.graph;y=null!=y?y:0;var v=n?null:k.background;v==mxConstants.NONE&&(v=null);null==v&&(v=f);null==v&&0==n&&(v=this.graph.defaultPageBackgroundColor);this.convertImages(k.getSvg(v,null,null,A,null,null!=g?g:!0,null,null,null,t),mxUtils.bind(this,function(b){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var g=document.createElement("canvas"),n=parseInt(b.getAttribute("width")),
+t=parseInt(b.getAttribute("height"));l=null!=l?l:1;null!=c&&(l=e?Math.min(1,Math.min(3*c/(4*t),c/n)):c/n);n=Math.ceil(l*n)+2*y;t=Math.ceil(l*t)+2*y;g.setAttribute("width",n);g.setAttribute("height",t);var q=g.getContext("2d");null!=v&&(q.beginPath(),q.rect(0,0,n,t),q.fillStyle=v,q.fill());q.scale(l,l);mxClient.IS_SF?window.setTimeout(function(){q.drawImage(f,y/l,y/l);a(g)},0):(q.drawImage(f,y/l,y/l),a(g))}catch(aa){null!=d&&d(aa)}});f.onerror=function(a){null!=d&&d(a)};try{t&&this.graph.addSvgShadow(b);
+var g=mxUtils.bind(this,function(){if(null!=this.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.resolvedFontCss;b.getElementsByTagName("defs")[0].appendChild(a)}k.mathEnabled&&this.addMathCss(b);f.src=this.createSvgDataUri(mxUtils.getXml(b))});this.loadFonts(g)}catch(T){null!=d&&d(T)}}),b,q)};Editor.prototype.writeGraphModelToPng=function(a,c,b,f,d){function e(a,c){var b=n;n+=c;return a.substring(b,n)}function g(a){a=e(a,4);return a.charCodeAt(3)+
+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function l(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var n=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(e(a,4),"IHDR"!=e(a,4))null!=d&&d();else{e(a,17);d=a.substring(0,n);do{var t=g(a);if("IDAT"==e(a,4)){d=a.substring(0,n-8);b=b+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):
+"")+f;f=4294967295;f=EditorUi.prototype.updateCRC(f,c,0,4);f=EditorUi.prototype.updateCRC(f,b,0,b.length);d+=l(b.length)+c+b+l(f^4294967295);d+=a.substring(n-8,a.length);break}d+=a.substring(n-8,n-4+t);e(a,t);e(a,4)}while(t);return"data:image/png;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";var k=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){k.apply(this,
arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var m=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){m.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,c){var b=null;null!=a.editor.graph.getModel().getParent(c)?b=c.getId():null!=a.currentPage&&(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var p=Format.prototype.init;
Format.prototype.init=function(){p.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var u=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?u.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=
-function(a){return!1};var v=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=v.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,b=c.editor.graph,e=this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var e=new ChangePageSetup(c);e.ignoreColor=!0;e.ignoreImage=!0;e.shadowVisible=a;b.model.execute(e)},{install:function(a){this.listener=function(){a(b.shadowVisible)};
-c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});Editor.shadowOptionEnabled||(e.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(e,60));a.appendChild(e)}return a};var B=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=B.apply(this,arguments);var c=this.editorUi,b=c.editor.graph;if(b.isEnabled()){var e=c.getCurrentFile();if(null!=e&&e.isAutosaveOptional()){var d=
-this.createOption(mxResources.get("autosave"),function(){return c.editor.autosave},function(a){c.editor.setAutosave(a);c.editor.autosave&&e.isModified()&&e.fileChanged()},{install:function(a){this.listener=function(){a(c.editor.autosave)};c.editor.addListener("autosaveChanged",this.listener)},destroy:function(){c.editor.removeListener(this.listener)}});a.appendChild(d)}}if(this.isMathOptionVisible()&&b.isEnabled()&&"undefined"!==typeof MathJax){d=this.createOption(mxResources.get("mathematicalTypesetting"),
-function(){return b.mathEnabled},function(a){c.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(b.mathEnabled)};c.addListener("mathEnabledChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});d.style.paddingTop="5px";a.appendChild(d);var k=c.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");k.style.position="relative";k.style.marginLeft="6px";k.style.top="2px";d.appendChild(k)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=
+function(a){return!1};var x=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=x.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,b=c.editor.graph,f=this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var f=new ChangePageSetup(c);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=a;b.model.execute(f)},{install:function(a){this.listener=function(){a(b.shadowVisible)};
+c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});Editor.shadowOptionEnabled||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));a.appendChild(f)}return a};var B=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=B.apply(this,arguments);var c=this.editorUi,b=c.editor.graph;if(b.isEnabled()){var f=c.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var d=
+this.createOption(mxResources.get("autosave"),function(){return c.editor.autosave},function(a){c.editor.setAutosave(a);c.editor.autosave&&f.isModified()&&f.fileChanged()},{install:function(a){this.listener=function(){a(c.editor.autosave)};c.editor.addListener("autosaveChanged",this.listener)},destroy:function(){c.editor.removeListener(this.listener)}});a.appendChild(d)}}if(this.isMathOptionVisible()&&b.isEnabled()&&"undefined"!==typeof MathJax){d=this.createOption(mxResources.get("mathematicalTypesetting"),
+function(){return b.mathEnabled},function(a){c.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(b.mathEnabled)};c.addListener("mathEnabledChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});d.style.paddingTop="5px";a.appendChild(d);var e=c.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");e.style.position="relative";e.style.marginLeft="6px";e.style.top="2px";d.appendChild(e)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=
[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",
dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",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",
@@ -2880,62 +2883,62 @@ type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,de
{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:"#aa00ff",stroke:"#7700CC",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:"#ffffff"},{fill:"#f0a30a",stroke:"#BD7000",font:"#ffffff"},{fill:"#e3c800",
stroke:"#B09500",font:"#ffffff"},{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(a,c,b){if(null!=c){var e=function(a){if(null!=a)if(b)for(var e=0;e<a.length;e++)c[a[e].name]=a[e];else for(var d in c){for(var k=!1,e=0;e<a.length;e++)if(a[e].name==d&&a[e].type==c[d].type){k=!0;break}k||delete c[d]}},d=this.editorUi.editor.graph.view.getState(a);null!=d&&
-null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),e(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{e(JSON.parse(a))}catch(C){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=
-this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));c.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},e=a.vertices,d=a.edges,k=0;k<e.length;k++)this.findCommonProperties(e[k],b,0==k);for(k=0;k<d.length;k++)this.findCommonProperties(d[k],b,0==e.length&&0==k);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),
-b,a))}};var e=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";c.style.marginRight="2px";a.appendChild(c);c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,
-function(a){this.editorUi.actions.get("pasteStyle").funct()}));c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return e.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,c,b){function e(a,c,b,e){l.getModel().beginUpdate();try{var d=[],k=[];if(null!=b.index){for(var g=[],f=b.parentRow.nextSibling;f&&
-f.getAttribute("data-pName")==a;)g.push(f.getAttribute("data-pValue")),f=f.nextSibling;b.index<g.length?null!=e?g.splice(e,1):g[b.index]=c:g.push(c);null!=b.size&&g.length>b.size&&(g=g.slice(0,b.size));c=g.join(",");null!=b.countProperty&&(l.setCellStyles(b.countProperty,g.length,l.getSelectionCells()),d.push(b.countProperty),k.push(g.length))}l.setCellStyles(a,c,l.getSelectionCells());d.push(a);k.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var n=b.dependentPropsDefVal[a],
-q=b.dependentPropsVals[a];if(q.length>c)q=q.slice(0,c);else for(var x=q.length;x<c;x++)q.push(n);q=q.join(",");l.setCellStyles(b.dependentProps[a],q,l.getSelectionCells());d.push(b.dependentProps[a]);k.push(q)}if("function"==typeof b.onChange)b.onChange(l,c);t.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",k,"cells",l.getSelectionCells()))}finally{l.getModel().endUpdate()}}function d(c,b,e){var d=mxUtils.getOffset(a,!0),k=mxUtils.getOffset(c,!0);b.style.position="absolute";
-b.style.left=k.x-d.x+"px";b.style.top=k.y-d.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(e?4:0)+"px";b.style.zIndex=5}function k(a,c,b){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(t,function(k){this.editorUi.pickColor(c,function(c){d.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+
-"')":c;e(a,c,b)});mxEvent.consume(k)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function g(a,c,b,d,k,g,f){null!=c&&(c=c.split(","),x.push({name:a,values:c,type:b,defVal:d,countProperty:k,parentRow:g,isDeletable:!0,flipBkg:f}));btn=mxUtils.button("+",mxUtils.bind(t,function(c){for(var n=g,t=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==a)n=n.nextSibling,t++;else break;var l={type:b,parentRow:g,index:t,isDeletable:!0,
-defVal:d,countProperty:k},t=q(a,"",l,0==t%2,f);e(a,d,l);n.parentNode.insertBefore(t,n.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function f(a,c,b,e,d,k,g){if(0<d){var f=Array(d);c=null!=c?c.split(","):[];for(var n=0;n<d;n++)f[n]=null!=c[n]?c[n]:null!=e?e:"";x.push({name:a,values:f,type:b,defVal:e,parentRow:k,flipBkg:g,size:d})}return document.createElement("div")}function n(a,c,b){var d=document.createElement("input");d.type=
-"checkbox";d.checked="1"==c;mxEvent.addListener(d,"change",function(){e(a,d.checked?"1":"0",b)});return d}function q(c,b,q,l,x){var y=q.dispName,A=q.type,z=document.createElement("tr");z.className="gePropRow"+(x?"Dark":"")+(l?"Alt":"")+" gePropNonHeaderRow";z.setAttribute("data-pName",c);z.setAttribute("data-pValue",b);l=!1;null!=q.index&&(z.setAttribute("data-index",q.index),y=(null!=y?y:"")+"["+q.index+"]",l=!0);var C=document.createElement("td");C.className="gePropRowCell";C.innerHTML=mxUtils.htmlEntities(mxResources.get(y,
-null,y));l&&(C.style.textAlign="right");z.appendChild(C);C=document.createElement("td");C.className="gePropRowCell";if("color"==A)C.appendChild(k(c,b,q));else if("bool"==A||"boolean"==A)C.appendChild(n(c,b,q));else if("enum"==A){var m=q.enumList;for(x=0;x<m.length;x++)if(y=m[x],y.val==b){C.innerHTML=mxUtils.htmlEntities(mxResources.get(y.dispName,null,y.dispName));break}mxEvent.addListener(C,"click",mxUtils.bind(t,function(){var k=document.createElement("select");d(C,k);for(var g=0;g<m.length;g++){var f=
-m[g],n=document.createElement("option");n.value=mxUtils.htmlEntities(f.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(f.dispName,null,f.dispName));k.appendChild(n)}k.value=b;a.appendChild(k);mxEvent.addListener(k,"change",function(){var a=mxUtils.htmlEntities(k.value);e(c,a,q)});k.focus();mxEvent.addListener(k,"blur",function(){a.removeChild(k)})}))}else"dynamicArr"==A?C.appendChild(g(c,b,q.subType,q.subDefVal,q.countProperty,z,x)):"staticArr"==A?C.appendChild(f(c,b,q.subType,q.subDefVal,q.size,
-z,x)):(C.innerHTML=b,mxEvent.addListener(C,"click",mxUtils.bind(t,function(){function k(){var a=g.value,a=0==a.length&&"string"!=A?0:a;q.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",A="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=q.min&&a<q.min?a=q.min:null!=q.max&&a>q.max&&(a=q.max);a=mxUtils.htmlEntities(("int"==A?parseInt(a):a)+"");e(c,a,q)}var g=document.createElement("input");d(C,g,!0);g.value=b;g.className="gePropEditor";"int"!=A&&"float"!=A||q.allowAuto||(g.type="number",g.step=
-"int"==A?"1":"any",null!=q.min&&(g.min=parseFloat(q.min)),null!=q.max&&(g.max=parseFloat(q.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&k()});g.focus();mxEvent.addListener(g,"blur",function(){k()})})));q.isDeletable&&(x=mxUtils.button("-",mxUtils.bind(t,function(a){e(c,"",q,q.index);mxEvent.consume(a)})),x.style.height="16px",x.style.width="25px",x.style["float"]="right",x.className="geColorBtn",C.appendChild(x));z.appendChild(C);return z}var t=this,l=this.editorUi.editor.graph,
-x=[];a.style.position="relative";a.style.padding="0";var A=document.createElement("table");A.style.whiteSpace="nowrap";A.style.width="100%";var y=document.createElement("tr");y.className="gePropHeader";var z=document.createElement("th");z.className="gePropHeaderCell";var m=document.createElement("img");m.src=Sidebar.prototype.expandedImage;z.appendChild(m);mxUtils.write(z,mxResources.get("property"));y.style.cursor="pointer";var p=function(){var c=A.querySelectorAll(".gePropNonHeaderRow"),b;if(t.editorUi.propertiesCollapsed){m.src=
-Sidebar.prototype.collapsedImage;b="none";for(var e=a.childNodes.length-1;0<=e;e--)try{var d=a.childNodes[e],k=d.nodeName.toUpperCase();"INPUT"!=k&&"SELECT"!=k||a.removeChild(d)}catch(oa){}}else m.src=Sidebar.prototype.expandedImage,b="";for(e=0;e<c.length;e++)c[e].style.display=b};mxEvent.addListener(y,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;p()});y.appendChild(z);z=document.createElement("th");z.className="gePropHeaderCell";z.innerHTML=mxResources.get("value");
-y.appendChild(z);A.appendChild(y);var E=!1,D=!1,F;for(F in c)if(y=c[F],"function"!=typeof y.isVisible||y.isVisible(b,this)){var L=null!=b.style[F]?mxUtils.htmlEntities(b.style[F]+""):y.defVal;if("separator"==y.type)D=!D;else{if("staticArr"==y.type)y.size=parseInt(b.style[y.sizeProperty]||c[y.sizeProperty].defVal)||0;else if(null!=y.dependentProps){for(var u=y.dependentProps,O=[],v=[],z=0;z<u.length;z++){var B=b.style[u[z]];v.push(c[u[z]].subDefVal);O.push(null!=B?B.split(","):[])}y.dependentPropsDefVal=
-v;y.dependentPropsVals=O}A.appendChild(q(F,L,y,E,D));E=!E}}for(z=0;z<x.length;z++)for(y=x[z],c=y.parentRow,b=0;b<y.values.length;b++)F=q(y.name,y.values[b],{type:y.type,parentRow:y.parentRow,isDeletable:y.isDeletable,index:b,defVal:y.defVal,countProperty:y.countProperty,size:y.size},0==b%2,y.flipBkg),c.parentNode.insertBefore(F,c.nextSibling),c=F;a.appendChild(A);p();return a};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){e.getModel().beginUpdate();
-try{var b=e.getSelectionCells();for(c=0;c<b.length;c++){for(var d=e.getModel().getStyle(b[c]),g=0;g<k.length;g++)d=mxUtils.removeStylename(d,k[g]);var f=e.getModel().isVertex(b[c])?e.defaultVertexStyle:e.defaultEdgeStyle;null!=a?(d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(f,mxConstants.STYLE_GRADIENTCOLOR,null)),d=""==a.fill?mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(f,mxConstants.STYLE_FILLCOLOR,
-null)),d=""==a.stroke?mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(f,mxConstants.STYLE_STROKECOLOR,null)),e.getModel().isVertex(b[c])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(f,mxConstants.STYLE_FONTCOLOR,null)))):(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(f,mxConstants.STYLE_FILLCOLOR,"#ffffff")),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(f,
-mxConstants.STYLE_STROKECOLOR,"#000000")),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(f,mxConstants.STYLE_GRADIENTCOLOR,null)),e.getModel().isVertex(b[c])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(f,mxConstants.STYLE_FONTCOLOR,null))));e.getModel().setStyle(b[c],d)}}finally{e.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height="30px";c.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&
-(mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?c.style.background="url('"+Dialog.prototype.noColorImage+"')":c.style.backgroundColor=""==a.fill?mxUtils.getValue(e.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"):a.fill||mxUtils.getValue(e.defaultVertexStyle,
-mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"),c.style.border=a.stroke==mxConstants.NONE?"1px solid transparent":""==a.stroke?"1px solid "+mxUtils.getValue(e.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"):"1px solid "+(a.stroke||mxUtils.getValue(e.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"));else{var b=mxUtils.getValue(e.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.getValue(e.defaultVertexStyle,
-mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=b;c.style.border="1px solid "+g}d.appendChild(c)}d.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(d),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var e=this.editorUi.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight="20px";
-a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);var k="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var g=document.createElement("div");g.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
-mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var f=document.createElement("div");f.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(a.appendChild(g),a.appendChild(f));mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(g);b(f);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&
-(b=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var e=this.editorUi.editor.graph,d=e.view.getState(e.getSelectionCell());1==e.getSelectionCount()&&null!=d&&null!=d.shape&&null!=d.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
+stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(a,c,b){if(null!=c){var f=function(a){if(null!=a)if(b)for(var f=0;f<a.length;f++)c[a[f].name]=a[f];else for(var d in c){for(var e=!1,f=0;f<a.length;f++)if(a[f].name==d&&a[f].type==c[d].type){e=!0;break}e||delete c[d]}},d=this.editorUi.editor.graph.view.getState(a);null!=d&&
+null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),f(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(C){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=
+this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));c.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},f=a.vertices,d=a.edges,e=0;e<f.length;e++)this.findCommonProperties(f[e],b,0==e);for(e=0;e<d.length;e++)this.findCommonProperties(d[e],b,0==f.length&&0==e);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),
+b,a))}};var f=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";c.style.marginRight="2px";a.appendChild(c);c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,
+function(a){this.editorUi.actions.get("pasteStyle").funct()}));c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return f.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,c,b){function f(a,c,b,f){k.getModel().beginUpdate();try{var d=[],e=[];if(null!=b.index){for(var g=[],l=b.parentRow.nextSibling;l&&
+l.getAttribute("data-pName")==a;)g.push(l.getAttribute("data-pValue")),l=l.nextSibling;b.index<g.length?null!=f?g.splice(f,1):g[b.index]=c:g.push(c);null!=b.size&&g.length>b.size&&(g=g.slice(0,b.size));c=g.join(",");null!=b.countProperty&&(k.setCellStyles(b.countProperty,g.length,k.getSelectionCells()),d.push(b.countProperty),e.push(g.length))}k.setCellStyles(a,c,k.getSelectionCells());d.push(a);e.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var n=b.dependentPropsDefVal[a],
+t=b.dependentPropsVals[a];if(t.length>c)t=t.slice(0,c);else for(var y=t.length;y<c;y++)t.push(n);t=t.join(",");k.setCellStyles(b.dependentProps[a],t,k.getSelectionCells());d.push(b.dependentProps[a]);e.push(t)}if("function"==typeof b.onChange)b.onChange(k,c);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",e,"cells",k.getSelectionCells()))}finally{k.getModel().endUpdate()}}function d(c,b,f){var d=mxUtils.getOffset(a,!0),e=mxUtils.getOffset(c,!0);b.style.position="absolute";
+b.style.left=e.x-d.x+"px";b.style.top=e.y-d.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(f?4:0)+"px";b.style.zIndex=5}function e(a,c,b){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,function(e){this.editorUi.pickColor(c,function(c){d.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+
+"')":c;f(a,c,b)});mxEvent.consume(e)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function g(a,c,b,d,e,g,l){null!=c&&(c=c.split(","),y.push({name:a,values:c,type:b,defVal:d,countProperty:e,parentRow:g,isDeletable:!0,flipBkg:l}));btn=mxUtils.button("+",mxUtils.bind(q,function(c){for(var n=g,q=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==a)n=n.nextSibling,q++;else break;var k={type:b,parentRow:g,index:q,isDeletable:!0,
+defVal:d,countProperty:e},q=t(a,"",k,0==q%2,l);f(a,d,k);n.parentNode.insertBefore(q,n.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function l(a,c,b,f,d,e,g){if(0<d){var l=Array(d);c=null!=c?c.split(","):[];for(var n=0;n<d;n++)l[n]=null!=c[n]?c[n]:null!=f?f:"";y.push({name:a,values:l,type:b,defVal:f,parentRow:e,flipBkg:g,size:d})}return document.createElement("div")}function n(a,c,b){var d=document.createElement("input");d.type=
+"checkbox";d.checked="1"==c;mxEvent.addListener(d,"change",function(){f(a,d.checked?"1":"0",b)});return d}function t(c,b,t,k,y){var v=t.dispName,A=t.type,z=document.createElement("tr");z.className="gePropRow"+(y?"Dark":"")+(k?"Alt":"")+" gePropNonHeaderRow";z.setAttribute("data-pName",c);z.setAttribute("data-pValue",b);k=!1;null!=t.index&&(z.setAttribute("data-index",t.index),v=(null!=v?v:"")+"["+t.index+"]",k=!0);var m=document.createElement("td");m.className="gePropRowCell";m.innerHTML=mxUtils.htmlEntities(mxResources.get(v,
+null,v));k&&(m.style.textAlign="right");z.appendChild(m);m=document.createElement("td");m.className="gePropRowCell";if("color"==A)m.appendChild(e(c,b,t));else if("bool"==A||"boolean"==A)m.appendChild(n(c,b,t));else if("enum"==A){var C=t.enumList;for(y=0;y<C.length;y++)if(v=C[y],v.val==b){m.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(m,"click",mxUtils.bind(q,function(){var e=document.createElement("select");d(m,e);for(var g=0;g<C.length;g++){var l=
+C[g],n=document.createElement("option");n.value=mxUtils.htmlEntities(l.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(l.dispName,null,l.dispName));e.appendChild(n)}e.value=b;a.appendChild(e);mxEvent.addListener(e,"change",function(){var a=mxUtils.htmlEntities(e.value);f(c,a,t)});e.focus();mxEvent.addListener(e,"blur",function(){a.removeChild(e)})}))}else"dynamicArr"==A?m.appendChild(g(c,b,t.subType,t.subDefVal,t.countProperty,z,y)):"staticArr"==A?m.appendChild(l(c,b,t.subType,t.subDefVal,t.size,
+z,y)):(m.innerHTML=b,mxEvent.addListener(m,"click",mxUtils.bind(q,function(){function e(){var a=g.value,a=0==a.length&&"string"!=A?0:a;t.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",A="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=t.min&&a<t.min?a=t.min:null!=t.max&&a>t.max&&(a=t.max);a=mxUtils.htmlEntities(("int"==A?parseInt(a):a)+"");f(c,a,t)}var g=document.createElement("input");d(m,g,!0);g.value=b;g.className="gePropEditor";"int"!=A&&"float"!=A||t.allowAuto||(g.type="number",g.step=
+"int"==A?"1":"any",null!=t.min&&(g.min=parseFloat(t.min)),null!=t.max&&(g.max=parseFloat(t.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&e()});g.focus();mxEvent.addListener(g,"blur",function(){e()})})));t.isDeletable&&(y=mxUtils.button("-",mxUtils.bind(q,function(a){f(c,"",t,t.index);mxEvent.consume(a)})),y.style.height="16px",y.style.width="25px",y.style["float"]="right",y.className="geColorBtn",m.appendChild(y));z.appendChild(m);return z}var q=this,k=this.editorUi.editor.graph,
+y=[];a.style.position="relative";a.style.padding="0";var A=document.createElement("table");A.style.whiteSpace="nowrap";A.style.width="100%";var v=document.createElement("tr");v.className="gePropHeader";var z=document.createElement("th");z.className="gePropHeaderCell";var m=document.createElement("img");m.src=Sidebar.prototype.expandedImage;z.appendChild(m);mxUtils.write(z,mxResources.get("property"));v.style.cursor="pointer";var G=function(){var c=A.querySelectorAll(".gePropNonHeaderRow"),b;if(q.editorUi.propertiesCollapsed){m.src=
+Sidebar.prototype.collapsedImage;b="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],e=d.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(d)}catch(ma){}}else m.src=Sidebar.prototype.expandedImage,b="";for(f=0;f<c.length;f++)c[f].style.display=b};mxEvent.addListener(v,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;G()});v.appendChild(z);z=document.createElement("th");z.className="gePropHeaderCell";z.innerHTML=mxResources.get("value");
+v.appendChild(z);A.appendChild(v);var p=!1,D=!1,E;for(E in c)if(v=c[E],"function"!=typeof v.isVisible||v.isVisible(b,this)){var H=null!=b.style[E]?mxUtils.htmlEntities(b.style[E]+""):v.defVal;if("separator"==v.type)D=!D;else{if("staticArr"==v.type)v.size=parseInt(b.style[v.sizeProperty]||c[v.sizeProperty].defVal)||0;else if(null!=v.dependentProps){for(var u=v.dependentProps,M=[],x=[],z=0;z<u.length;z++){var B=b.style[u[z]];x.push(c[u[z]].subDefVal);M.push(null!=B?B.split(","):[])}v.dependentPropsDefVal=
+x;v.dependentPropsVals=M}A.appendChild(t(E,H,v,p,D));p=!p}}for(z=0;z<y.length;z++)for(v=y[z],c=v.parentRow,b=0;b<v.values.length;b++)E=t(v.name,v.values[b],{type:v.type,parentRow:v.parentRow,isDeletable:v.isDeletable,index:b,defVal:v.defVal,countProperty:v.countProperty,size:v.size},0==b%2,v.flipBkg),c.parentNode.insertBefore(E,c.nextSibling),c=E;a.appendChild(A);G();return a};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){f.getModel().beginUpdate();
+try{var b=f.getSelectionCells();for(c=0;c<b.length;c++){for(var d=f.getModel().getStyle(b[c]),g=0;g<e.length;g++)d=mxUtils.removeStylename(d,e[g]);var l=f.getModel().isVertex(b[c])?f.defaultVertexStyle:f.defaultEdgeStyle;null!=a?(d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(l,mxConstants.STYLE_GRADIENTCOLOR,null)),d=""==a.fill?mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(l,mxConstants.STYLE_FILLCOLOR,
+null)),d=""==a.stroke?mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(l,mxConstants.STYLE_STROKECOLOR,null)),f.getModel().isVertex(b[c])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(l,mxConstants.STYLE_FONTCOLOR,null)))):(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(l,mxConstants.STYLE_FILLCOLOR,"#ffffff")),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(l,
+mxConstants.STYLE_STROKECOLOR,"#000000")),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(l,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(b[c])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(l,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(b[c],d)}}finally{f.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height="30px";c.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&
+(mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?c.style.background="url('"+Dialog.prototype.noColorImage+"')":c.style.backgroundColor=""==a.fill?mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"):a.fill||mxUtils.getValue(f.defaultVertexStyle,
+mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"),c.style.border=a.stroke==mxConstants.NONE?"1px solid transparent":""==a.stroke?"1px solid "+mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"):"1px solid "+(a.stroke||mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"));else{var b=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.getValue(f.defaultVertexStyle,
+mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=b;c.style.border="1px solid "+g}d.appendChild(c)}d.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(d),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var f=this.editorUi.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight="20px";
+a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);var e="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var g=document.createElement("div");g.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var l=document.createElement("div");l.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(a.appendChild(g),a.appendChild(l));mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(g);b(l);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&
+(b=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var f=this.editorUi.editor.graph,d=f.view.getState(f.getSelectionCell());1==f.getSelectionCount()&&null!=d&&null!=d.shape&&null!=d.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
function(a){this.editorUi.actions.get("editShape").funct()})),c.setAttribute("title",mxResources.get("editShape")),c.style.marginBottom="2px",null==b?c.style.width="202px":(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c)):c.image&&(c=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),c.setAttribute("title",mxResources.get("editImage")),c.style.marginBottom="2px",null==b?c.style.width="202px":
(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize=
-"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var k=Graph.prototype.init;Graph.prototype.init=function(){function a(a){c=a;try{if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)c=document.createEventObject(a),c.type=a.type,c.canBubble=a.canBubble,c.cancelable=a.cancelable,c.view=a.view,c.detail=a.detail,c.screenX=a.screenX,c.screenY=a.screenY,c.clientX=a.clientX,c.clientY=a.clientY,c.ctrlKey=a.ctrlKey,c.altKey=a.altKey,c.shiftKey=a.shiftKey,c.metaKey=a.metaKey,c.button=
-a.button,c.relatedTarget=a.relatedTarget}catch(C){}}k.apply(this,arguments);window.mxFreehand&&(this.freehand=new mxFreehand(this));var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var e=this.layoutManager.getLayout;
+"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var g=Graph.prototype.init;Graph.prototype.init=function(){function a(a){c=a;try{if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)c=document.createEventObject(a),c.type=a.type,c.canBubble=a.canBubble,c.cancelable=a.cancelable,c.view=a.view,c.detail=a.detail,c.screenX=a.screenX,c.screenY=a.screenY,c.clientX=a.clientX,c.clientY=a.clientY,c.ctrlKey=a.ctrlKey,c.altKey=a.altKey,c.shiftKey=a.shiftKey,c.metaKey=a.metaKey,c.button=
+a.button,c.relatedTarget=a.relatedTarget}catch(C){}}g.apply(this,arguments);window.mxFreehand&&(this.freehand=new mxFreehand(this));var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var f=this.layoutManager.getLayout;
this.layoutManager.getLayout=function(a){var c=this.graph.getCellStyle(a);if(null!=c){if("rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.gridSize=null!=c.rackUnitSize?parseFloat(c.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;b.fill=!0;b.marginLeft=c.marginLeft||0;b.marginRight=c.marginRight||0;b.marginTop=c.marginTop||0;b.marginBottom=c.marginBottom||0;b.allowGaps=c.allowGaps||0;b.resizeParent=!1;return b}if("undefined"!==typeof mxTableLayout&&"tableLayout"==
c.childLayout)return b=new mxTableLayout(this.graph),b.rows=c.tableRows||2,b.columns=c.tableColumns||2,b.colPercentages=c.colPercentages,b.rowPercentages=c.rowPercentages,b.equalColumns="1"==mxUtils.getValue(c,"equalColumns",b.colPercentages?"0":"1"),b.equalRows="1"==mxUtils.getValue(c,"equalRows",b.rowPercentages?"0":"1"),b.resizeParent="1"==mxUtils.getValue(c,"resizeParent","1"),b.border=c.tableBorder||b.border,b.marginLeft=c.marginLeft||0,b.marginRight=c.marginRight||0,b.marginTop=c.marginTop||
-0,b.marginBottom=c.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(c,"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(c,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=c.colWidths||"100",b.rowHeights=c.rowHeights||"50",b}return e.apply(this,arguments)};this.updateGlobalUrlVariables()};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));
-if(null!=a)for(var c in a)this.globalVars[c]=a[c]}catch(O){null!=window.console&&console.log("Error in vars URL parameter: "+O)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var q=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c=q.apply(this,arguments);null==c&&null!=this.globalVars&&(c=this.globalVars[a]);return c};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=
-this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var n=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,c,b,e,d,k,g,f,q,t,l){var x=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&&(x=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var y=n.apply(this,arguments);if(l&&null!=this.extFonts&&0<this.extFonts.length){var A=
-y.ownerDocument,z=null!=A.createElementNS?A.createElementNS(mxConstants.NS_SVG,"style"):A.createElement("style");null!=A.setAttributeNS?z.setAttributeNS("type","text/css"):z.setAttribute("type","text/css");for(var m="",C=0;C<this.extFonts.length;C++)var p=this.extFonts[C].name,E=this.extFonts[C].url,m=0==E.indexOf(Editor.GOOGLE_FONTS)?m+("@import url("+E+");"):m+('@font-face {font-family: "'+p+'";src: url("'+E+'");}');z.appendChild(A.createTextNode(m));y.getElementsByTagName("defs")[0].appendChild(z)}null!=
-x&&(this.stylesheet=x,this.refresh());return y};var g=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=g.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var c=a.drawText;a.drawText=function(a,b){if(null!=b.addForeignObject&&null!=a.text&&a.text.checkBounds()&&null!=a.text.node&&null==a.text.node.ownerSVGElement){b.save();var e=a.text.node.cloneNode(!0);e.style.transformOrigin="";e.style.transform="";e.style.top="0px";e.style.left=
-"0px";for(var d=e.getElementsByTagName("math");0<d.length;)d[0].parentNode.removeChild(d[0]);var k=a.text.scale,d=a.text.bounds.x/k,g=a.text.bounds.y/k,f=a.text.bounds.width/k,k=a.text.bounds.height/k;a.text.updateTransform(b,d,g,f,k);a.text.configureCanvas(b,d,g,f,k);var n=mxUtils.isNode(a.text.value)||a.text.dialect==mxConstants.DIALECT_STRICTHTML,q=n||b instanceof mxVmlCanvas2D?"html":"",t=a.text.value;n||"html"!=q||(t=mxUtils.htmlEntities(t,!1));"html"!=q||mxUtils.isNode(a.text.value)||(t=mxUtils.replaceTrailingNewlines(t,
-"<div><br></div>"));var t=!mxUtils.isNode(a.text.value)&&a.text.replaceLinefeeds&&"html"==q?t.replace(/\n/g,"<br/>"):t,l=a.text.textDirection;l!=mxConstants.TEXT_DIRECTION_AUTO||n||(l=a.text.getAutoDirection());l!=mxConstants.TEXT_DIRECTION_LTR&&l!=mxConstants.TEXT_DIRECTION_RTL&&(l=null);b.addForeignObject(d+b.state.dx,g+b.state.dy,f,k,t,a.text.align,a.text.valign,a.text.wrap,q,a.text.overflow,a.text.clipped,a.text.getTextRotation(),l,e,b.root.ownerSVGElement);b.restore()}else c.apply(this,arguments)}}return a};
-var x=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return x.apply(this,arguments)&&!mxClient.IS_SF};var A=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){A.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?
+0,b.marginBottom=c.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(c,"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(c,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=c.colWidths||"100",b.rowHeights=c.rowHeights||"50",b}return f.apply(this,arguments)};this.updateGlobalUrlVariables()};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));
+if(null!=a)for(var c in a)this.globalVars[c]=a[c]}catch(M){null!=window.console&&console.log("Error in vars URL parameter: "+M)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var t=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c=t.apply(this,arguments);null==c&&null!=this.globalVars&&(c=this.globalVars[a]);return c};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=
+this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var n=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,c,b,f,d,e,g,l,t,q,k){var y=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&&(y=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var A=n.apply(this,arguments);if(k&&null!=this.extFonts&&0<this.extFonts.length){var v=
+A.ownerDocument,z=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"style"):v.createElement("style");null!=v.setAttributeNS?z.setAttributeNS("type","text/css"):z.setAttribute("type","text/css");for(var m="",C=0;C<this.extFonts.length;C++)var G=this.extFonts[C].name,p=this.extFonts[C].url,m=0==p.indexOf(Editor.GOOGLE_FONTS)?m+("@import url("+p+");"):m+('@font-face {font-family: "'+G+'";src: url("'+p+'");}');z.appendChild(v.createTextNode(m));A.getElementsByTagName("defs")[0].appendChild(z)}null!=
+y&&(this.stylesheet=y,this.refresh());return A};var l=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=l.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var c=a.drawText;a.drawText=function(a,b){if(null!=b.addForeignObject&&null!=a.text&&a.text.checkBounds()&&null!=a.text.node&&null==a.text.node.ownerSVGElement){b.save();var f=a.text.node.cloneNode(!0);f.style.transformOrigin="";f.style.transform="";f.style.top="0px";f.style.left=
+"0px";for(var d=f.getElementsByTagName("math");0<d.length;)d[0].parentNode.removeChild(d[0]);var e=a.text.scale,d=a.text.bounds.x/e,g=a.text.bounds.y/e,l=a.text.bounds.width/e,e=a.text.bounds.height/e;a.text.updateTransform(b,d,g,l,e);a.text.configureCanvas(b,d,g,l,e);var n=mxUtils.isNode(a.text.value)||a.text.dialect==mxConstants.DIALECT_STRICTHTML,t=n||b instanceof mxVmlCanvas2D?"html":"",q=a.text.value;n||"html"!=t||(q=mxUtils.htmlEntities(q,!1));"html"!=t||mxUtils.isNode(a.text.value)||(q=mxUtils.replaceTrailingNewlines(q,
+"<div><br></div>"));var q=!mxUtils.isNode(a.text.value)&&a.text.replaceLinefeeds&&"html"==t?q.replace(/\n/g,"<br/>"):q,k=a.text.textDirection;k!=mxConstants.TEXT_DIRECTION_AUTO||n||(k=a.text.getAutoDirection());k!=mxConstants.TEXT_DIRECTION_LTR&&k!=mxConstants.TEXT_DIRECTION_RTL&&(k=null);b.addForeignObject(d+b.state.dx,g+b.state.dy,l,e,q,a.text.align,a.text.valign,a.text.wrap,t,a.text.overflow,a.text.clipped,a.text.getTextRotation(),k,f,b.root.ownerSVGElement);b.restore()}else c.apply(this,arguments)}}return a};
+var y=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return y.apply(this,arguments)&&!mxClient.IS_SF};var A=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){A.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?
null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,
-a.ownerSVGElement))}};var t=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){t.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var c=0;c<a.actions.length;c++){var b=a.actions[c];if(null!=b.open)if(this.isCustomLink(b.open)){if(!this.customLinkClicked(b.open))return}else this.openLink(b.open)}this.model.beginUpdate();try{for(c=
-0;c<a.actions.length;c++)b=a.actions[c],null!=b.toggle&&this.toggleCells(this.getCellsForAction(b.toggle,!0)),null!=b.show&&this.setCellsVisible(this.getCellsForAction(b.show,!0),!0),null!=b.hide&&this.setCellsVisible(this.getCellsForAction(b.hide,!0),!1)}finally{this.model.endUpdate()}for(c=0;c<a.actions.length;c++){var b=a.actions[c],e=[];null!=b.select&&this.isEnabled()&&(e=this.getCellsForAction(b.select),this.setSelectionCells(e));null!=b.highlight&&(e=this.getCellsForAction(b.highlight),this.highlightCells(e,
-b.highlight.color,b.highlight.duration,b.highlight.opacity));null!=b.scroll&&(e=this.getCellsForAction(b.scroll));0<e.length&&this.scrollCellToVisible(e[0])}}};Graph.prototype.updateCustomLinksForCell=function(a,c){var b=this.getLinkForCell(c);null!=b&&"data:action/json,"==b.substring(0,17)&&this.setLinkForCell(c,this.updateCustomLink(a,b));if(this.isHtmlLabel(c)){var e=document.createElement("div");e.innerHTML=this.getLabel(c);for(var d=e.getElementsByTagName("a"),k=!1,g=0;g<d.length;g++)b=d[g].getAttribute("href"),
-null!=b&&"data:action/json,"==b.substring(0,17)&&(d[g].setAttribute("href",this.updateCustomLink(a,b)),k=!0);k&&this.labelChanged(c,e.innerHTML)}};Graph.prototype.updateCustomLink=function(a,c){if("data:action/json,"==c.substring(0,17))try{var b=JSON.parse(c.substring(17));null!=b.actions&&(this.updateCustomLinkActions(a,b.actions),c="data:action/json,"+JSON.stringify(b))}catch(I){}return c};Graph.prototype.updateCustomLinkActions=function(a,c){for(var b=0;b<c.length;b++){var e=c[b];this.updateCustomLinkAction(a,
-e.toggle);this.updateCustomLinkAction(a,e.show);this.updateCustomLinkAction(a,e.hide);this.updateCustomLinkAction(a,e.select);this.updateCustomLinkAction(a,e.highlight);this.updateCustomLinkAction(a,e.scroll)}};Graph.prototype.updateCustomLinkAction=function(a,c){if(null!=c&&null!=c.cells){for(var b=[],e=0;e<c.cells.length;e++)if("*"==c.cells[e])b.push(c.cells[e]);else{var d=a[c.cells[e]];null!=d?""!=d&&b.push(d):b.push(c.cells[e])}c.cells=b}};Graph.prototype.getCellsForAction=function(a,c){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,
-null,null,c))};Graph.prototype.getCellsById=function(a){var c=[];if(null!=a)for(var b=0;b<a.length;b++)if("*"==a[b])var e=this.getDefaultParent(),c=c.concat(this.model.filterDescendants(function(a){return a!=e},e));else{var d=this.model.getCell(a[b]);null!=d&&c.push(d)}return c};Graph.prototype.getCellsForTags=function(a,c,b,e){var d=[];if(null!=a){c=null!=c?c:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var k=0,g={},f=0;f<a.length;f++)0<a[f].length&&(g[a[f].toLowerCase()]=
-!0,k++);for(f=0;f<c.length;f++)if(e&&this.model.getParent(c[f])==this.model.root||this.model.isVertex(c[f])||this.model.isEdge(c[f])){var n=null!=c[f].value&&"object"==typeof c[f].value?mxUtils.trim(c[f].value.getAttribute(b)||""):"",q=!1;if(0<n.length){if(n=n.toLowerCase().split(" "),n.length>=a.length){for(var t=q=0;t<n.length&&q<k;t++)null!=g[n[t]]&&q++;q=q==k}}else q=0==a.length;q&&d.push(c[f])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],
-!this.model.isVisible(a[c]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,c){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],c)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,c,b,e){for(var d=0;d<a.length;d++)this.highlightCell(a[d],c,b,e)};Graph.prototype.highlightCell=function(a,c,b,e){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,
-mxConstants.STYLE_STROKEWIDTH,1)+4),k=new mxCellHighlight(this,c,d,!1);null!=e&&(k.opacity=e);k.highlight(a);window.setTimeout(function(){null!=k.shape&&(mxUtils.setPrefixedStyle(k.shape.node.style,"transition","all 1200ms ease-in-out"),k.shape.node.style.opacity=0);window.setTimeout(function(){k.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1;var e=a.ownerDocument,d=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"filter"):e.createElement("filter");
-d.setAttribute("id",this.shadowId);var k=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):e.createElement("feGaussianBlur");k.setAttribute("in","SourceAlpha");k.setAttribute("stdDeviation",this.svgShadowBlur);k.setAttribute("result","blur");d.appendChild(k);k=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feOffset"):e.createElement("feOffset");k.setAttribute("in","blur");k.setAttribute("dx",this.svgShadowSize);k.setAttribute("dy",this.svgShadowSize);k.setAttribute("result",
-"offsetBlur");d.appendChild(k);k=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feFlood"):e.createElement("feFlood");k.setAttribute("flood-color",this.svgShadowColor);k.setAttribute("flood-opacity",this.svgShadowOpacity);k.setAttribute("result","offsetColor");d.appendChild(k);k=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feComposite"):e.createElement("feComposite");k.setAttribute("in","offsetColor");k.setAttribute("in2","offsetBlur");k.setAttribute("operator","in");
-k.setAttribute("result","offsetBlur");d.appendChild(k);k=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feBlend"):e.createElement("feBlend");k.setAttribute("in","SourceGraphic");k.setAttribute("in2","offsetBlur");d.appendChild(k);k=a.getElementsByTagName("defs");0==k.length?(e=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"defs"):e.createElement("defs"),null!=a.firstChild?a.insertBefore(e,a.firstChild):a.appendChild(e)):e=k[0];e.appendChild(d);b||(c=null!=c?c:a.getElementsByTagName("g")[0],
+a.ownerSVGElement))}};var q=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){q.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var c=0;c<a.actions.length;c++){var b=a.actions[c];if(null!=b.open)if(this.isCustomLink(b.open)){if(!this.customLinkClicked(b.open))return}else this.openLink(b.open)}this.model.beginUpdate();try{for(c=
+0;c<a.actions.length;c++)b=a.actions[c],null!=b.toggle&&this.toggleCells(this.getCellsForAction(b.toggle,!0)),null!=b.show&&this.setCellsVisible(this.getCellsForAction(b.show,!0),!0),null!=b.hide&&this.setCellsVisible(this.getCellsForAction(b.hide,!0),!1)}finally{this.model.endUpdate()}for(c=0;c<a.actions.length;c++){var b=a.actions[c],f=[];null!=b.select&&this.isEnabled()&&(f=this.getCellsForAction(b.select),this.setSelectionCells(f));null!=b.highlight&&(f=this.getCellsForAction(b.highlight),this.highlightCells(f,
+b.highlight.color,b.highlight.duration,b.highlight.opacity));null!=b.scroll&&(f=this.getCellsForAction(b.scroll));0<f.length&&this.scrollCellToVisible(f[0])}}};Graph.prototype.updateCustomLinksForCell=function(a,c){var b=this.getLinkForCell(c);null!=b&&"data:action/json,"==b.substring(0,17)&&this.setLinkForCell(c,this.updateCustomLink(a,b));if(this.isHtmlLabel(c)){var f=document.createElement("div");f.innerHTML=this.getLabel(c);for(var d=f.getElementsByTagName("a"),e=!1,g=0;g<d.length;g++)b=d[g].getAttribute("href"),
+null!=b&&"data:action/json,"==b.substring(0,17)&&(d[g].setAttribute("href",this.updateCustomLink(a,b)),e=!0);e&&this.labelChanged(c,f.innerHTML)}};Graph.prototype.updateCustomLink=function(a,c){if("data:action/json,"==c.substring(0,17))try{var b=JSON.parse(c.substring(17));null!=b.actions&&(this.updateCustomLinkActions(a,b.actions),c="data:action/json,"+JSON.stringify(b))}catch(J){}return c};Graph.prototype.updateCustomLinkActions=function(a,c){for(var b=0;b<c.length;b++){var f=c[b];this.updateCustomLinkAction(a,
+f.toggle);this.updateCustomLinkAction(a,f.show);this.updateCustomLinkAction(a,f.hide);this.updateCustomLinkAction(a,f.select);this.updateCustomLinkAction(a,f.highlight);this.updateCustomLinkAction(a,f.scroll)}};Graph.prototype.updateCustomLinkAction=function(a,c){if(null!=c&&null!=c.cells){for(var b=[],f=0;f<c.cells.length;f++)if("*"==c.cells[f])b.push(c.cells[f]);else{var d=a[c.cells[f]];null!=d?""!=d&&b.push(d):b.push(c.cells[f])}c.cells=b}};Graph.prototype.getCellsForAction=function(a,c){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,
+null,null,c))};Graph.prototype.getCellsById=function(a){var c=[];if(null!=a)for(var b=0;b<a.length;b++)if("*"==a[b])var f=this.getDefaultParent(),c=c.concat(this.model.filterDescendants(function(a){return a!=f},f));else{var d=this.model.getCell(a[b]);null!=d&&c.push(d)}return c};Graph.prototype.getCellsForTags=function(a,c,b,f){var d=[];if(null!=a){c=null!=c?c:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var e=0,g={},l=0;l<a.length;l++)0<a[l].length&&(g[a[l].toLowerCase()]=
+!0,e++);for(l=0;l<c.length;l++)if(f&&this.model.getParent(c[l])==this.model.root||this.model.isVertex(c[l])||this.model.isEdge(c[l])){var n=null!=c[l].value&&"object"==typeof c[l].value?mxUtils.trim(c[l].value.getAttribute(b)||""):"",t=!1;if(0<n.length){if(n=n.toLowerCase().split(" "),n.length>=a.length){for(var q=t=0;q<n.length&&t<e;q++)null!=g[n[q]]&&t++;t=t==e}}else t=0==a.length;t&&d.push(c[l])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],
+!this.model.isVisible(a[c]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,c){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],c)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,c,b,f){for(var d=0;d<a.length;d++)this.highlightCell(a[d],c,b,f)};Graph.prototype.highlightCell=function(a,c,b,f){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,
+mxConstants.STYLE_STROKEWIDTH,1)+4),e=new mxCellHighlight(this,c,d,!1);null!=f&&(e.opacity=f);e.highlight(a);window.setTimeout(function(){null!=e.shape&&(mxUtils.setPrefixedStyle(e.shape.node.style,"transition","all 1200ms ease-in-out"),e.shape.node.style.opacity=0);window.setTimeout(function(){e.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1;var f=a.ownerDocument,d=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");
+d.setAttribute("id",this.shadowId);var e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");e.setAttribute("in","SourceAlpha");e.setAttribute("stdDeviation",this.svgShadowBlur);e.setAttribute("result","blur");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset");e.setAttribute("in","blur");e.setAttribute("dx",this.svgShadowSize);e.setAttribute("dy",this.svgShadowSize);e.setAttribute("result",
+"offsetBlur");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");e.setAttribute("flood-color",this.svgShadowColor);e.setAttribute("flood-opacity",this.svgShadowOpacity);e.setAttribute("result","offsetColor");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feComposite"):f.createElement("feComposite");e.setAttribute("in","offsetColor");e.setAttribute("in2","offsetBlur");e.setAttribute("operator","in");
+e.setAttribute("result","offsetBlur");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");e.setAttribute("in","SourceGraphic");e.setAttribute("in2","offsetBlur");d.appendChild(e);e=a.getElementsByTagName("defs");0==e.length?(f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=a.firstChild?a.insertBefore(f,a.firstChild):a.appendChild(f)):f=e[0];f.appendChild(d);b||(c=null!=c?c:a.getElementsByTagName("g")[0],
null!=c&&(c.setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6),c=a.getAttribute("viewBox"),null!=c&&0<c.length&&(c=c.split(" "),3<c.length&&(w=parseFloat(c[2])+6,h=parseFloat(c[3])+6,a.setAttribute("viewBox",c[0]+" "+c[1]+" "+w+" "+h))))));return d};Graph.prototype.setShadowVisible=function(a,c){mxClient.IS_SVG&&(c=null!=c?c:!0,(this.shadowVisible=
a)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),c&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),c,b=0;do c=this.model.getChildAt(this.model.root,b);while(b++<a&&"1"==mxUtils.getValue(this.getCellStyle(c),"locked","0"));null!=c&&this.setDefaultParent(c)}};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+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+
@@ -2946,526 +2949,526 @@ a)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this
[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",
STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];
mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=
-[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};var F=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,e,d,k,g,f,n,q){if(null!=b&&null==mxMarker.markers[b]){var t=
-this.getPackageForType(b);null!=t&&mxStencilRegistry.getStencil(t)}return F.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){y.value=Math.max(1,Math.min(f,Math.max(parseInt(y.value),parseInt(x.value))));x.value=Math.max(1,Math.min(f,Math.min(parseInt(y.value),parseInt(x.value))))}function e(c){function b(c,b,k){var g=c.useCssTransforms,f=c.currentTranslate,n=c.currentScale,q=c.view.translate,t=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 l=c.getGraphBounds(),x=0,A=0,y=ta.get(),m=1/c.pageScale,C=E.checked;if(C)var m=parseInt(U.value),z=parseInt(ga.value),m=Math.min(y.height*z/(l.height/c.view.scale),y.width*m/(l.width/c.view.scale));else m=parseInt(p.value)/(100*c.pageScale),isNaN(m)&&(e=1/c.pageScale,p.value="100 %");y=mxRectangle.fromRectangle(y);y.width=Math.ceil(y.width*e);y.height=Math.ceil(y.height*e);m*=e;!C&&c.pageVisible?(l=c.getPageLayout(),
-x-=l.x*y.width,A-=l.y*y.height):C=!0;if(null==b){b=PrintDialog.createPrintPreview(c,m,y,0,x,A,C);b.pageSelector=!1;b.mathEnabled=!1;x=a.getCurrentFile();null!=x&&(b.title=x.getTitle());var D=b.writeHead;b.writeHead=function(c){D.apply(this,arguments);null!=a.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),c.writeln("</style>"))};if("undefined"!==typeof MathJax){var F=b.renderPage;b.renderPage=function(a,c,b,e,d,k){var g=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&
-!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var f=F.apply(this,arguments);mxClient.NO_FO=g;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:f.className="geDisableMathJax";return f}}x=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(x=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());b.open(null,null,k,!0);null!=x&&(d.stylesheet=x,d.refresh())}else{y=c.background;if(null==y||""==y||y==mxConstants.NONE)y="#ffffff";b.backgroundColor=y;b.autoOrigin=C;
-b.appendGraph(c,m,x,A,k,!0)}g&&(c.useCssTransforms=g,c.currentTranslate=f,c.currentScale=n,c.view.translate=q,c.view.scale=t);return b}var e=parseInt(H.value)/100;isNaN(e)&&(e=1,H.value="100 %");var e=.75*e,k=x.value,g=y.value,f=!t.checked,q=null;f&&(f=k==n&&g==n);if(!f&&null!=a.pages&&a.pages.length){var l=0,f=a.pages.length-1;t.checked||(l=parseInt(k)-1,f=parseInt(g)-1);for(var A=l;A<=f;A++){var m=a.pages[A],k=m==a.currentPage?d:null;if(null==k){var k=a.createTemporaryGraph(d.getStylesheet()),g=
-!0,l=!1,C=null,z=null;null==m.viewState&&null==m.root&&a.updatePageRoot(m);null!=m.viewState&&(g=m.viewState.pageVisible,l=m.viewState.mathEnabled,C=m.viewState.background,z=m.viewState.backgroundImage);k.background=C;k.backgroundImage=null!=z?new mxImage(z.src,z.width,z.height):null;k.pageVisible=g;k.mathEnabled=l;var D=k.getGlobalVariable;k.getGlobalVariable=function(c){return"page"==c?m.getName():"pagenumber"==c?A+1:"pagecount"==c?null!=a.pages?a.pages.length:1:D.apply(this,arguments)};document.body.appendChild(k.container);
-a.updatePageRoot(m);k.model.setRoot(m.root)}q=b(k,q,A!=f);k!=d&&k.container.parentNode.removeChild(k.container)}}else q=b(d);null==q?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(q.mathEnabled&&(f=q.wnd.document,f.writeln('<script type="text/x-mathjax-config">'),f.writeln("MathJax.Hub.Config({"),f.writeln("showMathMenu: false,"),f.writeln('messageStyle: "none",'),f.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),f.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),
-f.writeln('"HTML-CSS": {'),f.writeln("imageFont: null"),f.writeln("},"),f.writeln("TeX: {"),f.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),f.writeln("},"),f.writeln("tex2jax: {"),f.writeln('\tignoreClass: "geDisableMathJax"'),f.writeln("},"),f.writeln("asciimath2jax: {"),f.writeln('\tignoreClass: "geDisableMathJax"'),f.writeln("}"),f.writeln("});"),c&&(f.writeln("MathJax.Hub.Queue(function () {"),f.writeln("window.print();"),f.writeln("});")),f.writeln("\x3c/script>"),
-f.writeln('<script type="text/javascript" src="'+DRAW_MATH_URL+'/MathJax.js">\x3c/script>')),q.closeDocument(),!q.mathEnabled&&c&&PrintDialog.printPreview(q))}var d=a.editor.graph,k=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,c||mxResources.get("print"));k.appendChild(g);var f=1,n=1,q=document.createElement("div");q.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";
-var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","all");t.setAttribute("type","radio");t.setAttribute("name","pages-printdialog");q.appendChild(t);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));q.appendChild(g);mxUtils.br(q);var l=t.cloneNode(!0);t.setAttribute("checked","checked");l.setAttribute("value","range");q.appendChild(l);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+
-":");q.appendChild(g);var x=document.createElement("input");x.style.cssText="margin:0 8px 0 8px;";x.setAttribute("value","1");x.setAttribute("type","number");x.setAttribute("min","1");x.style.width="50px";q.appendChild(x);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));q.appendChild(g);var y=x.cloneNode(!0);q.appendChild(y);mxEvent.addListener(x,"focus",function(){l.checked=!0});mxEvent.addListener(y,"focus",function(){l.checked=!0});mxEvent.addListener(x,"change",b);mxEvent.addListener(y,
-"change",b);if(null!=a.pages&&(f=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){n=g+1;x.value=n;y.value=n;break}x.setAttribute("max",f);y.setAttribute("max",f);1<f&&k.appendChild(q);var A=document.createElement("div");A.style.marginBottom="10px";var m=document.createElement("input");m.style.marginRight="8px";m.setAttribute("value","adjust");m.setAttribute("type","radio");m.setAttribute("name","printZoom");A.appendChild(m);g=document.createElement("span");
-mxUtils.write(g,mxResources.get("adjustTo"));A.appendChild(g);var p=document.createElement("input");p.style.cssText="margin:0 8px 0 8px;";p.setAttribute("value","100 %");p.style.width="50px";A.appendChild(p);mxEvent.addListener(p,"focus",function(){m.checked=!0});k.appendChild(A);var q=q.cloneNode(!1),E=m.cloneNode(!0);E.setAttribute("value","fit");m.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";
-g.appendChild(E);q.appendChild(g);A=document.createElement("table");A.style.display="inline-block";var z=document.createElement("tbody"),D=document.createElement("tr"),F=D.cloneNode(!0),u=document.createElement("td"),v=u.cloneNode(!0),B=u.cloneNode(!0),L=u.cloneNode(!0),ja=u.cloneNode(!0),R=u.cloneNode(!0);u.style.textAlign="right";L.style.textAlign="right";mxUtils.write(u,mxResources.get("fitTo"));var U=document.createElement("input");U.style.cssText="margin:0 8px 0 8px;";U.setAttribute("value",
-"1");U.setAttribute("min","1");U.setAttribute("type","number");U.style.width="40px";v.appendChild(U);g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsAcross"));B.appendChild(g);mxUtils.write(L,mxResources.get("fitToBy"));var ga=U.cloneNode(!0);ja.appendChild(ga);mxEvent.addListener(U,"focus",function(){E.checked=!0});mxEvent.addListener(ga,"focus",function(){E.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));R.appendChild(g);
-D.appendChild(u);D.appendChild(v);D.appendChild(B);F.appendChild(L);F.appendChild(ja);F.appendChild(R);z.appendChild(D);z.appendChild(F);A.appendChild(z);q.appendChild(A);k.appendChild(q);q=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));q.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var ta=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||
-mxConstants.PAGE_FORMAT_A4_PORTRAIT);q.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));q.appendChild(g);var H=document.createElement("input");H.style.cssText="margin:0 8px 0 8px;";H.setAttribute("value","100 %");H.style.width="60px";q.appendChild(H);k.appendChild(q);g=document.createElement("div");g.style.cssText="text-align:right;margin:48px 0 0 0;";q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});q.className="geBtn";a.editor.cancelFirst&&
-g.appendChild(q);a.isOffline()||(A=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),A.className="geBtn",g.appendChild(A));PrintDialog.previewEnabled&&(A=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();e(!1)}),A.className="geBtn",g.appendChild(A));A=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();e(!0)});A.className="geBtn gePrimaryBtn";g.appendChild(A);
-a.editor.cancelFirst||g.appendChild(q);k.appendChild(g);this.container=k};var y=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=
-this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(y.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 E=
-document.createElement("canvas"),D=new Image;D.onload=function(){try{E.getContext("2d").drawImage(D,0,0);var a=E.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(L){}};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(z){}})();
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,f,d){d.ui=a.ui;return f};a.afterDecode=function(a,f,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";
-EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":"https://rt.draw.io/cache";Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.logError=function(a,b,d,f,n){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,
-d,f,n);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var c=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";n=null!=n?n:Error(a);(new Image).src=e+"/log?severity="+c+"&v="+encodeURIComponent(EditorUi.VERSION)+
-"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(d)+(null!=f?":colno:"+encodeURIComponent(f):"")+(null!=n&&null!=n.stack?"&stack="+encodeURIComponent(n.stack):"")}}catch(A){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);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!=
-a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(k){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(k){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=
-[(new Date).toISOString()],b=0;b<arguments.length;b++)a.push(arguments[b]);console.log.apply(console,a)}}catch(k){}};EditorUi.parsePng=function(a,b,d){function c(a,c){var b=k;k+=c;return a.substring(b,k)}function e(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var k=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(c(a,4),"IHDR"!=c(a,4))null!=d&&d();else{c(a,17);do{d=e(a);var f=c(a,4);if(null!=b&&
-b(k-8,f,d))break;value=c(a,d);c(a,4);if("IEND"==f)break}while(d)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle=
-"shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";EditorUi.prototype.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"/>');
+[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};var E=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,f,d,e,g,l,n,t){if(null!=b&&null==mxMarker.markers[b]){var q=
+this.getPackageForType(b);null!=q&&mxStencilRegistry.getStencil(q)}return E.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){A.value=Math.max(1,Math.min(l,Math.max(parseInt(A.value),parseInt(y.value))));y.value=Math.max(1,Math.min(l,Math.min(parseInt(A.value),parseInt(y.value))))}function f(c){function b(c,b,e){var g=c.useCssTransforms,l=c.currentTranslate,n=c.currentScale,t=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 k=c.getGraphBounds(),y=0,A=0,z=ta.get(),m=1/c.pageScale,p=G.checked;if(p)var m=parseInt(Q.value),C=parseInt(ea.value),m=Math.min(z.height*C/(k.height/c.view.scale),z.width*m/(k.width/c.view.scale));else m=parseInt(v.value)/(100*c.pageScale),isNaN(m)&&(f=1/c.pageScale,v.value="100 %");z=mxRectangle.fromRectangle(z);z.width=Math.ceil(z.width*f);z.height=Math.ceil(z.height*f);m*=f;!p&&c.pageVisible?(k=c.getPageLayout(),
+y-=k.x*z.width,A-=k.y*z.height):p=!0;if(null==b){b=PrintDialog.createPrintPreview(c,m,z,0,y,A,p);b.pageSelector=!1;b.mathEnabled=!1;y=a.getCurrentFile();null!=y&&(b.title=y.getTitle());var D=b.writeHead;b.writeHead=function(c){D.apply(this,arguments);null!=a.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),c.writeln("</style>"))};if("undefined"!==typeof MathJax){var E=b.renderPage;b.renderPage=function(a,c,b,f,d,e){var g=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&
+!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var l=E.apply(this,arguments);mxClient.NO_FO=g;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:l.className="geDisableMathJax";return l}}y=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(y=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());b.open(null,null,e,!0);null!=y&&(d.stylesheet=y,d.refresh())}else{z=c.background;if(null==z||""==z||z==mxConstants.NONE)z="#ffffff";b.backgroundColor=z;b.autoOrigin=p;
+b.appendGraph(c,m,y,A,e,!0)}g&&(c.useCssTransforms=g,c.currentTranslate=l,c.currentScale=n,c.view.translate=t,c.view.scale=q);return b}var f=parseInt(I.value)/100;isNaN(f)&&(f=1,I.value="100 %");var f=.75*f,e=y.value,g=A.value,l=!q.checked,t=null;l&&(l=e==n&&g==n);if(!l&&null!=a.pages&&a.pages.length){var k=0,l=a.pages.length-1;q.checked||(k=parseInt(e)-1,l=parseInt(g)-1);for(var z=k;z<=l;z++){var m=a.pages[z],e=m==a.currentPage?d:null;if(null==e){var e=a.createTemporaryGraph(d.getStylesheet()),g=
+!0,k=!1,p=null,C=null;null==m.viewState&&null==m.root&&a.updatePageRoot(m);null!=m.viewState&&(g=m.viewState.pageVisible,k=m.viewState.mathEnabled,p=m.viewState.background,C=m.viewState.backgroundImage);e.background=p;e.backgroundImage=null!=C?new mxImage(C.src,C.width,C.height):null;e.pageVisible=g;e.mathEnabled=k;var D=e.getGlobalVariable;e.getGlobalVariable=function(c){return"page"==c?m.getName():"pagenumber"==c?z+1:"pagecount"==c?null!=a.pages?a.pages.length:1:D.apply(this,arguments)};document.body.appendChild(e.container);
+a.updatePageRoot(m);e.model.setRoot(m.root)}t=b(e,t,z!=l);e!=d&&e.container.parentNode.removeChild(e.container)}}else t=b(d);null==t?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(t.mathEnabled&&(l=t.wnd.document,l.writeln('<script type="text/x-mathjax-config">'),l.writeln("MathJax.Hub.Config({"),l.writeln("showMathMenu: false,"),l.writeln('messageStyle: "none",'),l.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),l.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),
+l.writeln('"HTML-CSS": {'),l.writeln("imageFont: null"),l.writeln("},"),l.writeln("TeX: {"),l.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),l.writeln("},"),l.writeln("tex2jax: {"),l.writeln('\tignoreClass: "geDisableMathJax"'),l.writeln("},"),l.writeln("asciimath2jax: {"),l.writeln('\tignoreClass: "geDisableMathJax"'),l.writeln("}"),l.writeln("});"),c&&(l.writeln("MathJax.Hub.Queue(function () {"),l.writeln("window.print();"),l.writeln("});")),l.writeln("\x3c/script>"),
+l.writeln('<script type="text/javascript" src="'+DRAW_MATH_URL+'/MathJax.js">\x3c/script>')),t.closeDocument(),!t.mathEnabled&&c&&PrintDialog.printPreview(t))}var d=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,c||mxResources.get("print"));e.appendChild(g);var l=1,n=1,t=document.createElement("div");t.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");t.appendChild(q);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));t.appendChild(g);mxUtils.br(t);var k=q.cloneNode(!0);q.setAttribute("checked","checked");k.setAttribute("value","range");t.appendChild(k);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+
+":");t.appendChild(g);var y=document.createElement("input");y.style.cssText="margin:0 8px 0 8px;";y.setAttribute("value","1");y.setAttribute("type","number");y.setAttribute("min","1");y.style.width="50px";t.appendChild(y);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));t.appendChild(g);var A=y.cloneNode(!0);t.appendChild(A);mxEvent.addListener(y,"focus",function(){k.checked=!0});mxEvent.addListener(A,"focus",function(){k.checked=!0});mxEvent.addListener(y,"change",b);mxEvent.addListener(A,
+"change",b);if(null!=a.pages&&(l=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){n=g+1;y.value=n;A.value=n;break}y.setAttribute("max",l);A.setAttribute("max",l);1<l&&e.appendChild(t);var z=document.createElement("div");z.style.marginBottom="10px";var m=document.createElement("input");m.style.marginRight="8px";m.setAttribute("value","adjust");m.setAttribute("type","radio");m.setAttribute("name","printZoom");z.appendChild(m);g=document.createElement("span");
+mxUtils.write(g,mxResources.get("adjustTo"));z.appendChild(g);var v=document.createElement("input");v.style.cssText="margin:0 8px 0 8px;";v.setAttribute("value","100 %");v.style.width="50px";z.appendChild(v);mxEvent.addListener(v,"focus",function(){m.checked=!0});e.appendChild(z);var t=t.cloneNode(!1),G=m.cloneNode(!0);G.setAttribute("value","fit");m.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";
+g.appendChild(G);t.appendChild(g);z=document.createElement("table");z.style.display="inline-block";var p=document.createElement("tbody"),D=document.createElement("tr"),E=D.cloneNode(!0),u=document.createElement("td"),x=u.cloneNode(!0),H=u.cloneNode(!0),B=u.cloneNode(!0),ja=u.cloneNode(!0),R=u.cloneNode(!0);u.style.textAlign="right";B.style.textAlign="right";mxUtils.write(u,mxResources.get("fitTo"));var Q=document.createElement("input");Q.style.cssText="margin:0 8px 0 8px;";Q.setAttribute("value",
+"1");Q.setAttribute("min","1");Q.setAttribute("type","number");Q.style.width="40px";x.appendChild(Q);g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsAcross"));H.appendChild(g);mxUtils.write(B,mxResources.get("fitToBy"));var ea=Q.cloneNode(!0);ja.appendChild(ea);mxEvent.addListener(Q,"focus",function(){G.checked=!0});mxEvent.addListener(ea,"focus",function(){G.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));R.appendChild(g);
+D.appendChild(u);D.appendChild(x);D.appendChild(H);E.appendChild(B);E.appendChild(ja);E.appendChild(R);p.appendChild(D);p.appendChild(E);z.appendChild(p);t.appendChild(z);e.appendChild(t);t=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));t.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var ta=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||
+mxConstants.PAGE_FORMAT_A4_PORTRAIT);t.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));t.appendChild(g);var I=document.createElement("input");I.style.cssText="margin:0 8px 0 8px;";I.setAttribute("value","100 %");I.style.width="60px";t.appendChild(I);e.appendChild(t);g=document.createElement("div");g.style.cssText="text-align:right;margin:48px 0 0 0;";t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&
+g.appendChild(t);a.isOffline()||(z=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),z.className="geBtn",g.appendChild(z));PrintDialog.previewEnabled&&(z=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),z.className="geBtn",g.appendChild(z));z=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});z.className="geBtn gePrimaryBtn";g.appendChild(z);
+a.editor.cancelFirst||g.appendChild(t);e.appendChild(g);this.container=e};var z=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=
+this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(z.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var G=
+document.createElement("canvas"),D=new Image;D.onload=function(){try{G.getContext("2d").drawImage(D,0,0);var a=G.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(H){}};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(v){}})();
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";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.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.logError=
+function(a,b,d,e,n){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,d,e,n);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var c=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";
+n=null!=n?n:Error(a);(new Image).src=f+"/log?severity="+c+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(d)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=n&&null!=n.stack?"&stack="+encodeURIComponent(n.stack):"")}}catch(A){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);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!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(g){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(g){}};
+EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)a.push(arguments[b]);console.log.apply(console,a)}}catch(g){}};EditorUi.parsePng=function(a,b,d){function c(a,c){var b=e;e+=c;return a.substring(b,e)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var e=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(c(a,
+4),"IHDR"!=c(a,4))null!=d&&d();else{c(a,17);do{d=f(a);var g=c(a,4);if(null!=b&&b(e-8,g,d))break;value=c(a,d);c(a,4);if("IEND"==g)break}while(d)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;
+EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";EditorUi.prototype.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');
EditorUi.prototype.crossOriginImages=!mxClient.IS_IE;EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
-!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(n){}try{var b=document.createElement("canvas"),d=new Image;d.onload=function(){try{b.getContext("2d").drawImage(d,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(g){}};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(n){}try{b=
-document.createElement("canvas");b.width=b.height=1;var f=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==f.match("image/jpeg")}catch(n){}})();EditorUi.prototype.openLink=function(a,b,d){return this.editor.graph.openLink(a,b,d)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,d){localStorage.setItem(a,b);null!=d&&d()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);
+!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(n){}try{var b=document.createElement("canvas"),d=new Image;d.onload=function(){try{b.getContext("2d").drawImage(d,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(l){}};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(n){}try{b=
+document.createElement("canvas");b.width=b.height=1;var e=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(n){}})();EditorUi.prototype.openLink=function(a,b,d){return this.editor.graph.openLink(a,b,d)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,d){localStorage.setItem(a,b);null!=d&&d()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);
b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(a){return this.isOfflineApp()||
-!navigator.onLine||!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,d){d=null!=d?d:24;var c=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),e=c.spin;c.spin=function(d,k){var g=!1;this.active||(e.call(this,d),this.active=!0,null!=k&&(g=document.createElement("div"),g.style.position="absolute",g.style.whiteSpace="nowrap",g.style.background="#4B4243",
-g.style.color="white",g.style.fontFamily="Helvetica, Arial",g.style.fontSize="9pt",g.style.padding="6px",g.style.paddingLeft="10px",g.style.paddingRight="10px",g.style.zIndex=2E9,g.style.left=Math.max(0,a)+"px",g.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(g.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=k.substring(k.length-3,k.length)&&"!"!=
-k.charAt(k.length-1)&&(k+="..."),g.innerHTML=k,d.appendChild(g),c.status=g,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(g.style.left=Math.round(Math.max(0,a-g.offsetWidth/2))+"px",g.style.top=Math.round(Math.max(0,b+70-g.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,k)}));this.stop();return a}),g=!0);return g};var k=c.stop;c.stop=function(){k.call(this);this.active=!1;null!=
-c.status&&(c.status.parentNode.removeChild(c.status),c.status=null)};c.pause=function(){return function(){}};return c};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(q){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&
+!navigator.onLine||!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,d){d=null!=d?d:24;var c=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=c.spin;c.spin=function(d,e){var g=!1;this.active||(f.call(this,d),this.active=!0,null!=e&&(g=document.createElement("div"),g.style.position="absolute",g.style.whiteSpace="nowrap",g.style.background="#4B4243",
+g.style.color="white",g.style.fontFamily="Helvetica, Arial",g.style.fontSize="9pt",g.style.padding="6px",g.style.paddingLeft="10px",g.style.paddingRight="10px",g.style.zIndex=2E9,g.style.left=Math.max(0,a)+"px",g.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(g.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=e.substring(e.length-3,e.length)&&"!"!=
+e.charAt(e.length-1)&&(e+="..."),g.innerHTML=e,d.appendChild(g),c.status=g,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(g.style.left=Math.round(Math.max(0,a-g.offsetWidth/2))+"px",g.style.top=Math.round(Math.max(0,b+70-g.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,e)}));this.stop();return a}),g=!0);return g};var e=c.stop;c.stop=function(){e.call(this);this.active=!1;null!=
+c.status&&(c.status.parentNode.removeChild(c.status),c.status=null)};c.pause=function(){return function(){}};return c};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(t){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&
177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3)};EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;
-EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var d=c.indexOf("&lt;mxfile ");if(0<=d){var f=c.lastIndexOf("&lt;/mxfile&gt;");f>d&&(b=c.substring(d,f+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var n=mxUtils.parseXml(c),g=this.editor.extractGraphModel(n.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=g?mxUtils.getXml(g):""}catch(x){}return b};EditorUi.prototype.validateFileData=
+EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var d=c.indexOf("&lt;mxfile ");if(0<=d){var e=c.lastIndexOf("&lt;/mxfile&gt;");e>d&&(b=c.substring(d,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var n=mxUtils.parseXml(c),l=this.editor.extractGraphModel(n.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=l?mxUtils.getXml(l):""}catch(y){}return b};EditorUi.prototype.validateFileData=
function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");
-if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var f=d.length-1;0<=f;f--){var g=this.updatePageRoot(new DiagramPage(d[f]));null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[f+1]));c.model.execute(new ChangePage(this,g,0==f?g:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),
-this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(f=0;f<b.length;f++)c.model.execute(new ChangePage(this,b[f],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,f,n,g,l,A,t,m,y){b=null!=b?b:this.editor.graph;n=null!=n?n:!1;t=null!=t?t:!0;var c,e=null;null==
-d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":e=c=f;if(null==a)return"";var k=a;if("mxfile"!=k.nodeName.toLowerCase()){if(y){var q=a.ownerDocument.createElement("diagram");q.setAttribute("id",Editor.guid());q.appendChild(a)}else{q=Graph.zapGremlins(mxUtils.getXml(a));k=Graph.compress(q);if(Graph.decompress(k)!=q)return q;q=a.ownerDocument.createElement("diagram");q.setAttribute("id",Editor.guid());mxUtils.setTextContent(q,k)}k=a.ownerDocument.createElement("mxfile");k.appendChild(q)}m?
-(k=k.cloneNode(!0),k.removeAttribute("modified"),k.removeAttribute("host"),k.removeAttribute("agent"),k.removeAttribute("etag"),k.removeAttribute("userAgent"),k.removeAttribute("version"),k.removeAttribute("editor"),k.removeAttribute("type")):(k.removeAttribute("userAgent"),k.removeAttribute("version"),k.removeAttribute("editor"),k.removeAttribute("pages"),k.removeAttribute("type"),mxClient.IS_CHROMEAPP?k.setAttribute("host","Chrome"):EditorUi.isElectronApp?k.setAttribute("host","Electron"):k.setAttribute("host",
-window.location.hostname),k.setAttribute("modified",(new Date).toISOString()),k.setAttribute("agent",navigator.userAgent),k.setAttribute("version",EditorUi.VERSION),k.setAttribute("etag",Editor.guid()),a=null!=d?d.getMode():this.mode,null!=a&&k.setAttribute("type",a),null!=this.pages&&k.setAttribute("pages",this.pages.length));y=y?mxUtils.getPrettyXml(k):mxUtils.getXml(k);if(!g&&!n&&(l||null!=d&&/(\.html)$/i.test(d.getTitle())))y=this.getHtml2(mxUtils.getXml(k),b,null!=d?d.getTitle():null,c,e);else if(g||
-!n&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(f=null),y=this.getEmbeddedSvg(y,b,f,null,A,t,e);return y};EditorUi.prototype.getXmlFileData=function(a,b,d){a=null!=a?a:!0;b=null!=b?b:!1;d=null!=d?d:!Editor.compressXml;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&d?(b=mxUtils.trim(mxUtils.getTextContent(a)),
-a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):null==b||d?a=a.cloneNode(!0):(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));c.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(c)),c=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var e=
-(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,e);EditorUi.removeChildNodes(this.pages[b].node);mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(e));delete this.pages[b].needsUpdate}a(this.pages[b].node)}return c};EditorUi.prototype.anonymizeString=function(a,b){for(var c=[],e=0;e<a.length;e++){var d=a.charAt(e);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?c.push(d):isNaN(parseInt(d))?d.toLowerCase()!=
+if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var l=this.updatePageRoot(new DiagramPage(d[e]));null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,l,0==e?l:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),
+this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)c.model.execute(new ChangePage(this,b[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,e,n,l,k,A,q,m,z){b=null!=b?b:this.editor.graph;n=null!=n?n:!1;q=null!=q?q:!0;var c,f=null;null==
+d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){if(z){var t=a.ownerDocument.createElement("diagram");t.setAttribute("id",Editor.guid());t.appendChild(a)}else{t=Graph.zapGremlins(mxUtils.getXml(a));g=Graph.compress(t);if(Graph.decompress(g)!=t)return t;t=a.ownerDocument.createElement("diagram");t.setAttribute("id",Editor.guid());mxUtils.setTextContent(t,g)}g=a.ownerDocument.createElement("mxfile");g.appendChild(t)}m?
+(g=g.cloneNode(!0),g.removeAttribute("modified"),g.removeAttribute("host"),g.removeAttribute("agent"),g.removeAttribute("etag"),g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type")):(g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("pages"),g.removeAttribute("type"),mxClient.IS_CHROMEAPP?g.setAttribute("host","Chrome"):EditorUi.isElectronApp?g.setAttribute("host","Electron"):g.setAttribute("host",
+window.location.hostname),g.setAttribute("modified",(new Date).toISOString()),g.setAttribute("agent",navigator.userAgent),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("etag",Editor.guid()),a=null!=d?d.getMode():this.mode,null!=a&&g.setAttribute("type",a),null!=this.pages&&g.setAttribute("pages",this.pages.length));z=z?mxUtils.getPrettyXml(g):mxUtils.getXml(g);if(!l&&!n&&(k||null!=d&&/(\.html)$/i.test(d.getTitle())))z=this.getHtml2(mxUtils.getXml(g),b,null!=d?d.getTitle():null,c,f);else if(l||
+!n&&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,b,e,null,A,q,f);return z};EditorUi.prototype.getXmlFileData=function(a,b,d){a=null!=a?a:!0;b=null!=b?b:!1;d=null!=d?d:!Editor.compressXml;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&d?(b=mxUtils.trim(mxUtils.getTextContent(a)),
+a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):null==b||d?a=a.cloneNode(!0):(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));c.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(c)),c=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var f=
+(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,f);EditorUi.removeChildNodes(this.pages[b].node);mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(f));delete this.pages[b].needsUpdate}a(this.pages[b].node)}return c};EditorUi.prototype.anonymizeString=function(a,b){for(var c=[],f=0;f<a.length;f++){var d=a.charAt(f);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?c.push(d):isNaN(parseInt(d))?d.toLowerCase()!=
d?c.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(d)?c.push(" "):c.push("?"):c.push(b?"0":Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var c=0;c<a[EditorUi.DIFF_INSERT].length;c++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][c].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name",
-this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][c].data=mxUtils.getXml(b)}catch(g){a[EditorUi.DIFF_INSERT][c].data=g.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var f=a[EditorUi.DIFF_UPDATE][d];null!=f.name&&(f.name=this.anonymizeString(f.name));null!=f.cells&&(c=mxUtils.bind(this,function(a){var c=f.cells[a];if(null!=c){for(var b in c)null!=c[b].value&&(c[b].value="["+c[b].value.length+"]"),null!=c[b].xmlValue&&(c[b].xmlValue="["+c[b].xmlValue.length+
-"]"),null!=c[b].style&&(c[b].style="["+c[b].style.length+"]"),0==Object.keys(c[b]).length&&delete c[b];0==Object.keys(c).length&&delete f.cells[a]}}),c(EditorUi.DIFF_INSERT),c(EditorUi.DIFF_UPDATE),0==Object.keys(f.cells).length&&delete f.cells);0==Object.keys(f).length&&delete a[EditorUi.DIFF_UPDATE][d]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var c=0;c<a.attributes.length;c++)"as"!=
-a.attributes[c].name&&a.setAttribute(a.attributes[c].name,this.anonymizeString(a.attributes[c].value,b));if(null!=a.childNodes)for(c=0;c<a.childNodes.length;c++)this.anonymizeAttributes(a.childNodes[c],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var c=a.getElementsByTagName("mxCell"),e=0;e<c.length;e++)null!=c[e].getAttribute("value")&&c[e].setAttribute("value","["+c[e].getAttribute("value").length+"]"),null!=c[e].getAttribute("xmlValue")&&c[e].setAttribute("xmlValue","["+c[e].getAttribute("xmlValue").length+
-"]"),null!=c[e].getAttribute("style")&&c[e].setAttribute("style","["+c[e].getAttribute("style").length+"]"),null!=c[e].parentNode&&"root"!=c[e].parentNode.nodeName&&null!=c[e].parentNode.parentNode&&(c[e].setAttribute("id",c[e].parentNode.getAttribute("id")),c[e].parentNode.parentNode.replaceChild(c[e],c[e].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var c=this.getCurrentFile();null!=c&&(c.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&c.invalidChecksum?
-c.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(c.clearAutosave(),this.editor.setStatus(""),a?c.reloadFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)})):c.synchronizeFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,d,f,n,g,l,
-A,t,m){n=null!=n?n:!0;g=null!=g?g:!1;var c=this.editor.graph;if(b||!a&&null!=t&&/(\.svg)$/i.test(t.getTitle()))if(m=!1,null!=this.pages&&this.currentPage!=this.pages[0]){var e=c.getGlobalVariable,c=this.createTemporaryGraph(c.getStylesheet()),k=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(k.root)}l=null!=l?l:this.getXmlFileData(n,g,m);t=null!=t?t:this.getCurrentFile();a=this.createFileData(l,
-c,t,window.location.href,a,b,d,f,n,A,m);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);return a};EditorUi.prototype.getHtml=function(a,b,d,f,n,g){g=null!=g?g:!0;var c=null,e=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var c=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),k=b.view.scale;g=Math.floor(c.x/k-b.view.translate.x);k=Math.floor(c.y/k-b.view.translate.y);c=b.background;null==n&&(b=this.getBasenames().join(";"),0<b.length&&(e=EditorUi.drawHost+
-"/embed.js?s="+b));a.setAttribute("x0",g);a.setAttribute("y0",k)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=f&&a.setAttribute("edit",f));null!=n&&(n=n.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";f=Graph.compress(a);Graph.decompress(f)!=a&&(f=encodeURIComponent(a));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
-"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\n":"")+"</head>\n<body"+(null==n&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+f+
-"</div>\n</div>\n"+(null==n?'<script type="text/javascript" src="'+e+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,d,f,n){b=EditorUi.drawHost+"/js/viewer.min.js";null!=n&&(n=n.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a),
+this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][c].data=mxUtils.getXml(b)}catch(l){a[EditorUi.DIFF_INSERT][c].data=l.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var e=a[EditorUi.DIFF_UPDATE][d];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(c=mxUtils.bind(this,function(a){var c=e.cells[a];if(null!=c){for(var b in c)null!=c[b].value&&(c[b].value="["+c[b].value.length+"]"),null!=c[b].xmlValue&&(c[b].xmlValue="["+c[b].xmlValue.length+
+"]"),null!=c[b].style&&(c[b].style="["+c[b].style.length+"]"),0==Object.keys(c[b]).length&&delete c[b];0==Object.keys(c).length&&delete e.cells[a]}}),c(EditorUi.DIFF_INSERT),c(EditorUi.DIFF_UPDATE),0==Object.keys(e.cells).length&&delete e.cells);0==Object.keys(e).length&&delete a[EditorUi.DIFF_UPDATE][d]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var c=0;c<a.attributes.length;c++)"as"!=
+a.attributes[c].name&&a.setAttribute(a.attributes[c].name,this.anonymizeString(a.attributes[c].value,b));if(null!=a.childNodes)for(c=0;c<a.childNodes.length;c++)this.anonymizeAttributes(a.childNodes[c],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var c=a.getElementsByTagName("mxCell"),f=0;f<c.length;f++)null!=c[f].getAttribute("value")&&c[f].setAttribute("value","["+c[f].getAttribute("value").length+"]"),null!=c[f].getAttribute("xmlValue")&&c[f].setAttribute("xmlValue","["+c[f].getAttribute("xmlValue").length+
+"]"),null!=c[f].getAttribute("style")&&c[f].setAttribute("style","["+c[f].getAttribute("style").length+"]"),null!=c[f].parentNode&&"root"!=c[f].parentNode.nodeName&&null!=c[f].parentNode.parentNode&&(c[f].setAttribute("id",c[f].parentNode.getAttribute("id")),c[f].parentNode.parentNode.replaceChild(c[f],c[f].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var c=this.getCurrentFile();null!=c&&(c.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&c.invalidChecksum?
+c.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(c.clearAutosave(),this.editor.setStatus(""),a?c.reloadFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)})):c.synchronizeFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,d,e,n,l,k,
+A,q,m){n=null!=n?n:!0;l=null!=l?l:!1;var c=this.editor.graph;if(b||!a&&null!=q&&/(\.svg)$/i.test(q.getTitle()))if(m=!1,null!=this.pages&&this.currentPage!=this.pages[0]){var f=c.getGlobalVariable,c=this.createTemporaryGraph(c.getStylesheet()),g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(g.root)}k=null!=k?k:this.getXmlFileData(n,l,m);q=null!=q?q:this.getCurrentFile();a=this.createFileData(k,
+c,q,window.location.href,a,b,d,e,n,A,m);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);return a};EditorUi.prototype.getHtml=function(a,b,d,e,n,l){l=null!=l?l:!0;var c=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var c=l?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;l=Math.floor(c.x/g-b.view.translate.x);g=Math.floor(c.y/g-b.view.translate.y);c=b.background;null==n&&(b=this.getBasenames().join(";"),0<b.length&&(f=EditorUi.drawHost+
+"/embed.js?s="+b));a.setAttribute("x0",l);a.setAttribute("y0",g)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=n&&(n=n.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";e=Graph.compress(a);Graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
+"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\n":"")+"</head>\n<body"+(null==n&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+
+"</div>\n</div>\n"+(null==n?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,d,e,n){b=EditorUi.drawHost+"/js/viewer.min.js";null!=n&&(n=n.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a),
toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\n":
"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==n?'<script type="text/javascript" src="'+b+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=
this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=Editor.extractParserError(a,mxResources.get("invalidOrMissingFile"));if(c)throw Error(c);c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a&&"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name"))){var b=null;this.fileNode=a;this.pages=[];for(var d=0;d<c.length;d++)null==
c[d].getAttribute("id")&&c[d].setAttribute("id",d),a=new DiagramPage(c[d]),null==a.getName()&&a.setName(mxResources.get("pageWithNumber",[d+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==urlParams["page-id"]&&(b=a);this.currentPage=null!=b?b:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),
-this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var f=urlParams["layer-ids"].split(" ");a={};for(d=0;d<f.length;d++)a[f[d]]=!0;for(var g=this.editor.graph.getModel(),l=g.getChildren(g.root),d=0;d<l.length;d++){var A=l[d];g.setVisible(A,a[A.id]||!1)}}catch(t){}};EditorUi.prototype.getBaseFilename=function(a){var c=
-this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(c)||/(\.html)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.png)$/i.test(c)||/(\.drawio)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(a,b,d,f,n,g,l,A,t,m){try{f=
-null!=f?f:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!n),e=c+"."+a;if("xml"==a){var k='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,f,n,null,null,null,b);this.saveData(e,a,k,"text/xml")}else if("html"==a)k=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(e,a,k,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?e=c+".png":"jpeg"==a&&(e=c+".jpg"),this.saveRequest(e,
-a,mxUtils.bind(this,function(c,b){try{var e=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var d=this.createDownloadRequest(c,a,f,b,l,n,A,t,m);this.editor.graph.pageVisible=e;return d}catch(T){this.handleError(T)}}));else{var q=null,x=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(e,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(q)}))});if("svg"==
-a){var p=this.editor.graph.background;if(l||p==mxConstants.NONE)p=null;var F=this.editor.graph.getSvg(p,null,null,null,null,f);d&&this.editor.graph.addSvgShadow(F);this.convertImages(F,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();x('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else e=c+".svg",q=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();
-x(a)}),f)}}catch(S){this.handleError(S)}};EditorUi.prototype.createDownloadRequest=function(a,b,d,f,n,g,l,A,t){var c=this.editor.graph,e=c.getGraphBounds();d=this.getFileData(!0,null,null,null,d,0==g?!1:"xmlpng"!=b);var k="",q="";if(e.width*e.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};e="0";"pdf"==b&&0==g&&(q="&allPages=1");if("xmlpng"==b&&(e="1",b="png",null!=this.pages&&null!=this.currentPage))for(g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){k=
-"&from="+g;break}g=c.background;"png"==b&&n?g=mxConstants.NONE:n||null!=g&&g!=mxConstants.NONE||(g="#ffffff");n={globalVars:c.getExportVariables()};t&&(n.grid={size:c.gridSize,steps:c.view.gridSteps,color:c.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+k+q+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+f+"&embedXml="+e+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(n))+(null!=l?"&scale="+l:"")+(null!=A?"&border="+
-A:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,d){var c=window.location.hash,e=mxUtils.bind(this,function(e){var d=null!=a.data?a.data:"";null!=e&&0<e.length&&(0<d.length&&(d+="\n"),d+=e);e=new LocalFile(this,"csv"!=a.format&&0<d.length?d:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);e.getHash=function(){return c};this.fileLoaded(e);"csv"==a.format&&this.importCsv(d,mxUtils.bind(this,
-function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var k=null!=a.interval?parseInt(a.interval):6E4,f=null,g=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){c===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),n()):this.handleError({message:mxResources.get("error")+
-" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),n=mxUtils.bind(this,function(){window.clearTimeout(f);f=window.setTimeout(g,k)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){n();g()}));n();g()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var k=a.url;/^https?:\/\//.test(k)&&!this.editor.isCorsEnabledForUrl(k)&&(k=PROXY_URL+"?url="+encodeURIComponent(k));this.loadUrl(k,mxUtils.bind(this,function(a){e(a)}),mxUtils.bind(this,function(a){null!=d&&
-d(a)}))}else e("")};EditorUi.prototype.updateDiagram=function(a){function c(a){var c=new mxCellOverlay(a.image||f.warningImage,a.tooltip,a.align,a.valign,a.offset);c.addListener(mxEvent.CLICK,function(c,b){d.alert(a.tooltip)});return c}var b=null,d=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var f=this.editor.graph,g=f.getModel();g.beginUpdate();var l=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var A=g.getCell(a.getAttribute("id"));
-if(null!=A){try{var t=a.getAttribute("value");if(null!=t){var m=mxUtils.parseXml(t).documentElement;if(null!=m)if("1"==m.getAttribute("replace-value"))g.setValue(A,m);else for(var y=m.attributes,p=0;p<y.length;p++)f.setAttributeForCell(A,y[p].nodeName,0<y[p].nodeValue.length?y[p].nodeValue:null)}}catch(K){null!=window.console&&console.log("Error in value for "+A.id+": "+K)}try{var D=a.getAttribute("style");null!=D&&f.model.setStyle(A,D)}catch(K){null!=window.console&&console.log("Error in style for "+
-A.id+": "+K)}try{var z=a.getAttribute("icon");if(null!=z){var u=0<z.length?JSON.parse(z):null;null!=u&&u.append||f.removeCellOverlays(A);null!=u&&f.addCellOverlay(A,c(u))}}catch(K){null!=window.console&&console.log("Error in icon for "+A.id+": "+K)}try{var v=a.getAttribute("geometry");if(null!=v){var v=JSON.parse(v),I=f.getCellGeometry(A);if(null!=I){I=I.clone();for(key in v){var B=parseFloat(v[key]);"dx"==key?I.x+=B:"dy"==key?I.y+=B:"dw"==key?I.width+=B:"dh"==key?I.height+=B:I[key]=parseFloat(v[key])}f.model.setGeometry(A,
-I)}}}catch(K){null!=window.console&&console.log("Error in icon for "+A.id+": "+K)}}}else if("model"==a.nodeName){for(var C=a.firstChild;null!=C&&C.nodeType!=mxConstants.NODETYPE_ELEMENT;)C=C.nextSibling;null!=C&&(new mxCodec(a.firstChild)).decode(C,g)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(f.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))f.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==
-a.nodeName&&(l=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{g.endUpdate()}null!=l&&this.chromelessResize&&this.chromelessResize(!0,l)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,e="",d=c.lastIndexOf(".");0<=d&&(e=c.substring(d),c=c.substring(0,d));if(b)var f=new Date,d=f.getFullYear(),l=f.getMonth()+1,A=f.getDate(),t=f.getHours(),m=f.getMinutes(),f=f.getSeconds(),c=
-c+(" "+(d+"-"+l+"-"+A+"-"+t+"-"+m+"-"+f));return c=mxResources.get("copyOf",[c])+e};EditorUi.prototype.fileLoaded=function(a,b){var c=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var e=!1;this.hideDialog();null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();
+this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var e=urlParams["layer-ids"].split(" ");a={};for(d=0;d<e.length;d++)a[e[d]]=!0;for(var l=this.editor.graph.getModel(),k=l.getChildren(l.root),d=0;d<k.length;d++){var A=k[d];l.setVisible(A,a[A.id]||!1)}}catch(q){}};EditorUi.prototype.getBaseFilename=function(a){var c=
+this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(c)||/(\.html)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.png)$/i.test(c)||/(\.drawio)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(a,b,d,e,n,l,k,A,q,m){try{e=
+null!=e?e:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!n),f=c+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,e,n,null,null,null,b);this.saveData(f,a,g,"text/xml")}else if("html"==a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,g,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=c+".png":"jpeg"==a&&(f=c+".jpg"),this.saveRequest(f,
+a,mxUtils.bind(this,function(c,b){try{var f=this.editor.graph.pageVisible;null!=l&&(this.editor.graph.pageVisible=l);var d=this.createDownloadRequest(c,a,e,b,k,n,A,q,m);this.editor.graph.pageVisible=f;return d}catch(P){this.handleError(P)}}));else{var t=null,y=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(t)}))});if("svg"==
+a){var p=this.editor.graph.background;if(k||p==mxConstants.NONE)p=null;var E=this.editor.graph.getSvg(p,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(E);this.convertImages(E,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();y('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else f=c+".svg",t=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();
+y(a)}),e)}}catch(S){this.handleError(S)}};EditorUi.prototype.createDownloadRequest=function(a,b,d,e,n,l,k,A,q){var c=this.editor.graph,f=c.getGraphBounds();d=this.getFileData(!0,null,null,null,d,0==l?!1:"xmlpng"!=b);var g="",t="";if(f.width*f.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};f="0";"pdf"==b&&0==l&&(t="&allPages=1");if("xmlpng"==b&&(f="1",b="png",null!=this.pages&&null!=this.currentPage))for(l=0;l<this.pages.length;l++)if(this.pages[l]==this.currentPage){g=
+"&from="+l;break}l=c.background;"png"==b&&n?l=mxConstants.NONE:n||null!=l&&l!=mxConstants.NONE||(l="#ffffff");n={globalVars:c.getExportVariables()};q&&(n.grid={size:c.gridSize,steps:c.view.gridSteps,color:c.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+g+t+"&bg="+(null!=l?l:mxConstants.NONE)+"&base64="+e+"&embedXml="+f+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(n))+(null!=k?"&scale="+k:"")+(null!=A?"&border="+
+A:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,d){var c=window.location.hash,f=mxUtils.bind(this,function(f){var d=null!=a.data?a.data:"";null!=f&&0<f.length&&(0<d.length&&(d+="\n"),d+=f);f=new LocalFile(this,"csv"!=a.format&&0<d.length?d:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);f.getHash=function(){return c};this.fileLoaded(f);"csv"==a.format&&this.importCsv(d,mxUtils.bind(this,
+function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var e=null!=a.interval?parseInt(a.interval):6E4,g=null,l=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){c===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),n()):this.handleError({message:mxResources.get("error")+
+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),n=mxUtils.bind(this,function(){window.clearTimeout(g);g=window.setTimeout(l,e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){n();l()}));n();l()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var e=a.url;/^https?:\/\//.test(e)&&!this.editor.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(e));this.loadUrl(e,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=d&&
+d(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function c(a){var c=new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign,a.offset);c.addListener(mxEvent.CLICK,function(c,b){d.alert(a.tooltip)});return c}var b=null,d=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var e=this.editor.graph,l=e.getModel();l.beginUpdate();var k=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var A=l.getCell(a.getAttribute("id"));
+if(null!=A){try{var q=a.getAttribute("value");if(null!=q){var m=mxUtils.parseXml(q).documentElement;if(null!=m)if("1"==m.getAttribute("replace-value"))l.setValue(A,m);else for(var z=m.attributes,p=0;p<z.length;p++)e.setAttributeForCell(A,z[p].nodeName,0<z[p].nodeValue.length?z[p].nodeValue:null)}}catch(K){null!=window.console&&console.log("Error in value for "+A.id+": "+K)}try{var D=a.getAttribute("style");null!=D&&e.model.setStyle(A,D)}catch(K){null!=window.console&&console.log("Error in style for "+
+A.id+": "+K)}try{var v=a.getAttribute("icon");if(null!=v){var u=0<v.length?JSON.parse(v):null;null!=u&&u.append||e.removeCellOverlays(A);null!=u&&e.addCellOverlay(A,c(u))}}catch(K){null!=window.console&&console.log("Error in icon for "+A.id+": "+K)}try{var x=a.getAttribute("geometry");if(null!=x){var x=JSON.parse(x),J=e.getCellGeometry(A);if(null!=J){J=J.clone();for(key in x){var B=parseFloat(x[key]);"dx"==key?J.x+=B:"dy"==key?J.y+=B:"dw"==key?J.width+=B:"dh"==key?J.height+=B:J[key]=parseFloat(x[key])}e.model.setGeometry(A,
+J)}}}catch(K){null!=window.console&&console.log("Error in icon for "+A.id+": "+K)}}}else if("model"==a.nodeName){for(var C=a.firstChild;null!=C&&C.nodeType!=mxConstants.NODETYPE_ELEMENT;)C=C.nextSibling;null!=C&&(new mxCodec(a.firstChild)).decode(C,l)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==
+a.nodeName&&(k=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{l.endUpdate()}null!=k&&this.chromelessResize&&this.chromelessResize(!0,k)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,f="",d=c.lastIndexOf(".");0<=d&&(f=c.substring(d),c=c.substring(0,d));if(b)var e=new Date,d=e.getFullYear(),k=e.getMonth()+1,A=e.getDate(),q=e.getHours(),m=e.getMinutes(),e=e.getSeconds(),c=
+c+(" "+(d+"-"+k+"-"+A+"-"+q+"-"+m+"-"+e));return c=mxResources.get("copyOf",[c])+f};EditorUi.prototype.fileLoaded=function(a,b){var c=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var f=!1;this.hideDialog();null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();
this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(a);a.addListener("descriptorChanged",
this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+
-mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));e=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+
-a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(x){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(x){}}catch(x){this.fileLoadedError=x;null!=window.console&&(console.error(x),console.log("error in fileLoaded:",a,x));if(EditorUi.enableLogging&&
-!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=x&&null!=x.message?":err:"+encodeURIComponent(x.message):"")+(null!=x&&null!=x.stack?"&stack="+encodeURIComponent(x.stack):"")}catch(A){}var f=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):
-null!=c?this.fileLoaded(c):d()});b?f():this.handleError(x,mxResources.get("errorLoadingFile"),f,!0)}else d();return e};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,e=new mxGraphModel,d=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var f=0;f<a.length;f++){this.updatePageRoot(a[f]);var l=a[f].node.cloneNode(!1);l.removeAttribute("name");e.root=a[f].root;var A=d.encode(e);this.editor.graph.saveViewState(a[f].viewState,A,!0);A.removeAttribute("pageWidth");
-A.removeAttribute("pageHeight");l.appendChild(A);null!=b&&(b.eltCount+=l.getElementsByTagName("*").length,b.nodeCount+=l.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(l,function(a,c,b,e){return!e||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=c&&"y"!=c&&"width"!=c&&"height"!=c?e&&"mxCell"==a.nodeName&&"previous"==c?null:b:Math.round(b)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,d){var c=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===
-typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(c^=this.hashValue(a.nodeName,b,d));if(null!=a.attributes){null!=d&&(d.attrCount+=a.attributes.length);for(var e=0;e<a.attributes.length;e++){var k=a.attributes[e].name,f=null!=b?b(a,k,a.attributes[e].value,!0):a.attributes[e].value;null!=f&&(c^=this.hashValue(k,b,d)+this.hashValue(f,b,d))}}if(null!=a.childNodes)for(e=0;e<a.childNodes.length;e++)c=(c<<5)-c+this.hashValue(a.childNodes[e],b,d)<<0}else if(null!=a&&"function"!==
-typeof a){a=String(a);b=0;null!=d&&(d.byteCount+=a.length);for(e=0;e<a.length;e++)b=(b<<5)-b+a.charCodeAt(e)<<0;c^=b}return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,f,n,g,l){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",
+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));f=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+
+a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(y){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(y){}}catch(y){this.fileLoadedError=y;null!=window.console&&(console.error(y),console.log("error in fileLoaded:",a,y));if(EditorUi.enableLogging&&
+!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=y&&null!=y.message?":err:"+encodeURIComponent(y.message):"")+(null!=y&&null!=y.stack?"&stack="+encodeURIComponent(y.stack):"")}catch(A){}var e=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):
+null!=c?this.fileLoaded(c):d()});b?e():this.handleError(y,mxResources.get("errorLoadingFile"),e,!0)}else d();return f};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,f=new mxGraphModel,d=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var e=0;e<a.length;e++){this.updatePageRoot(a[e]);var k=a[e].node.cloneNode(!1);k.removeAttribute("name");f.root=a[e].root;var A=d.encode(f);this.editor.graph.saveViewState(a[e].viewState,A,!0);A.removeAttribute("pageWidth");
+A.removeAttribute("pageHeight");k.appendChild(A);null!=b&&(b.eltCount+=k.getElementsByTagName("*").length,b.nodeCount+=k.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(k,function(a,c,b,f){return!f||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=c&&"y"!=c&&"width"!=c&&"height"!=c?f&&"mxCell"==a.nodeName&&"previous"==c?null:b:Math.round(b)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,d){var c=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===
+typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(c^=this.hashValue(a.nodeName,b,d));if(null!=a.attributes){null!=d&&(d.attrCount+=a.attributes.length);for(var f=0;f<a.attributes.length;f++){var e=a.attributes[f].name,g=null!=b?b(a,e,a.attributes[f].value,!0):a.attributes[f].value;null!=g&&(c^=this.hashValue(e,b,d)+this.hashValue(g,b,d))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)c=(c<<5)-c+this.hashValue(a.childNodes[f],b,d)<<0}else if(null!=a&&"function"!==
+typeof a){a=String(a);b=0;null!=d&&(d.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<0;c^=b}return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,e,n,l,k){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",
mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var c=mxUtils.createXmlDocument(),b=c.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));c.appendChild(b);return mxUtils.getXml(c)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),
".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var c=this.sidebar.palettes[a];if(null!=c){for(var b=0;b<c.length;b++)c[b].parentNode.removeChild(c[b]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var c=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:c.firstChild.nextSibling.nextSibling;
var b=c.lastChild,d=b.previousSibling;c.insertBefore(b,a);c.insertBefore(d,b)};EditorUi.prototype.loadLibrary=function(a){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var b=JSON.parse(mxUtils.getTextContent(c.documentElement));this.libraryLoaded(a,b,c.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,d){if(null!=
-this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var e=null,f=mxUtils.bind(this,function(c,b){0==c.length&&a.isEditable()?(null==e&&(e=document.createElement("div"),e.className="geDropTarget",mxUtils.write(e,mxResources.get("dragElementsHere"))),b.appendChild(e)):this.addLibraryEntries(c,b)});null!=this.sidebar&&
-null!=b&&this.sidebar.addEntries(b);d=null!=d&&0<d.length?d:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),d,!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(c);var l=k.parentNode.previousSibling;d=l.getAttribute("title");null!=d&&0<d.length&&".scratchpad"!=a.title&&l.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var t=document.createElement("div");t.style.position="absolute";t.style.right="0px";t.style.top="0px";t.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||
-(t.style.backgroundColor="inherit");l.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",mxResources.get("close"));m.setAttribute("valign","absmiddle");m.setAttribute("border","0");m.style.margin="0 3px";var y=null;if(".scratchpad"!=a.title||this.closableScratchpad)t.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});
-null!=y?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var p=this.editor.graph,D=null,z=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),u=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=D&&null!=D.parentNode&&D.parentNode.removeChild(D),D=m.cloneNode(!1),D.setAttribute("src",Editor.spinImage),D.setAttribute("title",
-mxResources.get("saving")),D.style.cursor="default",D.style.marginRight="2px",D.style.marginTop="-2px",t.insertBefore(D,t.firstChild),l.style.paddingRight=18*t.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=D&&null!=D.parentNode&&(D.parentNode.removeChild(D),l.style.paddingRight=18*t.childNodes.length+"px")})):null==y&&(y=m.cloneNode(!1),y.setAttribute("src",IMAGE_PATH+"/download.png"),y.setAttribute("title",mxResources.get("save")),t.insertBefore(y,t.firstChild),
-mxEvent.addListener(y,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==y||a.isModified()||(l.style.paddingRight=18*t.childNodes.length+"px",y.parentNode.removeChild(y),y=null)});mxEvent.consume(c)})),l.style.paddingRight=18*t.childNodes.length+"px")}),v=mxUtils.bind(this,function(a,c,d,f){a=p.cloneCells(mxUtils.sortCells(p.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var n=p.getCellGeometry(a[g]);null!=n&&
-n.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);u(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),I=mxUtils.bind(this,function(a){if(p.isSelectionEmpty())p.getRubberband().isActive()?(p.getRubberband().execute(a),p.getRubberband().reset()):this.showError(mxResources.get("error"),
-mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=p.getSelectionCells(),b=p.view.getBounds(c),d=p.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=p.view.translate.x;b.y-=p.view.translate.y;v(c,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){p.isMouseDown&&null!=p.panningManager&&null!=p.graphHandler.shape&&(p.graphHandler.shape.node.style.visibility="hidden",k.style.backgroundColor="#f1f3f4",k.style.cursor="copy",p.panningManager.stop(),
-p.autoScroll=!1,null!=p.graphHandler.guide&&p.graphHandler.guide.setVisible(!1),null!=p.graphHandler.hint&&(p.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){p.isMouseDown&&null!=p.panningManager&&null!=p.graphHandler&&(k.style.backgroundColor="",k.style.cursor="default",this.sidebar.showTooltips=!0,p.panningManager.stop(),p.graphHandler.reset(),p.isMouseDown=!1,p.autoScroll=!0,I(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,
-function(a){p.isMouseDown&&null!=p.graphHandler.shape&&(p.graphHandler.shape.node.style.visibility="visible",k.style.backgroundColor="",k.style.cursor="",p.autoScroll=!0,null!=p.graphHandler.guide&&p.graphHandler.guide.setVisible(!0),null!=p.graphHandler.hint&&(p.graphHandler.hint.style.visibility="visible"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){k.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();
-a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.cursor="";k.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,g,n,q,l,t,y,x){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,q,l),c)],c[0].vertex=!0,v(c,new mxRectangle(0,
-0,q,l),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null);else{var m=!1,A=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var g=mxUtils.parseXml(c);if("mxlibrary"==g.documentElement.nodeName)try{var n=JSON.parse(mxUtils.getTextContent(g.documentElement));f(n,k);b=b.concat(n);u(a);this.spinner.stop();m=!0}catch(N){}else if("mxfile"==g.documentElement.nodeName)try{for(var q=g.documentElement.getElementsByTagName("diagram"),
-g=0;g<q.length;g++){var l=this.stringToCells(Editor.getDiagramNodeXml(q[g])),t=this.editor.graph.getBoundingBoxFromGeometry(l);v(l,new mxRectangle(0,0,t.width,t.height),a)}m=!0}catch(N){null!=window.console&&console.log("error in drop handler:",N)}}m||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)});null!=x&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?
-this.importVisio(x,function(a){A(a,"text/xml")},null,t):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,t)&&null!=x?this.parseFile(x,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?A(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):A(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",
-function(a){k.style.cursor="";k.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",Editor.editImage);m.setAttribute("title",mxResources.get("edit"));t.insertBefore(m,t.firstChild);mxEvent.addListener(m,"click",z);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&z(a)});d=m.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));t.insertBefore(d,t.firstChild);mxEvent.addListener(d,
-"click",I);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),t.insertBefore(d,t.firstChild))}l.appendChild(t);l.style.paddingRight=18*t.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=
-function(a,b){for(var c=0;c<a.length;c++){var d=a[c],e=d.data;if(null!=e){var e=this.convertDataUri(e),f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(f+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(f+"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&&b.appendChild(this.sidebar.createVertexTemplateFromCells(e,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=
+this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,e=mxUtils.bind(this,function(c,b){0==c.length&&a.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f)):this.addLibraryEntries(c,b)});null!=this.sidebar&&
+null!=b&&this.sidebar.addEntries(b);d=null!=d&&0<d.length?d:a.getTitle();var g=this.sidebar.addPalette(a.getHash(),d,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(c);var k=g.parentNode.previousSibling;d=k.getAttribute("title");null!=d&&0<d.length&&".scratchpad"!=a.title&&k.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var q=document.createElement("div");q.style.position="absolute";q.style.right="0px";q.style.top="0px";q.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||
+(q.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.margin="0 3px";var z=null;if(".scratchpad"!=a.title||this.closableScratchpad)q.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});
+null!=z?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var p=this.editor.graph,D=null,v=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),g,b,a,a.getMode());mxEvent.consume(c)}),u=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=D&&null!=D.parentNode&&D.parentNode.removeChild(D),D=m.cloneNode(!1),D.setAttribute("src",Editor.spinImage),D.setAttribute("title",
+mxResources.get("saving")),D.style.cursor="default",D.style.marginRight="2px",D.style.marginTop="-2px",q.insertBefore(D,q.firstChild),k.style.paddingRight=18*q.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=D&&null!=D.parentNode&&(D.parentNode.removeChild(D),k.style.paddingRight=18*q.childNodes.length+"px")})):null==z&&(z=m.cloneNode(!1),z.setAttribute("src",IMAGE_PATH+"/download.png"),z.setAttribute("title",mxResources.get("save")),q.insertBefore(z,q.firstChild),
+mxEvent.addListener(z,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==z||a.isModified()||(k.style.paddingRight=18*q.childNodes.length+"px",z.parentNode.removeChild(z),z=null)});mxEvent.consume(c)})),k.style.paddingRight=18*q.childNodes.length+"px")}),x=mxUtils.bind(this,function(a,c,d,e){a=p.cloneCells(mxUtils.sortCells(p.model.getTopmostCells(a)));for(var l=0;l<a.length;l++){var n=p.getCellGeometry(a[l]);null!=n&&
+n.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);u(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),J=mxUtils.bind(this,function(a){if(p.isSelectionEmpty())p.getRubberband().isActive()?(p.getRubberband().execute(a),p.getRubberband().reset()):this.showError(mxResources.get("error"),
+mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=p.getSelectionCells(),b=p.view.getBounds(c),d=p.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=p.view.translate.x;b.y-=p.view.translate.y;x(c,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){p.isMouseDown&&null!=p.panningManager&&null!=p.graphHandler.shape&&(p.graphHandler.shape.node.style.visibility="hidden",g.style.backgroundColor="#f1f3f4",g.style.cursor="copy",p.panningManager.stop(),
+p.autoScroll=!1,null!=p.graphHandler.guide&&p.graphHandler.guide.setVisible(!1),null!=p.graphHandler.hint&&(p.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){p.isMouseDown&&null!=p.panningManager&&null!=p.graphHandler&&(g.style.backgroundColor="",g.style.cursor="default",this.sidebar.showTooltips=!0,p.panningManager.stop(),p.graphHandler.reset(),p.isMouseDown=!1,p.autoScroll=!0,J(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,
+function(a){p.isMouseDown&&null!=p.graphHandler.shape&&(p.graphHandler.shape.node.style.visibility="visible",g.style.backgroundColor="",g.style.cursor="",p.autoScroll=!0,null!=p.graphHandler.guide&&p.graphHandler.guide.setVisible(!0),null!=p.graphHandler.hint&&(p.graphHandler.hint.style.visibility="visible"))}));Graph.fileSupport&&(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(a){g.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";g.style.cursor="copy";this.sidebar.hideTooltip();
+a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(a){g.style.cursor="";g.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,l,n,k,t,q,m,z){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,k,t),c)],c[0].vertex=!0,x(c,new mxRectangle(0,
+0,k,t),a,mxEvent.isAltDown(a)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var y=!1,A=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var l=mxUtils.parseXml(c);if("mxlibrary"==l.documentElement.nodeName)try{var n=JSON.parse(mxUtils.getTextContent(l.documentElement));e(n,g);b=b.concat(n);u(a);this.spinner.stop();y=!0}catch(O){}else if("mxfile"==l.documentElement.nodeName)try{for(var k=l.documentElement.getElementsByTagName("diagram"),
+l=0;l<k.length;l++){var t=this.stringToCells(Editor.getDiagramNodeXml(k[l])),q=this.editor.graph.getBoundingBoxFromGeometry(t);x(t,new mxRectangle(0,0,q.width,q.height),a)}y=!0}catch(O){null!=window.console&&console.log("error in drop handler:",O)}}y||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=z&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?
+this.importVisio(z,function(a){A(a,"text/xml")},null,q):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,q)&&null!=z?this.parseFile(z,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?A(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):A(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave",
+function(a){g.style.cursor="";g.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",Editor.editImage);m.setAttribute("title",mxResources.get("edit"));q.insertBefore(m,q.firstChild);mxEvent.addListener(m,"click",v);mxEvent.addListener(g,"dblclick",function(a){mxEvent.getSource(a)==g&&v(a)});d=m.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));q.insertBefore(d,q.firstChild);mxEvent.addListener(d,
+"click",J);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),q.insertBefore(d,q.firstChild))}k.appendChild(q);k.style.paddingRight=18*q.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=
+function(a,b){for(var c=0;c<a.length;c++){var d=a[c],f=d.data;if(null!=f){var f=this.convertDataUri(f),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(e+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(e+"image="+f,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(f=this.stringToCells(Graph.decompress(d.xml)),0<f.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(f,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=
function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.offline||EditorUi.isElectronApp||("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.createFooter=function(){return document.getElementById("geFooter")});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?
"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",Format.prototype.inactiveTabBackgroundColor=
"black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",
Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display=
-"none",this.refresh())};EditorUi.prototype.showFooter=function(a){var c=document.getElementById("geFooter");null!=c&&(this.footerHeight=a,c.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,d,f,n){a=new ImageDialog(this,a,b,d,f,n);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=
-!0;this.editor.graph.model.execute(a)});var c=new BackgroundImageDialog(this,mxUtils.bind(this,function(c){a(c)}));this.showDialog(c.container,360,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,f,n){a=new LibraryDialog(this,a,b,d,f,n);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var b=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var c=
+"none",this.refresh())};EditorUi.prototype.showFooter=function(a){var c=document.getElementById("geFooter");null!=c&&(this.footerHeight=a,c.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,d,e,n){a=new ImageDialog(this,a,b,d,e,n);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=
+!0;this.editor.graph.model.execute(a)});var c=new BackgroundImageDialog(this,mxUtils.bind(this,function(c){a(c)}));this.showDialog(c.container,360,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,e,n){a=new LibraryDialog(this,a,b,d,e,n);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var b=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var c=
b.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&c.refresh()}));return c};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position="absolute";a.style.overflow="hidden";var b=document.createElement("a");b.className="geTitle";b.style.color="#DF6C0C";b.style.fontWeight="bold";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML=
-'<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,d,f,n,g){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},
-e=null!=a&&null!=a.error?a.error:a;if(null!=e||null!=b){var k=mxUtils.htmlEntities(mxResources.get("unknownError")),q=mxResources.get("ok"),l=null;b=null!=b?b:mxResources.get("error");if(null!=e){null!=e.retry&&(q=mxResources.get("cancel"),l=function(){c();e.retry()});if(404==e.code||404==e.status||403==e.code){var k=403==e.code?null!=e.message?mxUtils.htmlEntities(e.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=n?n:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
-(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":"")),m=null!=g?g:window.location.hash;if(null!=m&&("#G"==m.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==m.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==e.code||404==e.status)){m="#U"==m.substring(0,2)?m.substring(45,
-m.lastIndexOf("%26ex")):m.substring(2);this.showError(b,k,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+m);this.handleError(a,b,d,f,n)}),l,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){e.innerHTML="";for(var a=0;a<c.length;a++){var b=document.createElement("option");mxUtils.write(b,c[a].displayName);b.value=a;e.appendChild(b);b=document.createElement("option");b.innerHTML="&nbsp;&nbsp;&nbsp;";
-mxUtils.write(b,"<"+c[a].email+">");b.setAttribute("disabled","disabled");e.appendChild(b)}b=document.createElement("option");mxUtils.write(b,mxResources.get("addAccount"));b.value=c.length;e.appendChild(b)}var c=this.drive.getUsersList(),b=document.createElement("div"),d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+": ");b.appendChild(d);var e=document.createElement("select");e.style.width="200px";a();mxEvent.addListener(e,"change",mxUtils.bind(this,
-function(){var b=e.value,d=c.length!=b;d&&this.drive.setUser(c[b]);this.drive.authorize(d,mxUtils.bind(this,function(){d||(c=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),!0)}));b.appendChild(e);b=new CustomDialog(this,b,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(b.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=d&&d()}),480,150);return}}null!=e.message?
-k=mxUtils.htmlEntities(e.message):null!=e.response&&null!=e.response.error?k=mxUtils.htmlEntities(e.response.error):"undefined"!==typeof window.App&&(e.code==App.ERROR_TIMEOUT?k=mxUtils.htmlEntities(mxResources.get("timeout")):e.code==App.ERROR_BUSY&&(k=mxUtils.htmlEntities(mxResources.get("busy"))))}var p=g=null;null!=e&&null!=e.helpLink&&(g=mxResources.get("help"),p=mxUtils.bind(this,function(){return this.editor.graph.openLink(e.helpLink)}));this.showError(b,k,q,d,l,null,null,g,p,null,null,null,
-f?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,d,f,n,g){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},f,n,null,null,null,null,e);this.showDialog(a.container,340,46+
-e,!0,g);a.init()};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||(!mxClient.IS_SF||!this.editor.graph.mathEnabled)&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,
-b,d,f){var c=a.toDataURL("image/"+d);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=b&&(c=this.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(b)));0<f&&(c=this.writeGraphModelToPng(c,"pHYs","dpi",f));return c};EditorUi.prototype.saveCanvas=function(a,b,d,f,n){var c="jpeg"==d?"jpg":d;f=this.getBaseFilename(f)+"."+c;a=this.createImageDataUri(a,b,d,n);this.saveData(f,c,a.substring(a.lastIndexOf(",")+1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=
+'<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,d,e,n,l){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},
+f=null!=a&&null!=a.error?a.error:a;if(null!=f||null!=b){var g=mxUtils.htmlEntities(mxResources.get("unknownError")),k=mxResources.get("ok"),t=null;b=null!=b?b:mxResources.get("error");if(null!=f){null!=f.retry&&(k=mxResources.get("cancel"),t=function(){c();f.retry()});if(404==f.code||404==f.status||403==f.code){var g=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=n?n:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":"")),m=null!=l?l:window.location.hash;if(null!=m&&("#G"==m.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==m.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==f.code||404==f.status)){m="#U"==m.substring(0,2)?m.substring(45,
+m.lastIndexOf("%26ex")):m.substring(2);this.showError(b,g,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+m);this.handleError(a,b,d,e,n)}),t,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){f.innerHTML="";for(var a=0;a<c.length;a++){var b=document.createElement("option");mxUtils.write(b,c[a].displayName);b.value=a;f.appendChild(b);b=document.createElement("option");b.innerHTML="&nbsp;&nbsp;&nbsp;";
+mxUtils.write(b,"<"+c[a].email+">");b.setAttribute("disabled","disabled");f.appendChild(b)}b=document.createElement("option");mxUtils.write(b,mxResources.get("addAccount"));b.value=c.length;f.appendChild(b)}var c=this.drive.getUsersList(),b=document.createElement("div"),d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+": ");b.appendChild(d);var f=document.createElement("select");f.style.width="200px";a();mxEvent.addListener(f,"change",mxUtils.bind(this,
+function(){var b=f.value,d=c.length!=b;d&&this.drive.setUser(c[b]);this.drive.authorize(d,mxUtils.bind(this,function(){d||(c=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),!0)}));b.appendChild(f);b=new CustomDialog(this,b,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(b.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=d&&d()}),480,150);return}}null!=f.message?
+g=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?g=mxUtils.htmlEntities(f.response.error):"undefined"!==typeof window.App&&(f.code==App.ERROR_TIMEOUT?g=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY&&(g=mxUtils.htmlEntities(mxResources.get("busy"))))}var p=l=null;null!=f&&null!=f.helpLink&&(l=mxResources.get("help"),p=mxUtils.bind(this,function(){return this.editor.graph.openLink(f.helpLink)}));this.showError(b,g,k,d,t,null,null,l,p,null,null,null,
+e?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,d,e,n,l){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},e,n,null,null,null,null,f);this.showDialog(a.container,340,46+
+f,!0,l);a.init()};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||(!mxClient.IS_SF||!this.editor.graph.mathEnabled)&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,
+b,d,e){var c=a.toDataURL("image/"+d);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=b&&(c=this.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(b)));0<e&&(c=this.writeGraphModelToPng(c,"pHYs","dpi",e));return c};EditorUi.prototype.saveCanvas=function(a,b,d,e,n){var c="jpeg"==d?"jpg":d;e=this.getBaseFilename(e)+"."+c;a=this.createImageDataUri(a,b,d,n);this.saveData(e,c,a.substring(a.lastIndexOf(",")+1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=
function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0,null,null,null,
-null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,f,n){if(window.Blob&&navigator.msSaveOrOpenBlob)a=f?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else{var c=document.createElement("a"),e=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&
-"undefined"!==typeof c.download;if(mxClient.IS_GC)var k=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),e=65==(k?parseInt(k[2],10):!1)?!1:e;if(e||this.isOffline()){c.href=URL.createObjectURL(f?this.base64ToBlob(a,d):new Blob([a],{type:d}));e?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(t){}}else this.createEchoRequest(a,b,d,f,n).simulate(document,"_blank")}};
-EditorUi.prototype.createEchoRequest=function(a,b,d,f,n,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=n?"&format="+n:"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(f?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),l=0;l<e;++l){for(var m=1024*l,t=Math.min(m+1024,d),p=Array(t-m),y=0;m<t;++y,++m)p[y]=c[m].charCodeAt(0);f[l]=new Uint8Array(p)}return new Blob(f,
-{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,f,n,g,l){g=null!=g?g:!1;l=null!=l?l:"vsdx"!=n&&(!mxClient.IS_IOS||!navigator.standalone);n=this.getServiceCount(g);isLocalStorage&&n++;var c=4>=n?2:6<n?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null==d||"image/"!=d.substring(0,6)||"image/svg"==d.substring(0,9)&&!mxClient.IS_SVG){var e=window.open("about:blank");null==e?mxUtils.popup(a,!0):(e.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),
-e.document.close())}else this.openInNewWindow(a,d,f);else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,c,d,f):null!=c&&0<c.length&&this.pickFolder(b,mxUtils.bind(this,function(e){try{this.exportFile(a,c,d,f,b,e)}catch(D){this.handleError(D)}}))}catch(E){this.handleError(E)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,l,null,1<n,c,a,d,f);g=this.isServices(n)?n>c?390:270:160;this.showDialog(b.container,400,g,!0,!0);b.init()};
+null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,e,n){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else{var c=document.createElement("a"),f=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&
+"undefined"!==typeof c.download;if(mxClient.IS_GC)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),f=65==(g?parseInt(g[2],10):!1)?!1:f;if(f||this.isOffline()){c.href=URL.createObjectURL(e?this.base64ToBlob(a,d):new Blob([a],{type:d}));f?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(q){}}else this.createEchoRequest(a,b,d,e,n).simulate(document,"_blank")}};
+EditorUi.prototype.createEchoRequest=function(a,b,d,e,n,l){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=n?"&format="+n:"")+(null!=l?"&base64="+l:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),k=0;k<f;++k){for(var m=1024*k,q=Math.min(m+1024,d),p=Array(q-m),z=0;m<q;++z,++m)p[z]=c[m].charCodeAt(0);e[k]=new Uint8Array(p)}return new Blob(e,
+{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,e,n,l,k){l=null!=l?l:!1;k=null!=k?k:"vsdx"!=n&&(!mxClient.IS_IOS||!navigator.standalone);n=this.getServiceCount(l);isLocalStorage&&n++;var c=4>=n?2:6<n?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null==d||"image/"!=d.substring(0,6)||"image/svg"==d.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),
+f.document.close())}else this.openInNewWindow(a,d,e);else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,c,d,e):null!=c&&0<c.length&&this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,c,d,e,b,f)}catch(D){this.handleError(D)}}))}catch(G){this.handleError(G)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,l,k,null,1<n,c,a,d,e);l=this.isServices(n)?n>c?390:270:160;this.showDialog(b.container,400,l,!0,!0);b.init()};
EditorUi.prototype.openInNewWindow=function(a,b,d){if(mxClient.IS_GC||mxClient.IS_EDGE||mxClient.IS_FF||11==document.documentMode||10==document.documentMode){var c=window.open("about:blank");null==c||null==c.document?mxUtils.popup(a,!0):("image/svg+xml"==b?c.document.write("<html>"+a+"</html>"):c.document.write('<html><img style="max-width:100%;" src="data:'+b+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),c.document.close())}else c=window.open("data:"+b+(d?";base64,"+a:";charset=utf8,"+
-encodeURIComponent(a))),null!=c&&null!=c.document||mxUtils.popup(a,!0)};var f=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);
+encodeURIComponent(a))),null!=c&&null!=c.document||mxUtils.popup(a,!0)};var e=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);
else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";
-mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.zIndex;var 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.exportToCanvas(mxUtils.bind(this,function(a){e.stop();
+mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){f.stop();
this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+
-1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}f.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,d,f,n){this.isLocalFileSave()?this.saveLocalFile(d,a,f,n,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,
-c){return this.createEchoRequest(d,a,f,n,b,c)}),d,n,f)};EditorUi.prototype.saveRequest=function(a,b,d,f,n,g,l){l=null!=l?l:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);isLocalStorage&&c++;var e=4>=c?2:6<c?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var e=d("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==c||null==c||"_blank"==c?"0":"1");null!=e&&(c==App.MODE_DEVICE||"download"==c||"_blank"==c?e.simulate(document,"_blank"):
-this.pickFolder(c,mxUtils.bind(this,function(d){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=f)try{this.exportFile(f,a,g,!0,c,d)}catch(z){this.handleError(z)}else this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&299>=e.getStatus())try{this.exportFile(e.getText(),a,g,!0,c,d)}catch(z){this.handleError(z)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();
-this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,l,null,1<c,e,f,g,n);c=this.isServices(c)?4<c?390:270:160;this.showDialog(a.container,380,c,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,d,f,n,g){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=
-function(a,b,d,f,n,g,l,m,t,p){if(this.spinner.spin(document.body,mxResources.get("export")))try{var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;var e=b?null:this.editor.graph.background;e==mxConstants.NONE&&(e=null);null==e&&0==b&&(e="#ffffff");var k=this.editor.graph.getSvg(e,a,l,m,null,d,null,null,"blank"==p?"_blank":"self"==p?"_top":null,null,!0);f&&this.editor.graph.addSvgShadow(k);var q=this.getBaseFilename()+".svg",x=mxUtils.bind(this,function(a){this.spinner.stop();n&&a.setAttribute("content",
-this.getFileData(!0,null,null,null,d,t,null,null,null,!1));var c='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||c.length<=MAX_REQUEST_SIZE?this.saveData(q,"svg",c,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.editor.addFontCss(k);this.editor.graph.mathEnabled&&
-this.editor.addMathCss(k);g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(k,x,this.thumbImageCache)):x(k)}catch(O){this.handleError(O)}};EditorUi.prototype.addRadiobox=function(a,b,d,f,n,g,l){return this.addCheckbox(a,d,f,n,g,l,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,d,f,n,g,l,m){g=null!=g?g:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",l?"radio":"checkbox");l="geCheckbox-"+Editor.guid();c.id=
-l;null!=m&&c.setAttribute("name",m);d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);f&&c.setAttribute("disabled","disabled");g&&(a.appendChild(c),d=document.createElement("label"),mxUtils.write(d,b),d.setAttribute("for",l),a.appendChild(d),n||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),e="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=
-App.MODE_BROWSER&&(e=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));f.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");f.appendChild(d);a.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,
-function(){if("custom"==f.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:f.value="blank"},mxResources.get("url"),null,null,null,null,function(){f.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===f.value?"_blank":
-e:null},getEditInput:function(){return c},getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){l.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?"border:1px solid black;background-color:"+f:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var 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);b&&
-(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(e));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var f="#0000ff",l=null,l=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;c()});mxEvent.consume(a)}));c();l.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";l.style.marginLeft="4px";l.style.height="22px";l.style.width=
-"22px";l.style.position="relative";l.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";l.className="geColorBtn";a.appendChild(l);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,d,f,n,g,l,m){var c=this.getCurrentFile(),e=[];f&&(e.push("lightbox=1"),"auto"!=a&&e.push("target="+a),null!=b&&b!=mxConstants.NONE&&e.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),
-null!=n&&0<n.length&&e.push("edit="+encodeURIComponent(n)),g&&e.push("layers=1"),this.editor.graph.foldingEnabled&&e.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&e.push("page-id="+this.currentPage.getId());a=!0;null!=l?d="#U"+encodeURIComponent(l):(c=this.getCurrentFile(),m||null==c||c.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
-(d="#"+c.getHash(),a=!1));a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&e.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host+"/")+(0<e.length?"?"+e.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,f,n,g,l,m,t,p,y){this.getBasenames();var c={};""!=n&&n!=mxConstants.NONE&&(c.highlight=n);"auto"!==f&&(c.target=f);t||(c.lightbox=
-!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];l&&(d.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);m&&d.push("layers");0<d.length&&(t&&d.push("lightbox"),c.toolbar=d.join(" "));null!=p&&0<p.length&&(c.edit=p);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!l);b='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":
-"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";y(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,f){var c=document.createElement("div");
-c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("html"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name",
-"type-embedhtmldialog");e=l.cloneNode(!0);e.setAttribute("value","copy");k.appendChild(e);var t=document.createElement("span");mxUtils.write(t,mxResources.get("includeCopyOfMyDiagram"));k.appendChild(t);mxUtils.br(k);k.appendChild(l);t=document.createElement("span");mxUtils.write(t,mxResources.get("publicDiagramUrl"));k.appendChild(t);var q=this.getCurrentFile();null==d&&null!=q&&q.constructor==window.DriveFile&&(t=document.createElement("a"),t.style.paddingLeft="12px",t.style.color="gray",t.setAttribute("href",
-"javascript:void(0);"),mxUtils.write(t,mxResources.get("share")),k.appendChild(t),mxEvent.addListener(t,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(q.getId())})));e.setAttribute("checked","checked");null==d&&l.setAttribute("disabled","disabled");c.appendChild(k);var m=this.addLinkSection(c),p=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";
-D.style.width="60px";D.style.marginLeft="4px";D.style.marginRight="12px";D.value="100%";c.appendChild(D);var z=this.addCheckbox(c,mxResources.get("fit"),!0),k=null!=this.pages&&1<this.pages.length,u=u=this.addCheckbox(c,mxResources.get("allPages"),k,!k),v=this.addCheckbox(c,mxResources.get("layers"),!0),I=this.addCheckbox(c,mxResources.get("lightbox"),!0),B=this.addEditButton(c,I),C=B.getEditInput();C.style.marginBottom="16px";mxEvent.addListener(I,"change",function(){I.checked?C.removeAttribute("disabled"):
-C.setAttribute("disabled","disabled");C.checked&&I.checked?B.getEditSelect().removeAttribute("disabled"):B.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){f(l.checked?d:null,p.checked,D.value,m.getTarget(),m.getColor(),z.checked,u.checked,v.checked,I.checked,B.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);e.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,f,n,g){var c=document.createElement("div");c.style.whiteSpace=
-"nowrap";var e=document.createElement("h3");mxUtils.write(e,a||mxResources.get("link"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var k=this.getCurrentFile(),e="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=k&&k.constructor==window.DriveFile&&!b){a=80;var e="https://desk.draw.io/support/solutions/articles/16000039384",l=document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
-var q=document.createElement("div");q.style.whiteSpace="normal";mxUtils.write(q,mxResources.get("linkAccountRequired"));l.appendChild(q);q=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(k.getId())}));q.style.marginTop="12px";q.className="geBtn";l.appendChild(q);c.appendChild(l);q=document.createElement("a");q.style.paddingLeft="12px";q.style.color="gray";q.style.fontSize="11px";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("check"));
-l.appendChild(q);mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var m=null,p=null;if(null!=d||null!=f)a+=30,mxUtils.write(c,mxResources.get("width")+":"),m=document.createElement("input"),
-m.setAttribute("type","text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",c.appendChild(m),mxUtils.write(c,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=f+"px",c.appendChild(p),mxUtils.br(c);var z=this.addLinkSection(c,g);d=null!=this.pages&&1<this.pages.length;var u=null;
-if(null==k||k.constructor!=window.DriveFile||b)u=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var v=this.addCheckbox(c,mxResources.get("lightbox"),!0),I=this.addEditButton(c,v),B=I.getEditInput(),C=this.addCheckbox(c,mxResources.get("layers"),!0);C.style.marginLeft=B.style.marginLeft;C.style.marginBottom="16px";C.style.marginTop="8px";mxEvent.addListener(v,"change",function(){v.checked?(C.removeAttribute("disabled"),B.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),B.setAttribute("disabled",
-"disabled"));B.checked&&v.checked?I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){n(z.getTarget(),z.getColor(),null==u?!0:u.checked,v.checked,I.getLink(),C.checked,null!=m?m.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),e);this.showDialog(b.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():
-document.execCommand("selectAll",!1,null)):z.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,f,n){var c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("image"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(n?"10":"4")+"px";c.appendChild(e);if(n){mxUtils.write(c,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%";c.appendChild(k);mxUtils.write(c,mxResources.get("borderWidth")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginRight="16px";l.style.width="60px";l.style.marginLeft="4px";l.value=this.lastExportBorder||"0";c.appendChild(l);mxUtils.br(c)}var q=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),m=f?null:this.addCheckbox(c,
-mxResources.get("includeCopyOfMyDiagram"),!0),e=this.editor.graph,p=f?null:this.addCheckbox(c,mxResources.get("transparentBackground"),e.background==mxConstants.NONE||null==e.background);null!=p&&(p.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){var a=parseInt(k.value)/100||1,c=parseInt(l.value)||0;d(!q.checked,null!=m?m.checked:!1,null!=p?p.checked:!1,a,c)}),null,a,b);this.showDialog(a.container,300,(n?25:0)+(f?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
-function(a,b,d,f,l,g,m,p){m=null!=m?m:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var e=this.editor.graph,k="jpeg"==p?196:300,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(n);mxUtils.write(c,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%";c.appendChild(q);mxUtils.write(c,mxResources.get("borderWidth")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.marginRight="16px";x.style.width="60px";x.style.marginLeft="4px";x.value=this.lastExportBorder||"0";c.appendChild(x);mxUtils.br(c);var A=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=p),u=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,e.isSelectionEmpty()),v=document.createElement("input");
-v.style.marginTop="16px";v.style.marginRight="8px";v.style.marginLeft="24px";v.setAttribute("disabled","disabled");v.setAttribute("type","checkbox");g&&(c.appendChild(v),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),k+=26,mxEvent.addListener(u,"change",function(){u.checked?v.removeAttribute("disabled"):v.setAttribute("disabled","disabled")}));e.isSelectionEmpty()||(v.setAttribute("checked","checked"),v.defaultChecked=!0);var B=this.addCheckbox(c,mxResources.get("shadow"),e.shadowVisible),
-C=document.createElement("input");C.style.marginTop="16px";C.style.marginRight="8px";C.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||C.setAttribute("disabled","disabled");b&&(c.appendChild(C),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),k+=26);var K=null;if("png"==p||"jpeg"==p)K=this.addCheckbox(c,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),k+=26;var P=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),m,null,null,
-"jpeg"!=p),T=null!=this.pages&&1<this.pages.length,ba=this.addCheckbox(c,T?mxResources.get("allPages"):"",T,!T,null,"jpeg"!=p);ba.style.marginLeft="24px";ba.style.marginBottom="16px";T||(ba.style.display="none");mxEvent.addListener(P,"change",function(){P.checked&&T?ba.removeAttribute("disabled"):ba.setAttribute("disabled","disabled")});m&&T||ba.setAttribute("disabled","disabled");var Y=document.createElement("select");Y.style.maxWidth="260px";Y.style.marginLeft="8px";Y.style.marginRight="10px";Y.className=
-"geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));Y.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));Y.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));Y.appendChild(a);"svg"==p&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(Y),mxUtils.br(c),mxUtils.br(c),
-k+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=x.value;this.lastExportZoom=q.value;l(q.value,A.checked,!u.checked,B.checked,P.checked,C.checked,x.value,v.checked,!ba.checked,Y.value,null!=K?K.checked:null)}),null,d,f);this.showDialog(d.container,340,k,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,
-b,d,f,l){var c=document.createElement("div");c.style.whiteSpace="nowrap";var e=this.editor.graph;if(null!=b){var k=document.createElement("h3");mxUtils.write(k,b);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(k)}var n=this.addCheckbox(c,mxResources.get("fit"),!0),q=this.addCheckbox(c,mxResources.get("shadow"),e.shadowVisible&&f,!f),m=this.addCheckbox(c,d),p=this.addCheckbox(c,mxResources.get("lightbox"),!0),D=this.addEditButton(c,p),z=D.getEditInput(),
-u=1<e.model.getChildCount(e.model.getRoot()),v=this.addCheckbox(c,mxResources.get("layers"),u,!u);v.style.marginLeft=z.style.marginLeft;v.style.marginBottom="12px";v.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(u&&v.removeAttribute("disabled"),z.removeAttribute("disabled")):(v.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"));z.checked&&p.checked?D.getEditSelect().removeAttribute("disabled"):D.getEditSelect().setAttribute("disabled","disabled")});
-b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(n.checked,q.checked,m.checked,p.checked,D.getLink(),v.checked)}),null,mxResources.get("embed"),l);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,f,l,g,m,p){function c(c){var b=" ",k="";f&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",k+="cursor:pointer;");a&&(k+="max-width:100%;");var n="";d&&(n=' width="'+Math.round(e.width)+'" height="'+Math.round(e.height)+'"');m('<img src="'+c+'"'+n+(""!=k?' style="'+k+'"':"")+b+"/>")}var e=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=f?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,
-mxUtils.bind(this,function(a){p({message:mxResources.get("unknownError")})}),null,!0,d?2:1,null,b);else if(b=this.getFileData(!0),e.width*e.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var k="";d&&(k="&w="+Math.round(2*e.width)+"&h="+Math.round(2*e.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(f?"1":"0")+k+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?c("data:image/png;base64,"+n.getText()):p({message:mxResources.get("unknownError")})}))}else p({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,b,d,f,l,g,m){var c=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!d),e=c.getElementsByTagName("a");if(null!=e)for(var k=0;k<e.length;k++){var n=e[k].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==e[k].getAttribute("target")&&e[k].removeAttribute("target")}f&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var q=" ",p="";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.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){m('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=p?' style="'+p+'"':"")+q+"/>")}))}else p="",f&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),p+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),p+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=p&&c.setAttribute("style",p),this.editor.addFontCss(c),this.editor.graph.mathEnabled&&this.editor.addMathCss(c),m(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-
+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}e.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,d,e,n){this.isLocalFileSave()?this.saveLocalFile(d,a,e,n,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,
+c){return this.createEchoRequest(d,a,e,n,b,c)}),d,n,e)};EditorUi.prototype.saveRequest=function(a,b,d,e,n,l,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);isLocalStorage&&c++;var f=4>=c?2:6<c?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var f=d("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==c||null==c||"_blank"==c?"0":"1");null!=f&&(c==App.MODE_DEVICE||"download"==c||"_blank"==c?f.simulate(document,"_blank"):
+this.pickFolder(c,mxUtils.bind(this,function(d){l=null!=l?l:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,l,!0,c,d)}catch(v){this.handleError(v)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,l,!0,c,d)}catch(v){this.handleError(v)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();
+this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,k,null,1<c,f,e,l,n);c=this.isServices(c)?4<c?390:270:160;this.showDialog(a.container,380,c,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,d,e,n,l){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=
+function(a,b,d,e,n,l,k,m,q,p){if(this.spinner.spin(document.body,mxResources.get("export")))try{var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;var f=b?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==b&&(f="#ffffff");var g=this.editor.graph.getSvg(f,a,k,m,null,d,null,null,"blank"==p?"_blank":"self"==p?"_top":null,null,!0);e&&this.editor.graph.addSvgShadow(g);var t=this.getBaseFilename()+".svg",y=mxUtils.bind(this,function(a){this.spinner.stop();n&&a.setAttribute("content",
+this.getFileData(!0,null,null,null,d,q,null,null,null,!1));var c='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||c.length<=MAX_REQUEST_SIZE?this.saveData(t,"svg",c,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.editor.addFontCss(g);this.editor.graph.mathEnabled&&
+this.editor.addMathCss(g);l?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(g,y,this.thumbImageCache)):y(g)}catch(M){this.handleError(M)}};EditorUi.prototype.addRadiobox=function(a,b,d,e,n,l,k){return this.addCheckbox(a,d,e,n,l,k,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,d,e,n,l,k,m){l=null!=l?l:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",k?"radio":"checkbox");k="geCheckbox-"+Editor.guid();c.id=
+k;null!=m&&c.setAttribute("name",m);d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled","disabled");l&&(a.appendChild(c),d=document.createElement("label"),mxUtils.write(d,b),d.setAttribute("for",k),a.appendChild(d),n||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),f="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=
+App.MODE_BROWSER&&(f=window.location.href);var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");e.appendChild(d);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,
+function(){if("custom"==e.value){var a=new FilenameDialog(this,f,mxResources.get("ok"),function(a){null!=a?f=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":
+f:null},getEditInput:function(){return c},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");
+d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&
+(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",k=null,k=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();k.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width=
+"22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";a.appendChild(k);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,d,e,n,l,k,m){var c=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),
+null!=n&&0<n.length&&f.push("edit="+encodeURIComponent(n)),l&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&f.push("page-id="+this.currentPage.getId());a=!0;null!=k?d="#U"+encodeURIComponent(k):(c=this.getCurrentFile(),m||null==c||c.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
+(d="#"+c.getHash(),a=!1));a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host+"/")+(0<f.length?"?"+f.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,e,n,l,k,m,q,p,z){this.getBasenames();var c={};""!=n&&n!=mxConstants.NONE&&(c.highlight=n);"auto"!==e&&(c.target=e);q||(c.lightbox=
+!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];k&&(d.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);m&&d.push("layers");0<d.length&&(q&&d.push("lightbox"),c.toolbar=d.join(" "));null!=p&&0<p.length&&(c.edit=p);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(l?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":
+"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";z(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,e){var c=document.createElement("div");
+c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var 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");g.appendChild(f);var q=document.createElement("span");mxUtils.write(q,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(q);mxUtils.br(g);g.appendChild(k);q=document.createElement("span");mxUtils.write(q,mxResources.get("publicDiagramUrl"));g.appendChild(q);var t=this.getCurrentFile();null==d&&null!=t&&t.constructor==window.DriveFile&&(q=document.createElement("a"),q.style.paddingLeft="12px",q.style.color="gray",q.setAttribute("href",
+"javascript:void(0);"),mxUtils.write(q,mxResources.get("share")),g.appendChild(q),mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(t.getId())})));f.setAttribute("checked","checked");null==d&&k.setAttribute("disabled","disabled");c.appendChild(g);var m=this.addLinkSection(c),p=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";
+D.style.width="60px";D.style.marginLeft="4px";D.style.marginRight="12px";D.value="100%";c.appendChild(D);var v=this.addCheckbox(c,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,u=u=this.addCheckbox(c,mxResources.get("allPages"),g,!g),x=this.addCheckbox(c,mxResources.get("layers"),!0),J=this.addCheckbox(c,mxResources.get("lightbox"),!0),B=this.addEditButton(c,J),C=B.getEditInput();C.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?C.removeAttribute("disabled"):
+C.setAttribute("disabled","disabled");C.checked&&J.checked?B.getEditSelect().removeAttribute("disabled"):B.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(k.checked?d:null,p.checked,D.value,m.getTarget(),m.getColor(),v.checked,u.checked,x.checked,J.checked,B.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,n,l){var c=document.createElement("div");c.style.whiteSpace=
+"nowrap";var f=document.createElement("h3");mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=g&&g.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
+var t=document.createElement("div");t.style.whiteSpace="normal";mxUtils.write(t,mxResources.get("linkAccountRequired"));k.appendChild(t);t=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));t.style.marginTop="12px";t.className="geBtn";k.appendChild(t);c.appendChild(k);t=document.createElement("a");t.style.paddingLeft="12px";t.style.color="gray";t.style.fontSize="11px";t.setAttribute("href","javascript:void(0);");mxUtils.write(t,mxResources.get("check"));
+k.appendChild(t);mxEvent.addListener(t,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var m=null,p=null;if(null!=d||null!=e)a+=30,mxUtils.write(c,mxResources.get("width")+":"),m=document.createElement("input"),
+m.setAttribute("type","text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",c.appendChild(m),mxUtils.write(c,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=e+"px",c.appendChild(p),mxUtils.br(c);var v=this.addLinkSection(c,l);d=null!=this.pages&&1<this.pages.length;var u=null;
+if(null==g||g.constructor!=window.DriveFile||b)u=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var x=this.addCheckbox(c,mxResources.get("lightbox"),!0),J=this.addEditButton(c,x),B=J.getEditInput(),C=this.addCheckbox(c,mxResources.get("layers"),!0);C.style.marginLeft=B.style.marginLeft;C.style.marginBottom="16px";C.style.marginTop="8px";mxEvent.addListener(x,"change",function(){x.checked?(C.removeAttribute("disabled"),B.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),B.setAttribute("disabled",
+"disabled"));B.checked&&x.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){n(v.getTarget(),v.getColor(),null==u?!0:u.checked,x.checked,J.getLink(),C.checked,null!=m?m.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():
+document.execCommand("selectAll",!1,null)):v.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e,n){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(n?"10":"4")+"px";c.appendChild(f);if(n){mxUtils.write(c,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginRight=
+"16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";c.appendChild(g);mxUtils.write(c,mxResources.get("borderWidth")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.value=this.lastExportBorder||"0";c.appendChild(k);mxUtils.br(c)}var t=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),m=e?null:this.addCheckbox(c,
+mxResources.get("includeCopyOfMyDiagram"),!0),f=this.editor.graph,p=e?null:this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=p&&(p.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,c=parseInt(k.value)||0;d(!t.checked,null!=m?m.checked:!1,null!=p?p.checked:!1,a,c)}),null,a,b);this.showDialog(a.container,300,(n?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
+function(a,b,d,e,n,l,k,m){k=null!=k?k:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph,g="jpeg"==m?196:300,t=document.createElement("h3");mxUtils.write(t,a);t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(t);mxUtils.write(c,mxResources.get("zoom")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight=
+"12px";p.value=this.lastExportZoom||"100%";c.appendChild(p);mxUtils.write(c,mxResources.get("borderWidth")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.marginRight="16px";y.style.width="60px";y.style.marginLeft="4px";y.value=this.lastExportBorder||"0";c.appendChild(y);mxUtils.br(c);var A=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=m),u=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),x=document.createElement("input");
+x.style.marginTop="16px";x.style.marginRight="8px";x.style.marginLeft="24px";x.setAttribute("disabled","disabled");x.setAttribute("type","checkbox");l&&(c.appendChild(x),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),g+=26,mxEvent.addListener(u,"change",function(){u.checked?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(x.setAttribute("checked","checked"),x.defaultChecked=!0);var B=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible),
+C=document.createElement("input");C.style.marginTop="16px";C.style.marginRight="8px";C.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||C.setAttribute("disabled","disabled");b&&(c.appendChild(C),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),g+=26);var K=null;if("png"==m||"jpeg"==m)K=this.addCheckbox(c,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),g+=26;var N=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),k,null,null,
+"jpeg"!=m),P=null!=this.pages&&1<this.pages.length,ca=this.addCheckbox(c,P?mxResources.get("allPages"):"",P,!P,null,"jpeg"!=m);ca.style.marginLeft="24px";ca.style.marginBottom="16px";P||(ca.style.display="none");mxEvent.addListener(N,"change",function(){N.checked&&P?ca.removeAttribute("disabled"):ca.setAttribute("disabled","disabled")});k&&P||ca.setAttribute("disabled","disabled");var V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft="8px";V.style.marginRight="10px";V.className=
+"geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));V.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));V.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));V.appendChild(a);"svg"==m&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(V),mxUtils.br(c),mxUtils.br(c),
+g+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=y.value;this.lastExportZoom=p.value;n(p.value,A.checked,!u.checked,B.checked,N.checked,C.checked,y.value,x.checked,!ca.checked,V.value,null!=K?K.checked:null)}),null,d,e);this.showDialog(d.container,340,g,!0,!0,null,null,null,null,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,
+b,d,e,n){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(g)}var k=this.addCheckbox(c,mxResources.get("fit"),!0),t=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,!e),m=this.addCheckbox(c,d),p=this.addCheckbox(c,mxResources.get("lightbox"),!0),D=this.addEditButton(c,p),v=D.getEditInput(),
+u=1<f.model.getChildCount(f.model.getRoot()),x=this.addCheckbox(c,mxResources.get("layers"),u,!u);x.style.marginLeft=v.style.marginLeft;x.style.marginBottom="12px";x.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(u&&x.removeAttribute("disabled"),v.removeAttribute("disabled")):(x.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"));v.checked&&p.checked?D.getEditSelect().removeAttribute("disabled"):D.getEditSelect().setAttribute("disabled","disabled")});
+b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(k.checked,t.checked,m.checked,p.checked,D.getLink(),x.checked)}),null,mxResources.get("embed"),n);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,e,k,l,m,p){function c(c){var b=" ",g="";e&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.drawHost+"/?client=1&lightbox=1"+(k?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var n="";d&&(n=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');m('<img src="'+c+'"'+n+(""!=g?' style="'+g+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,
+mxUtils.bind(this,function(a){p({message:mxResources.get("unknownError")})}),null,!0,d?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";d&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?c("data:image/png;base64,"+n.getText()):p({message:mxResources.get("unknownError")})}))}else p({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(a,b,d,e,n,l,k){var c=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!d),f=c.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var t=f[g].getAttribute("href");null!=t&&"#"==t.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var m=" ",p="";e&&(m="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.drawHost+"/?client=1&lightbox=1"+(n?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=p?' style="'+p+'"':"")+m+"/>")}))}else p="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.drawHost+"/?client=1&lightbox=1"+(n?"&edit=_blank":"")+(l?"&layers=1":"")+"');}}})(this);"),p+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),p+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=p&&c.setAttribute("style",p),this.editor.addFontCss(c),this.editor.graph.mathEnabled&&this.editor.addMathCss(c),k(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-
a)/1E3);var c=Math.floor(a/31536E3);if(1<c)return c+" "+mxResources.get("years");c=Math.floor(a/2592E3);if(1<c)return c+" "+mxResources.get("months");c=Math.floor(a/86400);if(1<c)return c+" "+mxResources.get("days");c=Math.floor(a/3600);if(1<c)return c+" "+mxResources.get("hours");c=Math.floor(a/60);return 1<c?c+" "+mxResources.get("minutes"):1==c?c+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==
-a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=c&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(g){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){try{var c=this.editor.graph,e=null;if(null!=
-d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,!0),c),e=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),f=c.getGlobalVariable,k=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(c.container);
-c.model.setRoot(k.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==e&&(e=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=d.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(e));a(f.substring(f.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(F){null!=b&&b(F)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)}catch(A){null!=
-b&&b(A)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,f,l,g,m){m=b.background;m==mxConstants.NONE&&(m=null);g=b.getSvg(m,null,null,null,null,g);b.shadowVisible&&b.addSvgShadow(g);null!=a&&g.setAttribute("content",a);null!=d&&g.setAttribute("resource",d);if(null!=l)this.convertImages(g,mxUtils.bind(this,function(a){l((f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(f?
-"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(g)};EditorUi.prototype.exportImage=function(a,b,d,f,l,g,m,p,t,u,y){t=null!=t?t:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,
-l?this.getFileData(!0,null,null,null,d,p):null,t,null==this.pages||0==this.pages.length,y)}catch(z){"Invalid image"==z.message?this.downloadFile(t):this.handleError(z)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,f,null,null,g,m,u)}catch(D){this.spinner.stop(),this.handleError(D)}}};EditorUi.prototype.embedCssFonts=function(a,b){function c(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")}
-var d=a.split("url("),e=0;null==this.cachedFonts&&(this.cachedFonts={});var f=mxUtils.bind(this,function(){if(0==e){for(var a=[d[0]],f=1;f<d.length;f++){var k=d[f].indexOf(")");a.push('url("');a.push(this.cachedFonts[c(d[f].substring(0,k))]);a.push('"'+d[f].substring(k))}b(a.join(""))}});if(0<d.length){for(var l=1;l<d.length;l++){var m=d[l].indexOf(")"),t=null,p=d[l].indexOf("format(",m);0<p&&(t=c(d[l].substring(p+7,d[l].indexOf(")",p))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]=
-a;e++;var c="application/x-font-ttf";if("svg"==t||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==t||"embedded-opentype"==t||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==t||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==t||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==t||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==t||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&
-!this.editor.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){this.cachedFonts[a]=c;e--;f()}),mxUtils.bind(this,function(a){e--;f()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(d[l].substring(0,m)),t)}f()}else b(a)};EditorUi.prototype.loadFonts=function(a){null!=this.editor.fontCss&&null==this.editor.resolvedFontCss?this.embedCssFonts(this.editor.fontCss,mxUtils.bind(this,function(c){this.editor.resolvedFontCss=c;a()})):a()};EditorUi.prototype.embedExtFonts=
-function(a){var c=this.editor.graph.extFonts;if(null!=c&&0<c.length){var b="",d=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var f=mxUtils.bind(this,function(){0==d&&this.embedCssFonts(b,a)}),g=0;g<c.length;g++){var l=c[g].name,m=c[g].url;0==m.indexOf(Editor.GOOGLE_FONTS)?null==this.cachedGoogleFonts[m]?(d++,this.loadUrl(m,mxUtils.bind(this,function(a){this.cachedGoogleFonts[m]=a;b+=a;d--;f()}),mxUtils.bind(this,function(a){d--;b+="@import url("+m+");";f()}))):b+=this.cachedGoogleFonts[m]:
-b+='@font-face {font-family: "'+l+'";src: url("'+m+'");}'}f()}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,f,l,g,m,p,t,u,y,v,D,z,B){try{g=null!=g?g:!0;m=null!=m?m:!0;v=null!=v?v:this.editor.graph;D=null!=D?D:0;var c=t?null:v.background;c==mxConstants.NONE&&(c=null);null==c&&(c=f);null==c&&0==t&&(c="#ffffff");this.convertImages(v.getSvg(null,null,null,z,null,m,null,null,null,u),mxUtils.bind(this,function(d){var e=new Image;e.onload=mxUtils.bind(this,function(){try{var f=function(){mxClient.IS_SF?
-window.setTimeout(function(){q.drawImage(e,D/p,D/p);a(k)},0):(q.drawImage(e,D/p,D/p),a(k))},k=document.createElement("canvas"),n=parseInt(d.getAttribute("width")),m=parseInt(d.getAttribute("height"));p=null!=p?p:1;null!=b&&(p=g?Math.min(1,Math.min(3*b/(4*m),b/n)):b/n);n=Math.ceil(p*n)+2*D;m=Math.ceil(p*m)+2*D;k.setAttribute("width",n);k.setAttribute("height",m);var q=k.getContext("2d");null!=c&&(q.beginPath(),q.rect(0,0,n,m),q.fillStyle=c,q.fill());q.scale(p,p);if(B){var t=v.view,y=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor)))),
-y="data:image/svg+xml;base64,"+y,x=v.gridSize*t.gridSteps*p,C=v.getGraphBounds(),A=C.x*p,z=C.y*p,u=new Image;u.src=y;u.onload=function(){for(var a=-Math.round(x-mxUtils.mod(t.translate.x*p-A,x)),c=-Math.round(x-mxUtils.mod(t.translate.y*p-z,x));a<n;a+=x)for(var b=c;b<m;b+=x)q.drawImage(u,a/p,b/p);f()}}else f()}catch(la){null!=l&&l(la)}});e.onerror=function(a){null!=l&&l(a)};try{u&&this.editor.graph.addSvgShadow(d);var f=function(a){var c=document.createElement("style");c.setAttribute("type","text/css");
-c.innerHTML=a;a=d.getElementsByTagName("defs");0==a.length?(a=null!=svgDoc.createElementNS?svgDoc.createElementNS(mxConstants.NS_SVG,"defs"):svgDoc.createElement("defs"),null!=d.firstChild?d.insertBefore(a,d.firstChild):d.appendChild(a)):a=a[0];a.appendChild(c)},k=mxUtils.bind(this,function(){null!=this.editor.resolvedFontCss&&f(this.editor.resolvedFontCss);e.src=this.createSvgDataUri(mxUtils.getXml(d))});this.embedExtFonts(mxUtils.bind(this,function(a){null!=a&&f(a);this.loadFonts(k)}))}catch(P){null!=
-l&&l(P)}}),d,y)}catch(I){null!=l&&l(I)}};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,d=this;a.convert=function(c){if(null!=c){var e="http://"==c.substring(0,7)||"https://"==c.substring(0,8);e&&!navigator.onLine?c=d.svgBrokenImage.src:!e||c.substring(0,a.baseUrl.length)==a.baseUrl||d.crossOriginImages&&d.editor.isCorsEnabledForUrl(c)?"chrome-extension://"==c.substring(0,19)||mxClient.IS_CHROMEAPP||(c=b.apply(this,arguments)):c=PROXY_URL+
-"?url="+encodeURIComponent(c)}return c};return a};EditorUi.prototype.convertImages=function(a,b,d,f){null==f&&(f=this.createImageUrlConverter());var c=0,e=d||{};d=mxUtils.bind(this,function(d,k){for(var g=a.getElementsByTagName(d),l=0;l<g.length;l++)mxUtils.bind(this,function(d){try{if(null!=d){var g=f.convert(d.getAttribute(k));if(null!=g&&"data:"!=g.substring(0,5)){var l=e[g];null==l?(c++,this.convertImageToDataUri(g,function(f){null!=f&&(e[g]=f,d.setAttribute(k,f));c--;0==c&&b(a)})):d.setAttribute(k,
-l)}else null!=g&&d.setAttribute(k,g)}}catch(z){}})(g[l])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,f,l,g,m){try{var c=!m&&(f||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a));l=null!=l?l:!0;var e=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==
-typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var e=Array(a.length),f=0;f<a.length;f++)e[f]=String.fromCharCode(a[f]);e=e.join("")}g=null!=g?g:"data:image/png;base64,";e=g+this.base64Encode(e)}b(e)}}else null!=d&&d({message:mxResources.get("error")+" "+a.getStatus()},a)}),function(a){null!=d&&d({message:mxResources.get("error")+" "+a.getStatus()})},c,this.timeout,function(){l&&null!=d&&d({code:App.ERROR_TIMEOUT,retry:e})})});e()}catch(F){null!=d&&
-d(F)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){try{var c=!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b(this.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(d);c&&b(this.createSvgDataUri(a.getText()))}),function(){window.clearTimeout(d);c&&b(this.svgBrokenImage.src)});else{var e=new Image,f=this;this.crossOriginImages&&
-(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(d);if(c)try{var a=document.createElement("canvas"),k=a.getContext("2d");a.height=e.height;a.width=e.width;k.drawImage(e,0,0);b(a.toDataURL())}catch(t){b(f.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(d);c&&b(f.svgBrokenImage.src)};e.src=a}}catch(x){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,d,f,l){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var e=this.editor.graph;if(null!=a&&0<a.length){e.model.beginUpdate();
-try{var k=mxUtils.parseXml(a),n=this.editor.extractGraphModel(k.documentElement,null!=this.pages);if(null!=n&&"mxfile"==n.nodeName&&null!=this.pages){var m=n.getElementsByTagName("diagram");if(1==m.length)n=Editor.parseDiagramNode(m[0]);else if(1<m.length){a={};var k=[],q=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(n=Editor.parseDiagramNode(m[0]),f=!1,q=1);for(;q<m.length;q++){var p=m[q].getAttribute("id");m[q].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(m[q]));
-a[p]=m[q].getAttribute("id");var z=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[z+1]));e.model.execute(new ChangePage(this,u,u,z,!0));k.push(u)}this.updatePageLinks(a,k)}}null!=n&&"mxGraphModel"===n.nodeName&&(c=e.importGraphModel(n,b,d,f))}finally{e.model.endUpdate()}}}catch(L){if(l)throw L;this.handleError(L)}return c};EditorUi.prototype.updatePageLinks=function(a,b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=
-function(a,b){var c=document.createElement("div"),d=this.editor.graph,e=d.getLinkForCell(b);null!=e&&d.setLinkForCell(b,this.updatePageLink(a,e));if(d.isHtmlLabel(b)){c.innerHTML=d.getLabel(b);for(var f=c.getElementsByTagName("a"),l=!1,m=0;m<f.length;m++)e=f[m].getAttribute("href"),null!=e&&(f[m].setAttribute("href",this.updatePageLink(a,e)),l=!0);l&&d.labelChanged(b,c.innerHTML)}for(m=0;m<d.model.getChildCount(b);m++)this.updatePageLinksForCell(a,d.model.getChildAt(b,m))};EditorUi.prototype.updatePageLink=
-function(a,b){if("data:page/id,"==b.substring(0,13)){var c=a[b.substring(b.indexOf(",")+1)];b=null!=c?"data:page/id,"+c:null}else if("data:action/json,"==b.substring(0,17))try{var d=JSON.parse(b.substring(17));if(null!=d.actions){for(var e=0;e<d.actions.length;e++){var f=d.actions[e];null!=f.open&&"data:page/id,"==f.open.substring(0,13)&&(c=a[f.open.substring(f.open.indexOf(",")+1)],null!=c?f.open="data:page/id,"+c:delete f.open)}b="data:action/json,"+JSON.stringify(d)}}catch(x){}return b};EditorUi.prototype.isRemoteVisioFormat=
-function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,d,f){f=null!=f?f:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var c=this.isRemoteVisioFormat(f);try{var e="UNKNOWN-VISIO",k=f.lastIndexOf(".");0<=k&&k<f.length&&(e=f.substring(k+1).toUpperCase());EditorUi.logEvent({category:e+"-MS-IMPORT-FILE",action:"filename_"+f,label:c?
-"remote":"local"})}catch(F){}if(c)if(null!=VSD_CONVERT_URL){c=new FormData;c.append("file1",a,f);var l=new XMLHttpRequest;l.open("POST",VSD_CONVERT_URL);l.responseType="blob";this.addRemoteServiceSecurityCheck(l);l.onreadystatechange=mxUtils.bind(this,function(){if(4==l.readyState)if(200<=l.status&&299>=l.status)try{var a=l.response;if("text/xml"==a.type){var c=new FileReader;c.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(D){d({message:mxResources.get("errorLoadingFile")})}});
-c.readAsText(a)}else this.doImportVisio(a,b,d,f)}catch(E){d(E)}else d({})});l.send(c)}else d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else try{this.doImportVisio(a,b,d,f)}catch(F){d(F)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.importGraphML=
+a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],f=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:f.apply(this,arguments)}}}null!=c&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(l){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){try{var c=this.editor.graph,f=null;if(null!=
+d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,!0),c),f=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),e=c.getGlobalVariable,g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(c.container);
+c.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==f&&(f=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var e=d.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"tEXt","mxfile",encodeURIComponent(f));a(e.substring(e.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(E){null!=b&&b(E)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)}catch(A){null!=
+b&&b(A)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,e,k,l,m){m=b.background;m==mxConstants.NONE&&(m=null);l=b.getSvg(m,null,null,null,null,l);b.shadowVisible&&b.addSvgShadow(l);null!=a&&l.setAttribute("content",a);null!=d&&l.setAttribute("resource",d);if(null!=k)this.convertImages(l,mxUtils.bind(this,function(a){k((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(e?
+"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(l)};EditorUi.prototype.exportImage=function(a,b,d,e,k,l,m,p,q,u,z){q=null!=q?q:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,
+k?this.getFileData(!0,null,null,null,d,p):null,q,null==this.pages||0==this.pages.length,z)}catch(v){"Invalid image"==v.message?this.downloadFile(q):this.handleError(v)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,l,m,u)}catch(D){this.spinner.stop(),this.handleError(D)}}};EditorUi.prototype.embedCssFonts=function(a,b){function c(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")}
+var d=a.split("url("),f=0;null==this.cachedFonts&&(this.cachedFonts={});var e=mxUtils.bind(this,function(){if(0==f){for(var a=[d[0]],e=1;e<d.length;e++){var g=d[e].indexOf(")");a.push('url("');a.push(this.cachedFonts[c(d[e].substring(0,g))]);a.push('"'+d[e].substring(g))}b(a.join(""))}});if(0<d.length){for(var k=1;k<d.length;k++){var m=d[k].indexOf(")"),q=null,p=d[k].indexOf("format(",m);0<p&&(q=c(d[k].substring(p+7,d[k].indexOf(")",p))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]=
+a;f++;var c="application/x-font-ttf";if("svg"==q||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==q||"embedded-opentype"==q||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==q||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==q||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==q||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==q||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&
+!this.editor.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){this.cachedFonts[a]=c;f--;e()}),mxUtils.bind(this,function(a){f--;e()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(d[k].substring(0,m)),q)}e()}else b(a)};EditorUi.prototype.loadFonts=function(a){null!=this.editor.fontCss&&null==this.editor.resolvedFontCss?this.embedCssFonts(this.editor.fontCss,mxUtils.bind(this,function(c){this.editor.resolvedFontCss=c;a()})):a()};EditorUi.prototype.embedExtFonts=
+function(a){var c=this.editor.graph.extFonts;if(null!=c&&0<c.length){var b="",d=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==d&&this.embedCssFonts(b,a)}),l=0;l<c.length;l++){var k=c[l].name,m=c[l].url;0==m.indexOf(Editor.GOOGLE_FONTS)?null==this.cachedGoogleFonts[m]?(d++,this.loadUrl(m,mxUtils.bind(this,function(a){this.cachedGoogleFonts[m]=a;b+=a;d--;e()}),mxUtils.bind(this,function(a){d--;b+="@import url("+m+");";e()}))):b+=this.cachedGoogleFonts[m]:
+b+='@font-face {font-family: "'+k+'";src: url("'+m+'");}'}e()}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,k,l,m,p,q,u,z,x,D,v,B){try{l=null!=l?l:!0;m=null!=m?m:!0;x=null!=x?x:this.editor.graph;D=null!=D?D:0;var c=q?null:x.background;c==mxConstants.NONE&&(c=null);null==c&&(c=e);null==c&&0==q&&(c="#ffffff");this.convertImages(x.getSvg(null,null,null,v,null,m,null,null,null,u),mxUtils.bind(this,function(d){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var e=function(){mxClient.IS_SF?
+window.setTimeout(function(){q.drawImage(f,D/p,D/p);a(g)},0):(q.drawImage(f,D/p,D/p),a(g))},g=document.createElement("canvas"),n=parseInt(d.getAttribute("width")),m=parseInt(d.getAttribute("height"));p=null!=p?p:1;null!=b&&(p=l?Math.min(1,Math.min(3*b/(4*m),b/n)):b/n);n=Math.ceil(p*n)+2*D;m=Math.ceil(p*m)+2*D;g.setAttribute("width",n);g.setAttribute("height",m);var q=g.getContext("2d");null!=c&&(q.beginPath(),q.rect(0,0,n,m),q.fillStyle=c,q.fill());q.scale(p,p);if(B){var t=x.view,z=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor)))),
+z="data:image/svg+xml;base64,"+z,y=x.gridSize*t.gridSteps*p,A=x.getGraphBounds(),v=A.x*p,C=A.y*p,u=new Image;u.src=z;u.onload=function(){for(var a=-Math.round(y-mxUtils.mod(t.translate.x*p-v,y)),c=-Math.round(y-mxUtils.mod(t.translate.y*p-C,y));a<n;a+=y)for(var b=c;b<m;b+=y)q.drawImage(u,a/p,b/p);e()}}else e()}catch(ga){null!=k&&k(ga)}});f.onerror=function(a){null!=k&&k(a)};try{u&&this.editor.graph.addSvgShadow(d);var e=function(a){var c=document.createElement("style");c.setAttribute("type","text/css");
+c.innerHTML=a;a=d.getElementsByTagName("defs");0==a.length?(a=null!=svgDoc.createElementNS?svgDoc.createElementNS(mxConstants.NS_SVG,"defs"):svgDoc.createElement("defs"),null!=d.firstChild?d.insertBefore(a,d.firstChild):d.appendChild(a)):a=a[0];a.appendChild(c)},g=mxUtils.bind(this,function(){null!=this.editor.resolvedFontCss&&e(this.editor.resolvedFontCss);f.src=this.createSvgDataUri(mxUtils.getXml(d))});this.embedExtFonts(mxUtils.bind(this,function(a){null!=a&&e(a);this.loadFonts(g)}))}catch(N){null!=
+k&&k(N)}}),d,z)}catch(J){null!=k&&k(J)}};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,d=this;a.convert=function(c){if(null!=c){var f="http://"==c.substring(0,7)||"https://"==c.substring(0,8);f&&!navigator.onLine?c=d.svgBrokenImage.src:!f||c.substring(0,a.baseUrl.length)==a.baseUrl||d.crossOriginImages&&d.editor.isCorsEnabledForUrl(c)?"chrome-extension://"==c.substring(0,19)||mxClient.IS_CHROMEAPP||(c=b.apply(this,arguments)):c=PROXY_URL+
+"?url="+encodeURIComponent(c)}return c};return a};EditorUi.prototype.convertImages=function(a,b,d,e){null==e&&(e=this.createImageUrlConverter());var c=0,f=d||{};d=mxUtils.bind(this,function(d,g){for(var l=a.getElementsByTagName(d),k=0;k<l.length;k++)mxUtils.bind(this,function(d){try{if(null!=d){var l=e.convert(d.getAttribute(g));if(null!=l&&"data:"!=l.substring(0,5)){var k=f[l];null==k?(c++,this.convertImageToDataUri(l,function(e){null!=e&&(f[l]=e,d.setAttribute(g,e));c--;0==c&&b(a)})):d.setAttribute(g,
+k)}else null!=l&&d.setAttribute(g,l)}}catch(v){}})(l[k])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,e,k,l,m){try{var c=!m&&(e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a));k=null!=k?k:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var f=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==
+typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),e=0;e<a.length;e++)f[e]=String.fromCharCode(a[e]);f=f.join("")}l=null!=l?l:"data:image/png;base64,";f=l+this.base64Encode(f)}b(f)}}else null!=d&&d({message:mxResources.get("error")+" "+a.getStatus()},a)}),function(a){null!=d&&d({message:mxResources.get("error")+" "+a.getStatus()})},c,this.timeout,function(){k&&null!=d&&d({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(E){null!=d&&
+d(E)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){try{var c=!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b(this.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(d);c&&b(this.createSvgDataUri(a.getText()))}),function(){window.clearTimeout(d);c&&b(this.svgBrokenImage.src)});else{var f=new Image,e=this;this.crossOriginImages&&
+(f.crossOrigin="anonymous");f.onload=function(){window.clearTimeout(d);if(c)try{var a=document.createElement("canvas"),g=a.getContext("2d");a.height=f.height;a.width=f.width;g.drawImage(f,0,0);b(a.toDataURL())}catch(q){b(e.svgBrokenImage.src)}};f.onerror=function(){window.clearTimeout(d);c&&b(e.svgBrokenImage.src)};f.src=a}}catch(y){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,d,e,k){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){f.model.beginUpdate();
+try{var g=mxUtils.parseXml(a),n=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=n&&"mxfile"==n.nodeName&&null!=this.pages){var m=n.getElementsByTagName("diagram");if(1==m.length)n=Editor.parseDiagramNode(m[0]);else if(1<m.length){a={};var g=[],t=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(n=Editor.parseDiagramNode(m[0]),e=!1,t=1);for(;t<m.length;t++){var p=m[t].getAttribute("id");m[t].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(m[t]));
+a[p]=m[t].getAttribute("id");var v=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[v+1]));f.model.execute(new ChangePage(this,u,u,v,!0));g.push(u)}this.updatePageLinks(a,g)}}null!=n&&"mxGraphModel"===n.nodeName&&(c=f.importGraphModel(n,b,d,e))}finally{f.model.endUpdate()}}}catch(H){if(k)throw H;this.handleError(H)}return c};EditorUi.prototype.updatePageLinks=function(a,b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=
+function(a,b){var c=document.createElement("div"),d=this.editor.graph,f=d.getLinkForCell(b);null!=f&&d.setLinkForCell(b,this.updatePageLink(a,f));if(d.isHtmlLabel(b)){c.innerHTML=d.getLabel(b);for(var e=c.getElementsByTagName("a"),k=!1,m=0;m<e.length;m++)f=e[m].getAttribute("href"),null!=f&&(e[m].setAttribute("href",this.updatePageLink(a,f)),k=!0);k&&d.labelChanged(b,c.innerHTML)}for(m=0;m<d.model.getChildCount(b);m++)this.updatePageLinksForCell(a,d.model.getChildAt(b,m))};EditorUi.prototype.updatePageLink=
+function(a,b){if("data:page/id,"==b.substring(0,13)){var c=a[b.substring(b.indexOf(",")+1)];b=null!=c?"data:page/id,"+c:null}else if("data:action/json,"==b.substring(0,17))try{var d=JSON.parse(b.substring(17));if(null!=d.actions){for(var f=0;f<d.actions.length;f++){var e=d.actions[f];null!=e.open&&"data:page/id,"==e.open.substring(0,13)&&(c=a[e.open.substring(e.open.indexOf(",")+1)],null!=c?e.open="data:page/id,"+c:delete e.open)}b="data:action/json,"+JSON.stringify(d)}}catch(y){}return b};EditorUi.prototype.isRemoteVisioFormat=
+function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,d,e){e=null!=e?e:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var c=this.isRemoteVisioFormat(e);try{var f="UNKNOWN-VISIO",g=e.lastIndexOf(".");0<=g&&g<e.length&&(f=e.substring(g+1).toUpperCase());EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+e,label:c?
+"remote":"local"})}catch(E){}if(c)if(null!=VSD_CONVERT_URL){c=new FormData;c.append("file1",a,e);var k=new XMLHttpRequest;k.open("POST",VSD_CONVERT_URL);k.responseType="blob";this.addRemoteServiceSecurityCheck(k);k.onreadystatechange=mxUtils.bind(this,function(){if(4==k.readyState)if(200<=k.status&&299>=k.status)try{var a=k.response;if("text/xml"==a.type){var c=new FileReader;c.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(D){d({message:mxResources.get("errorLoadingFile")})}});
+c.readAsText(a)}else this.doImportVisio(a,b,d,e)}catch(G){d(G)}else d({})});k.send(c)}else d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else try{this.doImportVisio(a,b,d,e)}catch(E){d(E)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.importGraphML=
function(a,b,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,d)}catch(n){d(n)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,
-function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(e){this.handleError(e)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,
+function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(f){this.handleError(f)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,
b,d){var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(n){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(n){null!=window.console&&console.error(n),d(n)}}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(c,
-0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",c):mxscript("js/extensions.min.js",c))};EditorUi.prototype.generatePlantUmlImage=function(a,b,d,f){function c(a,c,b){c1=a>>2;c2=(a&3)<<4|c>>4;c3=(c&15)<<2|b>>6;c4=b&63;r="";r+=e(c1&63);r+=e(c2&63);r+=e(c3&63);return r+=e(c4&63)}function e(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"}var k=
-new XMLHttpRequest;k.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+c(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+c(a.charCodeAt(i),0,0):r+c(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(pako.deflateRaw(a,{to:"string"})),!0);"txt"!=b&&(k.responseType="blob");k.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==b)d(this.response);else{var c=new FileReader;c.readAsDataURL(this.response);
-c.onloadend=function(a){var b=new Image;b.onload=function(){var a=b.width,e=b.height;if(0==a&&0==e){var f=c.result,k=f.indexOf(","),f=decodeURIComponent(escape(atob(f.substring(k+1)))),f=mxUtils.parseXml(f).getElementsByTagName("svg");0<f.length&&(a=parseFloat(f[0].getAttribute("width")),e=parseFloat(f[0].getAttribute("height")))}d(c.result,a,e)};b.src=c.result};c.onerror=function(a){f(a)}}else f(a)};k.onerror=function(a){f(a)};k.send()};EditorUi.prototype.insertAsPreText=function(a,b,d){var c=this.editor.graph,
-e=null;c.getModel().beginUpdate();try{e=c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=left;verticalAlign=top;"),c.updateCellSize(e,!0)}finally{c.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,b,d,f,l,g,m){g=null!=g?g:!0;m=null!=m?m:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==
-a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(l||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var e=this.extractGraphModelFromPng(a),k=this.importXml(e,b,d,g,!0);if(0<k.length)return k}if("data:image/svg+xml;"==a.substring(0,19))try{if(e=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(e=a.substring(a.indexOf(",")+
-1),e=window.atob&&!mxClient.IS_SF?atob(e):Base64.decode(e,!0)):e=decodeURIComponent(a.substring(a.indexOf(",")+1)),k=this.importXml(e,b,d,g,!0),0<k.length)return k}catch(y){}this.loadImage(a,mxUtils.bind(this,function(e){if("data:"==a.substring(0,5))this.resizeImage(e,a,mxUtils.bind(this,function(a,e,f){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+
-";"))}),m,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),k=Math.round(e.width*f);e=Math.round(e.height*f);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),k,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var e=null;c.getModel().beginUpdate();try{e=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d),
-1,1,"text;"+(f?"html=1;":"")),c.updateCellSize(e),c.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{c.getModel().endUpdate()}c.setSelectionCell(e)}))}else{a=Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,g);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(a){this.editor.graph.setSelectionCells(this.importXml(a,b,d,g))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{c=this.editor.graph;
-l=null;c.getModel().beginUpdate();try{l=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;"+(f?"html=1;":"")),c.fireEvent(new mxEventObject("textInserted","cells",[l])),"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a)),a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"..."),l.value=a,c.updateCellSize(l),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i.test(l.value)&&
-c.setLinkForCell(l,l.value),l.geometry.width+=c.gridSize,l.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[l]}}return[]};EditorUi.prototype.formatFileSize=function(a){var c=-1;do a/=1024,c++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[c]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var c=a.indexOf(";");0<c&&(a=a.substring(0,c)+a.substring(a.indexOf(",",c+1)))}return a};EditorUi.prototype.isRemoteFileFormat=
+0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",c):mxscript("js/extensions.min.js",c))};EditorUi.prototype.generatePlantUmlImage=function(a,b,d,e){function c(a,c,b){c1=a>>2;c2=(a&3)<<4|c>>4;c3=(c&15)<<2|b>>6;c4=b&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"}var g=
+new XMLHttpRequest;g.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+c(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+c(a.charCodeAt(i),0,0):r+c(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(pako.deflateRaw(a,{to:"string"})),!0);"txt"!=b&&(g.responseType="blob");g.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==b)d(this.response);else{var c=new FileReader;c.readAsDataURL(this.response);
+c.onloadend=function(a){var b=new Image;b.onload=function(){var a=b.width,f=b.height;if(0==a&&0==f){var e=c.result,g=e.indexOf(","),e=decodeURIComponent(escape(atob(e.substring(g+1)))),e=mxUtils.parseXml(e).getElementsByTagName("svg");0<e.length&&(a=parseFloat(e[0].getAttribute("width")),f=parseFloat(e[0].getAttribute("height")))}d(c.result,a,f)};b.src=c.result};c.onerror=function(a){e(a)}}else e(a)};g.onerror=function(a){e(a)};g.send()};EditorUi.prototype.insertAsPreText=function(a,b,d){var c=this.editor.graph,
+f=null;c.getModel().beginUpdate();try{f=c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=left;verticalAlign=top;"),c.updateCellSize(f,!0)}finally{c.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=function(a,b,d,e,k,l,m){l=null!=l?l:!0;m=null!=m?m:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==
+a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var f=this.extractGraphModelFromPng(a),g=this.importXml(f,b,d,l,!0);if(0<g.length)return g}if("data:image/svg+xml;"==a.substring(0,19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+
+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1)),g=this.importXml(f,b,d,l,!0),0<g.length)return g}catch(z){}this.loadImage(a,mxUtils.bind(this,function(f){if("data:"==a.substring(0,5))this.resizeImage(f,a,mxUtils.bind(this,function(a,f,e){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),f,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+
+";"))}),m,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),g=Math.round(f.width*e);f=Math.round(f.height*e);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),g,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d),
+1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),c.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a=Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,l);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(a){this.editor.graph.setSelectionCells(this.importXml(a,b,d,l))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{c=this.editor.graph;
+k=null;c.getModel().beginUpdate();try{k=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.fireEvent(new mxEventObject("textInserted","cells",[k])),"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a)),a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"..."),k.value=a,c.updateCellSize(k),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i.test(k.value)&&
+c.setLinkForCell(k,k.value),k.geometry.width+=c.gridSize,k.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=
function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&('{"state":"{\\"Properties\\":'==a.substring(0,26)||'{"Properties":'==a.substring(0,14))};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport){if(null==this.importFileInputElt){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){null!=c.files&&(this.importFiles(c.files,
-null,null,this.maxImageSize),c.type="",c.type="file",c.value="")}));c.style.display="none";document.body.appendChild(c);this.importFileInputElt=c}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";if(!b){var d=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,c){if(null!=c&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(c)){var b=new Blob([a],
-{type:"application/octet-stream"});this.importVisio(b,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,c)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var e=this.dialog,f=e.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;f.apply(e,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=
-function(a,b,d){var c=this,e=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(e){if(0==Object.keys(e.files).length)d();else{var f=0,k,g=!1;e.forEach(function(a,c){var e=c.name.toLowerCase();"diagram/diagram.xml"==e?(g=!0,c.async("string").then(function(a){0==a.indexOf("<mxfile ")?b(a):d()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>f&&(f=e,k=c))});0<f?k.async("string").then(function(e){!c.isOffline()&&(new XMLHttpRequest).upload&&
-c.isRemoteFileFormat(e,a.name)?c.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):d())}),a.name):d()}):g||d()}},function(a){d(a)}):d()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,b,d,f,l,g,m,p,t,u,y){u=null!=u?u:!0;var c=!1,e=null,k=mxUtils.bind(this,function(a){var c=
-null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,m)):c=this.importXml(a,d,f,u);null!=p&&p(c)});"image"==b.substring(0,5)?(t=!1,"image/png"==b.substring(0,9)&&(b=y?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(e=this.importXml(b,d,f,u),t=!0)),t||(b=this.editor.graph,y=a.indexOf(";"),0<y&&(a=a.substring(0,y)+a.substring(a.indexOf(",",y+1))),u&&b.isGridEnabled()&&(d=b.snap(d),f=b.snap(f)),e=[b.insertVertex(null,null,"",d,f,l,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-a+";")])):/(\.*<graphml )/.test(a)?(c=!0,this.importGraphML(a,k)):null!=t&&null!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m)||/(\.vs(x|sx?))($|\?)/i.test(m))?(c=!0,this.importVisio(t,k)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,m)?(c=!0,this.parseFile(null!=t?t:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?k(a.responseText):null!=p&&p(null))}),m)):0==a.indexOf("PK")&&null!=t?(c=!0,this.importZipFile(t,
-k,mxUtils.bind(this,function(){e=this.insertTextAt(this.validateFileData(a),d,f,!0,null,u);p(e)}))):/(\.v(sd|dx))($|\?)/i.test(m)||/(\.vs(s|x))($|\?)/i.test(m)||(e=this.insertTextAt(this.validateFileData(a),d,f,!0,null,u));c||null==p||p(e);return e};EditorUi.prototype.base64Encode=function(a){for(var c="",b=0,d=a.length,f,g,l;b<d;){f=a.charCodeAt(b++)&255;if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&
-3)<<4);c+="==";break}g=a.charCodeAt(b++);if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(g&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);c+="=";break}l=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&
-3)<<4|(g&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(l&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l&63)}return c};EditorUi.prototype.importFiles=function(a,b,d,f,l,g,m,p,t,u,y,v){b=null!=b?b:0;d=null!=d?d:0;f=null!=f?f:this.maxImageSize;u=null!=u?u:this.maxImageBytes;var c=null!=b&&null!=d,e=!0,k=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=y||this.resampleThreshold,q=0;q<a.length;q++)if("image/"==a[q].type.substring(0,
-6)&&a[q].size>n){k=!0;break}var x=mxUtils.bind(this,function(){var k=this.editor.graph,n=k.gridSize;l=null!=l?l:mxUtils.bind(this,function(a,b,d,e,f,k,g,l,n){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,d,e,f,k,g,l,n,c,v)});g=null!=g?g:mxUtils.bind(this,function(a){k.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,t=q,x=[],z=mxUtils.bind(this,function(a,
-b){x[a]=b;if(0==--t){this.spinner.stop();if(null!=p)p(x);else{var c=[];k.getModel().beginUpdate();try{for(var d=0;d<x.length;d++){var e=x[d]();null!=e&&(c=c.concat(e))}}finally{k.getModel().endUpdate()}}g(c)}}),A=0;A<q;A++)mxUtils.bind(this,function(c){var g=a[c];if(null!=g){var q=new FileReader;q.onload=mxUtils.bind(this,function(a){if(null==m||m(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var q=a.target.result,t=q.indexOf(","),p=decodeURIComponent(escape(atob(q.substring(t+
-1)))),x=mxUtils.parseXml(p),p=x.getElementsByTagName("svg");if(0<p.length){var p=p[0],C=v?null:p.getAttribute("content");null!=C&&"<"!=C.charAt(0)&&"%"!=C.charAt(0)&&(C=unescape(window.atob?atob(C):Base64.decode(C,!0)));null!=C&&"%"==C.charAt(0)&&(C=decodeURIComponent(C));null==C||"<mxfile "!==C.substring(0,8)&&"<mxGraphModel "!==C.substring(0,14)?z(c,mxUtils.bind(this,function(){try{if(q.substring(0,t+1),null!=x){var a=x.getElementsByTagName("svg");if(0<a.length){var e=a[0],m=e.getAttribute("width"),
-p=e.getAttribute("height"),m=null!=m&&"%"!=m.charAt(m.length-1)?parseFloat(m):NaN,p=null!=p&&"%"!=p.charAt(p.length-1)?parseFloat(p):NaN,y=e.getAttribute("viewBox");if(null==y||0==y.length)e.setAttribute("viewBox","0 0 "+m+" "+p);else if(isNaN(m)||isNaN(p)){var C=y.split(" ");3<C.length&&(m=parseFloat(C[2]),p=parseFloat(C[3]))}q=this.createSvgDataUri(mxUtils.getXml(e));var u=Math.min(1,Math.min(f/Math.max(1,m)),f/Math.max(1,p)),z=l(q,g.type,b+c*n,d+c*n,Math.max(1,Math.round(m*u)),Math.max(1,Math.round(p*
-u)),g.name);if(isNaN(m)||isNaN(p)){var A=new Image;A.onload=mxUtils.bind(this,function(){m=Math.max(1,A.width);p=Math.max(1,A.height);z[0].geometry.width=m;z[0].geometry.height=p;e.setAttribute("viewBox","0 0 "+m+" "+p);q=this.createSvgDataUri(mxUtils.getXml(e));var a=q.indexOf(";");0<a&&(q=q.substring(0,a)+q.substring(q.indexOf(",",a+1)));k.setCellStyles("image",q,[z[0]])});A.src=this.createSvgDataUri(mxUtils.getXml(e))}return z}}}catch(ca){}return null})):z(c,mxUtils.bind(this,function(){return l(C,
-"text/xml",b+c*n,d+c*n,0,0,g.name)}))}else z(c,mxUtils.bind(this,function(){return null}))}else{p=!1;if("image/png"==g.type){var A=v?null:this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var D=new Image;D.src=a.target.result;z(c,mxUtils.bind(this,function(){return l(A,"text/xml",b+c*n,d+c*n,D.width,D.height,g.name)}));p=!0}}p||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
-mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,a.target.result,mxUtils.bind(this,function(k,m,q){z(c,mxUtils.bind(this,function(){if(null!=k&&k.length<u){var p=e&&this.isResampleImage(a.target.result,y)?Math.min(1,Math.min(f/m,f/q)):1;return l(k,g.type,b+c*n,d+c*n,Math.round(m*p),Math.round(q*p),g.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),e,f,y)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else l(a.target.result,g.type,b+c*n,d+c*n,240,160,g.name,function(a){z(c,function(){return a})},g)});/(\.v(dx|sdx?))($|\?)/i.test(g.name)||/(\.vs(x|sx?))($|\?)/i.test(g.name)?l(null,g.type,b+c*n,d+c*n,240,160,g.name,function(a){z(c,function(){return a})},g):"image"==g.type.substring(0,5)?q.readAsDataURL(g):q.readAsText(g)}})(A)});if(k){k=[];for(q=0;q<a.length;q++)k.push(a[q]);
-a=k;this.confirmImageResize(function(a){e=a;x()},t)}else x()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(d,e){if(d||b)mxSettings.setResizeImages(d?e:null),mxSettings.save();c();a(e)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){e(a,!0)},function(a){e(a,
-!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,d)};EditorUi.prototype.parseFile=function(a,b,d){d=null!=d?d:a.name;var c=new FormData;c.append("format","xml");c.append("upfile",a,d);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};
-e.send(c);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(g){}};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,f,l,g){l=null!=l?l:this.maxImageSize;var c=Math.max(1,a.width),e=Math.max(1,a.height);if(f&&this.isResampleImage(b,g))try{var k=Math.max(c/l,e/l);if(1<k){var n=Math.round(c/k),m=Math.round(e/k),p=document.createElement("canvas");p.width=n;p.height=m;p.getContext("2d").drawImage(a,
-0,0,n,m);var q=p.toDataURL();if(q.length<b.length){var u=document.createElement("canvas");u.width=n;u.height=m;var v=u.toDataURL();q!==v&&(b=q,c=n,e=m)}}}catch(O){}d(b,c,e)};EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var l=d,m=0;8>m;m++)l=1==(l&1)?3988292384^l>>>1:l>>>1,EditorUi.prototype.crcTable[d]=l;EditorUi.prototype.updateCRC=function(a,b,d,f){for(var c=0;c<f;c++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(d+c))&255]^a>>>8;return a};EditorUi.prototype.crc32=function(a){this.crcTable=
-this.crcTable||this.createCrcTable();for(var b=-1,c=0;c<a.length;c++)b=b>>>8^this.crcTable[(b^a.charCodeAt(c))&255];return(b^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,f,l){function c(a,b){var c=m;m+=b;return a.substring(c,m)}function e(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function k(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,
-!0);var m=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=l&&l();else if(c(a,4),"IHDR"!=c(a,4))null!=l&&l();else{c(a,17);l=a.substring(0,m);do{var n=e(a);if("IDAT"==c(a,4)){l=a.substring(0,m-8);"pHYs"==b&&"dpi"==d?(d=Math.round(f/.0254),d=k(d)+k(d)+String.fromCharCode(1)):d=d+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+f;f=4294967295;f=this.updateCRC(f,b,0,4);f=this.updateCRC(f,d,0,d.length);l+=k(d.length)+b+d+k(f^4294967295);l+=a.substring(m-8,
-a.length);break}l+=a.substring(m-8,m-4+n);c(a,n);c(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?btoa(l):Base64.encode(l,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,d){try{var c=new Image;c.onload=function(){b(c)};null!=d&&(c.onerror=d);c.src=a}catch(n){if(null!=d)d(n);else throw n;}};var p=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&
-!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph,d=b.cellEditor.startEditing;b.cellEditor.startEditing=function(c,e){var f=this.graph.getAttributeForCell(c,"plantUmlData");if(null!=f){var g=JSON.parse(f),f=new TextareaDialog(a,mxResources.get("plantUml")+":",g.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(d,g.format,function(e,f,k){a.spinner.stop();
-b.getModel().beginUpdate();try{if("txt"==g.format)b.labelChanged(c,"<pre>"+e+"</pre>"),b.updateCellSize(c,!0);else{b.setCellStyles("image",a.convertDataUri(e),[c]);var l=b.model.getGeometry(c);null!=l&&(l=l.clone(),l.width=f,l.height=k,b.cellsResized([c],[l],!1))}b.setAttributeForCell(c,"plantUmlData",JSON.stringify({data:d,format:g.format}))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(f.container,420,300,!0,!0);f.init()}else d.apply(this,arguments)};
-b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(L){a.handleError(L)}return c};var f=this.clearDefaultStyle;this.clearDefaultStyle=function(){f.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var l=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=
-a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0<c&&(b+=(0<b.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return l.apply(this,arguments)};var g=b.addClickHandler;b.addClickHandler=function(a,c,d){var e=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&
-mxEvent.consume(a);null!=e&&e(a,c)};g.call(this,a,c,d)};p.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var m=b.getExportVariables;b.getExportVariables=function(){var b=m.apply(this,arguments);b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=
-a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var u=b.getGlobalVariable;b.getGlobalVariable=function(b){return"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages?a.pages.length:1:u.apply(this,arguments)};var t=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var e=c.getAttribute("href");
-if(null==e||!b.isCustomLink(e)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))t.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var v=this.actions.get("print");v.setEnabled(!mxClient.IS_IOS||!navigator.standalone);v.visible=v.isEnabled();if(!this.editor.chromeless||
+null,null,this.maxImageSize),c.type="",c.type="file",c.value="")}));c.style.display="none";document.body.appendChild(c);this.importFileInputElt=c}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";if(!b){var d=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){if(null!=b&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(b)){var c=new Blob([a],
+{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,b)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var f=this.dialog,e=f.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;e.apply(f,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=
+function(a,b,d){var c=this,f=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(f){if(0==Object.keys(f.files).length)d();else{var e=0,g,l=!1;f.forEach(function(a,c){var f=c.name.toLowerCase();"diagram/diagram.xml"==f?(l=!0,c.async("string").then(function(a){0==a.indexOf("<mxfile ")?b(a):d()})):0==f.indexOf("versions/")&&(f=parseInt(f.substr(9)),f>e&&(e=f,g=c))});0<e?g.async("string").then(function(f){!c.isOffline()&&(new XMLHttpRequest).upload&&
+c.isRemoteFileFormat(f,a.name)?c.parseFile(new Blob([f],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):d())}),a.name):d()}):l||d()}},function(a){d(a)}):d()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importFile=function(a,b,d,e,k,l,m,p,q,u,z){u=null!=u?u:!0;var c=!1,f=null,g=mxUtils.bind(this,function(a){var b=
+null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,m)):b=this.importXml(a,d,e,u);null!=p&&p(b)});"image"==b.substring(0,5)?(q=!1,"image/png"==b.substring(0,9)&&(b=z?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,u),q=!0)),q||(b=this.editor.graph,z=a.indexOf(";"),0<z&&(a=a.substring(0,z)+a.substring(a.indexOf(",",z+1))),u&&b.isGridEnabled()&&(d=b.snap(d),e=b.snap(e)),f=[b.insertVertex(null,null,"",d,e,k,l,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+a+";")])):/(\.*<graphml )/.test(a)?(c=!0,this.importGraphML(a,g)):null!=q&&null!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m)||/(\.vs(x|sx?))($|\?)/i.test(m))?(c=!0,this.importVisio(q,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,m)?(c=!0,this.parseFile(null!=q?q:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(a.responseText):null!=p&&p(null))}),m)):0==a.indexOf("PK")&&null!=q?(c=!0,this.importZipFile(q,
+g,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,u);p(f)}))):/(\.v(sd|dx))($|\?)/i.test(m)||/(\.vs(s|x))($|\?)/i.test(m)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,u));c||null==p||p(f);return f};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,l,k;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
+3)<<4);b+="==";break}l=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(l&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2);b+="=";break}k=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
+3)<<4|(l&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2|(k&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return b};EditorUi.prototype.importFiles=function(a,b,d,e,k,l,m,p,q,u,z,x){b=null!=b?b:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;u=null!=u?u:this.maxImageBytes;var c=null!=b&&null!=d,f=!0,g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=z||this.resampleThreshold,t=0;t<a.length;t++)if("image/"==a[t].type.substring(0,
+6)&&a[t].size>n){g=!0;break}var y=mxUtils.bind(this,function(){var g=this.editor.graph,n=g.gridSize;k=null!=k?k:mxUtils.bind(this,function(a,b,d,f,e,g,l,k,n){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,b,d,f,e,g,l,k,n,c,x)});l=null!=l?l:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,t=q,y=[],v=mxUtils.bind(this,function(a,
+b){y[a]=b;if(0==--t){this.spinner.stop();if(null!=p)p(y);else{var c=[];g.getModel().beginUpdate();try{for(var d=0;d<y.length;d++){var f=y[d]();null!=f&&(c=c.concat(f))}}finally{g.getModel().endUpdate()}}l(c)}}),A=0;A<q;A++)mxUtils.bind(this,function(c){var l=a[c];if(null!=l){var q=new FileReader;q.onload=mxUtils.bind(this,function(a){if(null==m||m(l))if("image/"==l.type.substring(0,6))if("image/svg"==l.type.substring(0,9)){var q=a.target.result,p=q.indexOf(","),t=decodeURIComponent(escape(atob(q.substring(p+
+1)))),y=mxUtils.parseXml(t),t=y.getElementsByTagName("svg");if(0<t.length){var t=t[0],C=x?null:t.getAttribute("content");null!=C&&"<"!=C.charAt(0)&&"%"!=C.charAt(0)&&(C=unescape(window.atob?atob(C):Base64.decode(C,!0)));null!=C&&"%"==C.charAt(0)&&(C=decodeURIComponent(C));null==C||"<mxfile "!==C.substring(0,8)&&"<mxGraphModel "!==C.substring(0,14)?v(c,mxUtils.bind(this,function(){try{if(q.substring(0,p+1),null!=y){var a=y.getElementsByTagName("svg");if(0<a.length){var f=a[0],m=f.getAttribute("width"),
+t=f.getAttribute("height"),m=null!=m&&"%"!=m.charAt(m.length-1)?parseFloat(m):NaN,t=null!=t&&"%"!=t.charAt(t.length-1)?parseFloat(t):NaN,z=f.getAttribute("viewBox");if(null==z||0==z.length)f.setAttribute("viewBox","0 0 "+m+" "+t);else if(isNaN(m)||isNaN(t)){var v=z.split(" ");3<v.length&&(m=parseFloat(v[2]),t=parseFloat(v[3]))}q=this.createSvgDataUri(mxUtils.getXml(f));var C=Math.min(1,Math.min(e/Math.max(1,m)),e/Math.max(1,t)),u=k(q,l.type,b+c*n,d+c*n,Math.max(1,Math.round(m*C)),Math.max(1,Math.round(t*
+C)),l.name);if(isNaN(m)||isNaN(t)){var A=new Image;A.onload=mxUtils.bind(this,function(){m=Math.max(1,A.width);t=Math.max(1,A.height);u[0].geometry.width=m;u[0].geometry.height=t;f.setAttribute("viewBox","0 0 "+m+" "+t);q=this.createSvgDataUri(mxUtils.getXml(f));var a=q.indexOf(";");0<a&&(q=q.substring(0,a)+q.substring(q.indexOf(",",a+1)));g.setCellStyles("image",q,[u[0]])});A.src=this.createSvgDataUri(mxUtils.getXml(f))}return u}}}catch(da){}return null})):v(c,mxUtils.bind(this,function(){return k(C,
+"text/xml",b+c*n,d+c*n,0,0,l.name)}))}else v(c,mxUtils.bind(this,function(){return null}))}else{t=!1;if("image/png"==l.type){var A=x?null:this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var D=new Image;D.src=a.target.result;v(c,mxUtils.bind(this,function(){return k(A,"text/xml",b+c*n,d+c*n,D.width,D.height,l.name)}));t=!0}}t||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
+mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,m,q){v(c,mxUtils.bind(this,function(){if(null!=g&&g.length<u){var p=f&&this.isResampleImage(a.target.result,z)?Math.min(1,Math.min(e/m,e/q)):1;return k(g,l.type,b+c*n,d+c*n,Math.round(m*p),Math.round(q*p),l.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),f,e,z)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else k(a.target.result,l.type,b+c*n,d+c*n,240,160,l.name,function(a){v(c,function(){return a})},l)});/(\.v(dx|sdx?))($|\?)/i.test(l.name)||/(\.vs(x|sx?))($|\?)/i.test(l.name)?k(null,l.type,b+c*n,d+c*n,240,160,l.name,function(a){v(c,function(){return a})},l):"image"==l.type.substring(0,5)?q.readAsDataURL(l):q.readAsText(l)}})(A)});if(g){g=[];for(t=0;t<a.length;t++)g.push(a[t]);
+a=g;this.confirmImageResize(function(a){f=a;y()},q)}else y()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(d,f){if(d||b)mxSettings.setResizeImages(d?f:null),mxSettings.save();c();a(f)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){f(a,!0)},function(a){f(a,
+!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,d)};EditorUi.prototype.parseFile=function(a,b,d){d=null!=d?d:a.name;var c=new FormData;c.append("format","xml");c.append("upfile",a,d);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};
+f.send(c);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(l){}};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,e,k,l){k=null!=k?k:this.maxImageSize;var c=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,l))try{var g=Math.max(c/k,f/k);if(1<g){var m=Math.round(c/g),n=Math.round(f/g),p=document.createElement("canvas");p.width=m;p.height=n;p.getContext("2d").drawImage(a,
+0,0,m,n);var t=p.toDataURL();if(t.length<b.length){var v=document.createElement("canvas");v.width=m;v.height=n;var u=v.toDataURL();t!==u&&(b=t,c=m,f=n)}}}catch(M){}d(b,c,f)};EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var k=d,m=0;8>m;m++)k=1==(k&1)?3988292384^k>>>1:k>>>1,EditorUi.prototype.crcTable[d]=k;EditorUi.prototype.updateCRC=function(a,b,d,e){for(var c=0;c<e;c++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(d+c))&255]^a>>>8;return a};EditorUi.prototype.crc32=function(a){this.crcTable=
+this.crcTable||this.createCrcTable();for(var b=-1,c=0;c<a.length;c++)b=b>>>8^this.crcTable[(b^a.charCodeAt(c))&255];return(b^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,k){function c(a,b){var c=m;m+=b;return a.substring(c,m)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function g(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,
+!0);var m=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(c(a,4),"IHDR"!=c(a,4))null!=k&&k();else{c(a,17);k=a.substring(0,m);do{var n=f(a);if("IDAT"==c(a,4)){k=a.substring(0,m-8);"pHYs"==b&&"dpi"==d?(d=Math.round(e/.0254),d=g(d)+g(d)+String.fromCharCode(1)):d=d+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,d,0,d.length);k+=g(d.length)+b+d+g(e^4294967295);k+=a.substring(m-8,
+a.length);break}k+=a.substring(m-8,m-4+n);c(a,n);c(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,d){try{var c=new Image;c.onload=function(){b(c)};null!=d&&(c.onerror=d);c.src=a}catch(n){if(null!=d)d(n);else throw n;}};var p=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&
+!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph,d=b.cellEditor.startEditing;b.cellEditor.startEditing=function(c,f){var e=this.graph.getAttributeForCell(c,"plantUmlData");if(null!=e){var g=JSON.parse(e),e=new TextareaDialog(a,mxResources.get("plantUml")+":",g.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(d,g.format,function(f,e,l){a.spinner.stop();
+b.getModel().beginUpdate();try{if("txt"==g.format)b.labelChanged(c,"<pre>"+f+"</pre>"),b.updateCellSize(c,!0);else{b.setCellStyles("image",a.convertDataUri(f),[c]);var k=b.model.getGeometry(c);null!=k&&(k=k.clone(),k.width=e,k.height=l,b.cellsResized([c],[k],!1))}b.setAttributeForCell(c,"plantUmlData",JSON.stringify({data:d,format:g.format}))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(e.container,420,300,!0,!0);e.init()}else d.apply(this,arguments)};
+b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(H){a.handleError(H)}return c};var e=this.clearDefaultStyle;this.clearDefaultStyle=function(){e.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var k=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=
+a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0<c&&(b+=(0<b.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return k.apply(this,arguments)};var l=b.addClickHandler;b.addClickHandler=function(a,c,d){var f=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&
+mxEvent.consume(a);null!=f&&f(a,c)};l.call(this,a,c,d)};p.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var m=b.getExportVariables;b.getExportVariables=function(){var b=m.apply(this,arguments);b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=
+a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var u=b.getGlobalVariable;b.getGlobalVariable=function(b){return"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages?a.pages.length:1:u.apply(this,arguments)};var q=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var f=c.getAttribute("href");
+if(null==f||!b.isCustomLink(f)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))q.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(f),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var x=this.actions.get("print");x.setEnabled(!mxClient.IS_IOS||!navigator.standalone);x.visible=x.isEnabled();if(!this.editor.chromeless||
this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize"),this.installImagePasteHandler(),this.installNativeClipboardHandler();
this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==
-d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=
-mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,
-"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(v=this.editor.graph.view,v.setUnit(mxSettings.getUnit()),v.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==
-document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,v.unit),this.refresh());if("1"==urlParams.styledev){v=document.getElementById("geFooter");null!=v&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility=
-"hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),v.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||
-"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var y=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:y.apply(this,arguments)}}v=document.getElementById("geInfo");null!=v&&v.parentNode.removeChild(v);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var E=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=E&&(E.parentNode.removeChild(E),
-E=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==E&&(!mxClient.IS_IE||10<document.documentMode)&&(E=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=E&&(E.parentNode.removeChild(E),E=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),
-d=b.view.translate,e=b.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(a)&&(g=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var k=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,
-"text/html")){var l=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=l;var m=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(l=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)||(m=!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(l=c[0].getAttribute("href")));var n=!0,p=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(l,f,g,!0,m,null,n))});m&&l.length>this.resampleThreshold?this.confirmImageResize(function(a){n=
-a;p()},mxEvent.isControlDown(a)):p()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(k,
-f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b))try{for(var c=b.clipboardData||
-b.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var l=f[index];if("file"===l.kind){if(a.isEditing())this.importFiles([l.getAsFile()],0,0,this.maxImageSize,function(b,c,d,e,f,g){a.insertImage(b,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var m=this.editor.graph.getInsertPoint();this.importFiles([l.getAsFile()],m.x,m.y,this.maxImageSize);
-mxEvent.consume(b)}break}}}}catch(t){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){d.innerHTML="&nbsp;";d.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,d=document.createElement("div");d.setAttribute("autocomplete","off");d.setAttribute("autocorrect","off");d.setAttribute("autocapitalize","off");d.setAttribute("spellcheck","false");d.style.textRendering="optimizeSpeed";d.style.fontFamily="monospace";d.style.wordBreak=
-"break-all";d.style.background="transparent";d.style.color="transparent";d.style.position="absolute";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.display="block";d.style.fontSize="1";d.style.zIndex="-1";d.style.resize="none";d.style.outline="none";d.style.width="1px";d.style.height="1px";mxUtils.setOpacity(d,0);d.contentEditable=!0;d.innerHTML="&nbsp;";var f=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);
-mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||f||(d.style.left=b.container.scrollLeft+10+"px",d.style.top=b.container.scrollTop+10+"px",b.container.appendChild(d),f=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){d.focus();document.execCommand("selectAll",
-!1,null)},0):(d.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!f||224!=c&&17!=c&&91!=c||(f=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),d.parentNode.removeChild(d),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(d,"copy",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(d),
-a()}catch(x){this.handleError(x)}}));mxEvent.addListener(d,"cut",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(d,!0),a()}catch(x){this.handleError(x)}}));mxEvent.addListener(d,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),d.innerHTML="&nbsp;",d.focus(),null!=a.clipboardData&&this.pasteCells(a,d,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,d,!1)}),
-0))}),!0);var l=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==d?!0:l.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");0<c&&(b=this.getPageById(a.substring(c+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=
+d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,f,e,g){b.insertImage(a,e,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=
+mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,d)),f/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*f,a*f)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,
+"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(x=this.editor.graph.view,x.setUnit(mxSettings.getUnit()),x.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==
+document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,x.unit),this.refresh());if("1"==urlParams.styledev){x=document.getElementById("geFooter");null!=x&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility=
+"hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),x.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||
+"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var z=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:z.apply(this,arguments)}}x=document.getElementById("geInfo");null!=x&&x.parentNode.removeChild(x);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var B=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=B&&(B.parentNode.removeChild(B),
+B=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==B&&(!mxClient.IS_IE||10<document.documentMode)&&(B=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=B&&(B.parentNode.removeChild(B),B=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),
+d=b.view.translate,f=b.view.scale,e=c.x/f-d.x,g=c.y/f-d.y;mxEvent.isAltDown(a)&&(g=e=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,e,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var l=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,e,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,
+"text/html")){var k=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=k;var m=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(m=!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(k=c[0].getAttribute("href")));var n=!0,q=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(k,e,g,!0,m,null,n))});m&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){n=
+a;q()},mxEvent.isControlDown(a)):q()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",e,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+l+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(l,
+e,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),e,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b))try{for(var c=b.clipboardData||
+b.originalEvent.clipboardData,d=!1,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){d=!0;break}if(!d){var e=c.items;for(index in e){var k=e[index];if("file"===k.kind){if(a.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(b,c,d,f,e,g){a.insertImage(b,e,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var m=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],m.x,m.y,this.maxImageSize);
+mxEvent.consume(b)}break}}}}catch(q){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){d.innerHTML="&nbsp;";d.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,d=document.createElement("div");d.setAttribute("autocomplete","off");d.setAttribute("autocorrect","off");d.setAttribute("autocapitalize","off");d.setAttribute("spellcheck","false");d.style.textRendering="optimizeSpeed";d.style.fontFamily="monospace";d.style.wordBreak=
+"break-all";d.style.background="transparent";d.style.color="transparent";d.style.position="absolute";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.display="block";d.style.fontSize="1";d.style.zIndex="-1";d.style.resize="none";d.style.outline="none";d.style.width="1px";d.style.height="1px";mxUtils.setOpacity(d,0);d.contentEditable=!0;d.innerHTML="&nbsp;";var e=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);
+mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||e||(d.style.left=b.container.scrollLeft+10+"px",d.style.top=b.container.scrollTop+10+"px",b.container.appendChild(d),e=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){d.focus();document.execCommand("selectAll",
+!1,null)},0):(d.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!e||224!=c&&17!=c&&91!=c||(e=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),d.parentNode.removeChild(d),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(d,"copy",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(d),
+a()}catch(y){this.handleError(y)}}));mxEvent.addListener(d,"cut",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(d,!0),a()}catch(y){this.handleError(y)}}));mxEvent.addListener(d,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),d.innerHTML="&nbsp;",d.focus(),null!=a.clipboardData&&this.pasteCells(a,d,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,d,!1)}),
+0))}),!0);var k=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==d?!0:k.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");0<c&&(b=this.getPageById(a.substring(c+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=
function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();
if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(a){a.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(c){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(a,b){mxSettings.setCustomFonts(this.menus.customFonts);
mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);
mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor("dark"==uiTheme);this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){console.log("gridColorChanged",this.editor.graph.view.gridColor);mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==uiTheme);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),
this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML=
-"";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=mxUtils.getXml(c.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b,d){if(!mxEvent.isConsumed(a)){var c=b;d&&null!=a.clipboardData&&(c=document.createElement("div"),c.innerHTML=a.clipboardData.getData("text/html"));var e=c.getElementsByTagName("span");
-if(null!=e&&0<e.length&&"application/vnd.lucid.chart.objects"===e[0].getAttribute("data-lucid-type")){var f=e[0].getAttribute("data-lucid-content");null!=f&&0<f.length&&(this.convertLucidChart(f,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var c=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,c,c));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a))}else{var f=
-mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(c):c.textContent),k=!1;try{var l=f.lastIndexOf("%3E");0<=l&&l<f.length-3&&(f=f.substring(0,l+3))}catch(F){}try{var e=c.getElementsByTagName("span"),m=null!=e&&0<e.length?mxUtils.trim(decodeURIComponent(e[0].textContent)):decodeURIComponent(f);this.isCompatibleString(m)&&(k=!0,f=m)}catch(F){}c=this.editor.graph;if(null!=f&&0<f.length){if(c.lastPasteXml==f?c.pasteCounter++:(c.lastPasteXml=f,c.pasteCounter=0),d=c.pasteCounter*
-c.gridSize,k||this.isCompatibleString(f)?c.setSelectionCells(this.importXml(f,d,d)):(k=c.getInsertPoint(),c.isMouseInsertPoint()&&(d=0,c.lastPasteXml==f&&0<c.pasteCounter&&c.pasteCounter--),c.setSelectionCells(this.insertTextAt(f,k.x+d,k.y+d,!0))),!c.isSelectionEmpty()){c.scrollCellToVisible(c.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(F){}}}else d||(c.lastPasteXml=null,c.pasteCounter=0)}}b.innerHTML="&nbsp;"};
-EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),
-mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:
-a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.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(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.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)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,f;if(null==a){f=document.body;var g=document.documentElement;d=(f.clientWidth||g.clientWidth)-3;f=Math.max(f.clientHeight||0,g.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,f=a.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=b+"px";g.style.left=c+"px";g.style.width=Math.max(0,d-3)+"px";g.style.height=Math.max(0,f-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(g):document.body.appendChild(g);return g};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),
-d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{var d=c.target.result,e=a.name;if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)&&(e=e.substring(0,e.length-4)+".drawio");
-var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(a,
-mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,e))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?f(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},
-mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,e,b)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);
-try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(F){this.handleError(F,mxResources.get("errorLoadingFile"))}}else 0==d.indexOf("PK")?this.importZipFile(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,e,b)})):("image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,e,b))}}catch(F){this.handleError(F)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();
-this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,d){var c=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,
-b||this.defaultFilename,d))});if(null!=a&&0<a.length)null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=c&&c.isModified()?
-this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],d;for(d in a)b.push(d);return b};EditorUi.prototype.addBasenamesForCell=
-function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,f),b)};EditorUi.prototype.setGraphEnabled=
+"";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),f=mxUtils.getXml(c.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(f));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=f,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b,d){if(!mxEvent.isConsumed(a)){var c=b;d&&null!=a.clipboardData&&(c=document.createElement("div"),c.innerHTML=a.clipboardData.getData("text/html"));var f=c.getElementsByTagName("span");
+if(null!=f&&0<f.length&&"application/vnd.lucid.chart.objects"===f[0].getAttribute("data-lucid-type"))d=f[0].getAttribute("data-lucid-content"),null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var c=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,c,c));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));
+else{var e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(c):c.textContent),g=!1;try{var k=e.lastIndexOf("%3E");0<=k&&k<e.length-3&&(e=e.substring(0,k+3))}catch(D){}try{var f=c.getElementsByTagName("span"),m=null!=f&&0<f.length?mxUtils.trim(decodeURIComponent(f[0].textContent)):decodeURIComponent(e);this.isCompatibleString(m)&&(g=!0,e=m)}catch(D){}try{var p=this.editor.graph;if(null!=e&&0<e.length){p.lastPasteXml==e?p.pasteCounter++:(p.lastPasteXml=e,p.pasteCounter=
+0);var z=p.pasteCounter*p.gridSize;if(g||this.isCompatibleString(e))p.setSelectionCells(this.importXml(e,z,z));else{var u=p.getInsertPoint();p.isMouseInsertPoint()&&(z=0,p.lastPasteXml==e&&0<p.pasteCounter&&p.pasteCounter--);p.setSelectionCells(this.insertTextAt(e,u.x+z,u.y+z,!0))}if(!p.isSelectionEmpty()){p.scrollCellToVisible(p.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(p.view.getState(p.getSelectionCell()));try{mxEvent.consume(a)}catch(D){}}}else d||(p.lastPasteXml=null,
+p.pasteCounter=0)}catch(D){this.handleError(D)}}}b.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&
+(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(a);
+if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=
+d.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(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.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)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body;var l=document.documentElement;d=(e.clientWidth||l.clientWidth)-3;e=Math.max(e.clientHeight||0,l.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;l=document.createElement("div");
+l.style.zIndex=mxPopupMenu.prototype.zIndex+2;l.style.border="3px dotted rgb(254, 137, 12)";l.style.pointerEvents="none";l.style.position="absolute";l.style.top=b+"px";l.style.left=c+"px";l.style.width=Math.max(0,d-3)+"px";l.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(l):document.body.appendChild(l);return l};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);
+a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{var d=c.target.result,f=a.name;if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)&&
+(f=f.substring(0,f.length-4)+".drawio");var e=mxUtils.bind(this,function(a){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,f))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,f,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(a,
+mxUtils.bind(this,function(a){this.spinner.stop();e(a)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?e(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},
+mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,f,b)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);
+try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}else 0==d.indexOf("PK")?this.importZipFile(a,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,b)})):("image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,f,b))}}catch(E){this.handleError(E)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();
+this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,d){var c=this.getCurrentFile(),f=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,
+b||this.defaultFilename,d))});if(null!=a&&0<a.length)null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?f():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=c&&c.isModified()?
+this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],d;for(d in a)b.push(d);return b};EditorUi.prototype.addBasenamesForCell=
+function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,f=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(f[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(f[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));for(var f=d.model.getChildCount(a),e=0;e<f;e++)this.addBasenamesForCell(d.model.getChildAt(a,e),b)};EditorUi.prototype.setGraphEnabled=
function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=a?"":"hidden",this.ruler.vRuler.container.style.visibility=a?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");
a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&
this.installMessageHandler(mxUtils.bind(this,function(a,b,d){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=d?d:!1;this.updateUi();
window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,
-pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,f=null,g=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,
-g);mxEvent.addListener(window,"message",mxUtils.bind(this,function(e){if(e.source==(window.opener||window.parent)){var g=e.data,k=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&
-(a=Graph.decompress(a)))}catch(la){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(W){g=null}try{if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();var m=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?
-mxResources.get(g.okKey):null,function(a){null!=a&&l.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==g.action){var n=k(g.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),n,mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),
-mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(W){l.postMessage(JSON.stringify({event:"draft",
-error:W.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=1==g.enableRecent,q=1==g.enableSearch,u=1==g.enableCustomTemp,m=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?l.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,e,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,
-function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,q?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,c){l.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")}),null,null,u?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(m.container,620,440,
-!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("textContent"==g.action){var x=this.getDiagramTextContent();l.postMessage(JSON.stringify({event:"textContent",data:x,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var v=
-null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,v):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var A=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var C=this.editor.graph,B=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();
-var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(A);l.postMessage(JSON.stringify(b),"*")}),P=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(A)));C!=this.editor.graph&&C.container.parentNode.removeChild(C.container);B(a)}),T=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=
-T){for(var ba=C.getGlobalVariable,C=this.createTemporaryGraph(C.getStylesheet()),Y,G=0;G<this.pages.length;G++)if(this.pages[G].getId()==T){Y=this.updatePageRoot(this.pages[G]);break}C.getGlobalVariable=function(a){return"page"==a?Y.getName():"pagenumber"==a?1:ba.apply(this,arguments)};document.body.appendChild(C.container);C.model.setRoot(Y.root)}if(null!=g.layerIds){for(var aa=C.model,ea=aa.getChildCells(aa.getRoot()),m={},G=0;G<g.layerIds.length;G++)m[g.layerIds[G]]=!0;for(G=0;G<ea.length;G++)aa.setVisible(ea[G],
-m[ea[G].id]||!1)}this.exportToCanvas(mxUtils.bind(this,function(a){P(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){P(null)}),null,null,g.scale,null,null,null,C)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=T?"&pageId="+T:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(A))).send(mxUtils.bind(this,function(a){200<=
-a.getStatus()&&299>=a.getStatus()?B("data:image/png;base64,"+a.getText()):P(null)}),mxUtils.bind(this,function(){P(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);v=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var fa=this.getXmlFileData();v.xml=mxUtils.getXml(fa);v.data=this.getFileData(null,null,!0,null,null,null,fa);v.format=g.format}else if("html"==g.format)A=this.editor.getGraphXml(),
-v.data=this.getHtml(A,this.editor.graph),v.xml=mxUtils.getXml(A),v.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var Q=this.editor.graph.background;Q==mxConstants.NONE&&(Q=null);v.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);v.format="svg";if(g.embedImages||null==g.embedImages){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==g.format?this.getEmbeddedSvg(v.xml,
-this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();v.data=this.createSvgDataUri(a);l.postMessage(JSON.stringify(v),"*")})):this.convertImages(this.editor.graph.getSvg(Q),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();v.data=this.createSvgDataUri(mxUtils.getXml(a));l.postMessage(JSON.stringify(v),"*")}));return}var ha="xmlsvg"==g.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(Q));
-v.data=this.createSvgDataUri(ha)}l.postMessage(JSON.stringify(v),"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&&(n=document.createElement("span"),mxUtils.write(n,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",
-this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(n),this.embedFilenameSpan=n),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(l):"remoteInvoke"==g.action?this.handleRemoteInvoke(g):"remoteInvokeResponse"==
-g.action?this.handleRemoteInvokeResponse(g):l.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(W){this.handleError(W)}}var V=mxUtils.bind(this,function(e,g){c=!0;try{a(e,g)}catch(X){this.handleError(X)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var k=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});f=k();d&&null==b&&(b=mxUtils.bind(this,
-function(a,b){var d=k();if(d!=f&&!c){var e=this.createLoadMessage("autosave");e.xml=d;d=JSON.stringify(e);(window.opener||window.parent).postMessage(d,"*")}f=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",
-b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||l.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(k="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+
-1)),function(a){V(a,e)},mxUtils.bind(this,function(a){this.handleError(a)}),k)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&V(a.responseText,e)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,
-mxUtils.bind(this,function(a){V(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=k(g),V(g,e))}}));var l=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";l.postMessage(g,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"0px";a.style.paddingLeft="8px";a.style.paddingBottom=
+pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,l=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,
+l);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var g=f.data,l=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&
+(a=Graph.decompress(a)))}catch(ga){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(T){g=null}try{if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();var m=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?
+mxResources.get(g.okKey):null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==g.action){var n=l(g.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),n,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),
+mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(T){k.postMessage(JSON.stringify({event:"draft",
+error:T.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=1==g.enableRecent,t=1==g.enableSearch,u=1==g.enableCustomTemp,m=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,
+function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,t?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,c){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")}),null,null,u?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(m.container,620,440,
+!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("textContent"==g.action){var y=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:y,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var x=
+null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,x):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var A=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var C=this.editor.graph,B=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();
+var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(A);k.postMessage(JSON.stringify(b),"*")}),N=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(A)));C!=this.editor.graph&&C.container.parentNode.removeChild(C.container);B(a)}),P=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=
+P){for(var ca=C.getGlobalVariable,C=this.createTemporaryGraph(C.getStylesheet()),V,F=0;F<this.pages.length;F++)if(this.pages[F].getId()==P){V=this.updatePageRoot(this.pages[F]);break}C.getGlobalVariable=function(a){return"page"==a?V.getName():"pagenumber"==a?1:ca.apply(this,arguments)};document.body.appendChild(C.container);C.model.setRoot(V.root)}if(null!=g.layerIds){for(var Y=C.model,fa=Y.getChildCells(Y.getRoot()),m={},F=0;F<g.layerIds.length;F++)m[g.layerIds[F]]=!0;for(F=0;F<fa.length;F++)Y.setVisible(fa[F],
+m[fa[F].id]||!1)}this.exportToCanvas(mxUtils.bind(this,function(a){N(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){N(null)}),null,null,g.scale,null,null,null,C)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=P?"&pageId="+P:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(A))).send(mxUtils.bind(this,function(a){200<=
+a.getStatus()&&299>=a.getStatus()?B("data:image/png;base64,"+a.getText()):N(null)}),mxUtils.bind(this,function(){N(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);x=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var la=this.getXmlFileData();x.xml=mxUtils.getXml(la);x.data=this.getFileData(null,null,!0,null,null,null,la);x.format=g.format}else if("html"==g.format)A=this.editor.getGraphXml(),
+x.data=this.getHtml(A,this.editor.graph),x.xml=mxUtils.getXml(A),x.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var Z=this.editor.graph.background;Z==mxConstants.NONE&&(Z=null);x.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);x.format="svg";if(g.embedImages||null==g.embedImages){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==g.format?this.getEmbeddedSvg(x.xml,
+this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();x.data=this.createSvgDataUri(a);k.postMessage(JSON.stringify(x),"*")})):this.convertImages(this.editor.graph.getSvg(Z),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();x.data=this.createSvgDataUri(mxUtils.getXml(a));k.postMessage(JSON.stringify(x),"*")}));return}var ia="xmlsvg"==g.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(Z));
+x.data=this.createSvgDataUri(ia)}k.postMessage(JSON.stringify(x),"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&&(n=document.createElement("span"),mxUtils.write(n,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",
+this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(n),this.embedFilenameSpan=n),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==g.action?this.handleRemoteInvoke(g):"remoteInvokeResponse"==
+g.action?this.handleRemoteInvokeResponse(g):k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(T){this.handleError(T)}}var U=mxUtils.bind(this,function(f,g){c=!0;try{a(f,g)}catch(X){this.handleError(X)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var l=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=l();d&&null==b&&(b=mxUtils.bind(this,
+function(a,b){var d=l();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",
+b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||k.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(l="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+
+1)),function(a){U(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),l)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&U(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,
+mxUtils.bind(this,function(a){U(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=l(g),U(g,f))}}));var k=window.opener||window.parent,l="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(l,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"0px";a.style.paddingLeft="8px";a.style.paddingBottom=
"2px";var b=document.createElement("button");b.className="geBigButton";"1"==urlParams.noSaveBtn?(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),
a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className=
"geBigButton geBigStandardButton";b.style.marginLeft="6px";b.style.marginRight="20px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,
-function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://about.draw.io/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](c);if(null!=a[e].config)for(var l in a[e].config)f[l]=a[e].config[l];this.executeLayout(function(){f.execute(c.getDefaultParent(),
-0==d.length?null:d)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],e=[],f={};if(0<c.length){var l={},m=null,p=null,u=null,y=null,v=null,D=null,z=null,B=null,O="",I="auto",S="auto",C=null,K=null,P=40,T=40,ba=100,Y=0,G=this.editor.graph;G.getGraphBounds();for(var aa=function(){null!=b?b(ka):(G.setSelectionCells(ka),G.scrollCellToVisible(G.getSelectionCell()))},ea=G.getFreeInsertPoint(),fa=ea.x,Q=ea.y,ea=Q,ha=null,V="auto",B=null,W=[],la=null,ma=null,X=0;X<
-c.length&&"#"==c[X].charAt(0);){a=c[X];for(X++;X<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[X].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[X].substring(1)),X++;if("#"!=a.charAt(1)){var ia=a.indexOf(":");if(0<ia){var N=mxUtils.trim(a.substring(1,ia)),M=mxUtils.trim(a.substring(ia+1));"label"==N?ha=G.sanitizeHtml(M):"labelname"==N&&0<M.length&&"-"!=M?y=M:"labels"==N&&0<M.length&&"-"!=M?v=JSON.parse(M):"style"==N?m=M:"parentstyle"==N?D=M:"stylename"==N&&0<M.length&&"-"!=M?u=M:"styles"==N&&
-0<M.length&&"-"!=M?p=JSON.parse(M):"identity"==N&&0<M.length&&"-"!=M?z=M:"parent"==N&&0<M.length&&"-"!=M?B=M:"namespace"==N&&0<M.length&&"-"!=M?O=M:"width"==N?I=M:"height"==N?S=M:"left"==N&&0<M.length?C=M:"top"==N&&0<M.length?K=M:"ignore"==N?ma=M.split(","):"connect"==N?W.push(JSON.parse(M)):"link"==N?la=M:"padding"==N?Y=parseFloat(M):"edgespacing"==N?P=parseFloat(M):"nodespacing"==N?T=parseFloat(M):"levelspacing"==N?ba=parseFloat(M):"layout"==N&&(V=M)}}}if(null==c[X])throw Error(mxResources.get("invalidOrMissingFile"));
-var ja=this.editor.csvToArray(c[X]),N=ia=null;if(null!=z||null!=B)for(var R=0;R<ja.length;R++)z==ja[R]&&(ia=R),B==ja[R]&&(N=R);null==ha&&(ha="%"+ja[0]+"%");if(null!=W)for(var U=0;U<W.length;U++)null==l[W[U].to]&&(l[W[U].to]={});G.model.beginUpdate();try{for(R=X+1;R<c.length;R++){var ga=this.editor.csvToArray(c[R]);if(null==ga){var ta=40<c[R].length?c[R].substring(0,40)+"...":c[R];throw Error(R+" ("+ta+") "+mxResources.get("containsValidationErrors"));}if(ga.length==ja.length){var H=null,oa=null!=
-ia?O+ga[ia]:null;null!=oa&&(H=G.model.getCell(oa));var z=null!=H,ca=new mxCell(ha,new mxGeometry(fa,ea,0,0),m||"whiteSpace=wrap;html=1;");ca.vertex=!0;ca.id=oa;for(var da=0;da<ga.length;da++)G.setAttributeForCell(ca,ja[da],ga[da]);if(null!=y&&null!=v){var Aa=v[ca.getAttribute(y)];null!=Aa&&G.labelChanged(ca,Aa)}if(null!=u&&null!=p){var wa=p[ca.getAttribute(u)];null!=wa&&(ca.style=wa)}G.setAttributeForCell(ca,"placeholders","1");ca.style=G.replacePlaceholders(ca,ca.style);z&&(G.model.setGeometry(H,
-ca.geometry),G.model.setStyle(H,ca.style),0>mxUtils.indexOf(e,H)&&e.push(H));H=ca;if(!z)for(U=0;U<W.length;U++)l[W[U].to][H.getAttribute(W[U].to)]=H;null!=la&&"link"!=la&&(G.setLinkForCell(H,H.getAttribute(la)),G.setAttributeForCell(H,la,null));G.fireEvent(new mxEventObject("cellsInserted","cells",[H]));var za=this.editor.graph.getPreferredSizeForCell(H);H.vertex&&(null!=C&&null!=H.getAttribute(C)&&(H.geometry.x=fa+parseFloat(H.getAttribute(C))),null!=K&&null!=H.getAttribute(K)&&(H.geometry.y=Q+parseFloat(H.getAttribute(K))),
-"@"==I.charAt(0)&&null!=H.getAttribute(I.substring(1))?H.geometry.width=parseFloat(H.getAttribute(I.substring(1))):H.geometry.width="auto"==I?za.width+Y:parseFloat(I),"@"==S.charAt(0)&&null!=H.getAttribute(S.substring(1))?H.geometry.height=parseFloat(H.getAttribute(S.substring(1))):H.geometry.height="auto"==S?za.height+Y:parseFloat(S),ea+=H.geometry.height+T);z?(null==f[oa]&&(f[oa]=[]),f[oa].push(H)):(B=null!=N?G.model.getCell(O+ga[N]):null,d.push(H),null!=B?(B.style=G.replacePlaceholders(B,D),G.addCell(H,
-B)):e.push(G.addCell(H)))}}for(var na=e.slice(),ka=e.slice(),U=0;U<W.length;U++)for(var ra=W[U],R=0;R<e.length;R++){var H=e[R],Ea=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d){G.setAttributeForCell(b,c.from,null);for(var d=d.split(","),e=0;e<d.length;e++){var f=l[c.to][d[e]];if(null!=f){var g=c.label;null!=c.fromlabel&&(g=(b.getAttribute(c.fromlabel)||"")+(g||""));null!=c.tolabel&&(g=(g||"")+(f.getAttribute(c.tolabel)||""));ka.push(G.insertEdge(null,null,g||"",c.invert?
-f:a,c.invert?a:f,c.style||G.createCurrentEdgeStyle()));mxUtils.remove(c.invert?a:f,na)}}}});Ea(H,H,ra);if(null!=f[H.id])for(da=0;da<f[H.id].length;da++)Ea(H,f[H.id][da],ra)}if(null!=ma)for(R=0;R<d.length;R++)for(H=d[R],da=0;da<ma.length;da++)G.setAttributeForCell(H,mxUtils.trim(ma[da]),null);if(0<e.length){var sa=new mxParallelEdgeLayout(G);sa.spacing=P;var pa=function(){0<sa.spacing&&sa.execute(G.getDefaultParent());for(var a=0;a<e.length;a++){var b=G.getCellGeometry(e[a]);b.x=Math.round(G.snap(b.x));
-b.y=Math.round(G.snap(b.y));"auto"==I&&(b.width=Math.round(G.snap(b.width)));"auto"==S&&(b.height=Math.round(G.snap(b.height)))}};if("["==V.charAt(0)){var Ka=aa;G.view.validate();this.executeLayoutList(JSON.parse(V),function(){pa();Ka()});aa=null}else if("circle"==V){var Ba=new mxCircleLayout(G);Ba.resetEdges=!1;var La=Ba.isVertexIgnored;Ba.isVertexIgnored=function(a){return La.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){Ba.execute(G.getDefaultParent());pa()},!0,aa);
-aa=null}else if("horizontaltree"==V||"verticaltree"==V||"auto"==V&&ka.length==2*e.length-1&&1==na.length){G.view.validate();var Ca=new mxCompactTreeLayout(G,"horizontaltree"==V);Ca.levelDistance=T;Ca.edgeRouting=!1;Ca.resetEdges=!1;this.executeLayout(function(){Ca.execute(G.getDefaultParent(),0<na.length?na[0]:null)},!0,aa);aa=null}else if("horizontalflow"==V||"verticalflow"==V||"auto"==V&&1==na.length){G.view.validate();var xa=new mxHierarchicalLayout(G,"horizontalflow"==V?mxConstants.DIRECTION_WEST:
-mxConstants.DIRECTION_NORTH);xa.intraCellSpacing=T;xa.parallelEdgeSpacing=P;xa.interRankCellSpacing=ba;xa.disableEdgeStyle=!1;this.executeLayout(function(){xa.execute(G.getDefaultParent(),ka);G.moveCells(ka,fa,Q)},!0,aa);aa=null}else if("organic"==V||"auto"==V&&ka.length>e.length){G.view.validate();var ua=new mxFastOrganicLayout(G);ua.forceConstant=3*T;ua.resetEdges=!1;var Fa=ua.isVertexIgnored;ua.isVertexIgnored=function(a){return Fa.apply(this,arguments)||0>mxUtils.indexOf(e,a)};sa=new mxParallelEdgeLayout(G);
-sa.spacing=P;this.executeLayout(function(){ua.execute(G.getDefaultParent());pa()},!0,aa);aa=null}}this.hideDialog()}finally{G.model.endUpdate()}null!=aa&&aa()}}catch(ya){this.handleError(ya)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=
+function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://about.draw.io/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),f=0;f<a.length;f++){var e=new window[a[f].layout](c);if(null!=a[f].config)for(var k in a[f].config)e[k]=a[f].config[k];this.executeLayout(function(){e.execute(c.getDefaultParent(),
+0==d.length?null:d)},f==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],f=[],e={};if(0<c.length){var k={},m=null,p=null,u=null,z=null,x=null,B=null,v=null,H=null,M="",J="auto",S="auto",C=null,K=null,N=40,P=40,ca=100,V=0,F=this.editor.graph;F.getGraphBounds();for(var Y=function(){null!=b?b(ka):(F.setSelectionCells(ka),F.scrollCellToVisible(F.getSelectionCell()))},fa=F.getFreeInsertPoint(),la=fa.x,Z=fa.y,fa=Z,ia=null,U="auto",H=null,T=[],ga=null,pa=null,X=0;X<
+c.length&&"#"==c[X].charAt(0);){a=c[X];for(X++;X<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[X].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[X].substring(1)),X++;if("#"!=a.charAt(1)){var aa=a.indexOf(":");if(0<aa){var O=mxUtils.trim(a.substring(1,aa)),L=mxUtils.trim(a.substring(aa+1));"label"==O?ia=F.sanitizeHtml(L):"labelname"==O&&0<L.length&&"-"!=L?z=L:"labels"==O&&0<L.length&&"-"!=L?x=JSON.parse(L):"style"==O?m=L:"parentstyle"==O?B=L:"stylename"==O&&0<L.length&&"-"!=L?u=L:"styles"==O&&
+0<L.length&&"-"!=L?p=JSON.parse(L):"identity"==O&&0<L.length&&"-"!=L?v=L:"parent"==O&&0<L.length&&"-"!=L?H=L:"namespace"==O&&0<L.length&&"-"!=L?M=L:"width"==O?J=L:"height"==O?S=L:"left"==O&&0<L.length?C=L:"top"==O&&0<L.length?K=L:"ignore"==O?pa=L.split(","):"connect"==O?T.push(JSON.parse(L)):"link"==O?ga=L:"padding"==O?V=parseFloat(L):"edgespacing"==O?N=parseFloat(L):"nodespacing"==O?P=parseFloat(L):"levelspacing"==O?ca=parseFloat(L):"layout"==O&&(U=L)}}}if(null==c[X])throw Error(mxResources.get("invalidOrMissingFile"));
+var ja=this.editor.csvToArray(c[X]),O=aa=null;if(null!=v||null!=H)for(var R=0;R<ja.length;R++)v==ja[R]&&(aa=R),H==ja[R]&&(O=R);null==ia&&(ia="%"+ja[0]+"%");if(null!=T)for(var Q=0;Q<T.length;Q++)null==k[T[Q].to]&&(k[T[Q].to]={});F.model.beginUpdate();try{for(R=X+1;R<c.length;R++){var ea=this.editor.csvToArray(c[R]);if(null==ea){var ta=40<c[R].length?c[R].substring(0,40)+"...":c[R];throw Error(R+" ("+ta+") "+mxResources.get("containsValidationErrors"));}if(ea.length==ja.length){var I=null,ma=null!=
+aa?M+ea[aa]:null;null!=ma&&(I=F.model.getCell(ma));var v=null!=I,da=new mxCell(ia,new mxGeometry(la,fa,0,0),m||"whiteSpace=wrap;html=1;");da.vertex=!0;da.id=ma;for(var ha=0;ha<ea.length;ha++)F.setAttributeForCell(da,ja[ha],ea[ha]);if(null!=z&&null!=x){var Aa=x[da.getAttribute(z)];null!=Aa&&F.labelChanged(da,Aa)}if(null!=u&&null!=p){var Ba=p[da.getAttribute(u)];null!=Ba&&(da.style=Ba)}F.setAttributeForCell(da,"placeholders","1");da.style=F.replacePlaceholders(da,da.style);v&&(F.model.setGeometry(I,
+da.geometry),F.model.setStyle(I,da.style),0>mxUtils.indexOf(f,I)&&f.push(I));I=da;if(!v)for(Q=0;Q<T.length;Q++)k[T[Q].to][I.getAttribute(T[Q].to)]=I;null!=ga&&"link"!=ga&&(F.setLinkForCell(I,I.getAttribute(ga)),F.setAttributeForCell(I,ga,null));F.fireEvent(new mxEventObject("cellsInserted","cells",[I]));var za=this.editor.graph.getPreferredSizeForCell(I);I.vertex&&(null!=C&&null!=I.getAttribute(C)&&(I.geometry.x=la+parseFloat(I.getAttribute(C))),null!=K&&null!=I.getAttribute(K)&&(I.geometry.y=Z+parseFloat(I.getAttribute(K))),
+"@"==J.charAt(0)&&null!=I.getAttribute(J.substring(1))?I.geometry.width=parseFloat(I.getAttribute(J.substring(1))):I.geometry.width="auto"==J?za.width+V:parseFloat(J),"@"==S.charAt(0)&&null!=I.getAttribute(S.substring(1))?I.geometry.height=parseFloat(I.getAttribute(S.substring(1))):I.geometry.height="auto"==S?za.height+V:parseFloat(S),fa+=I.geometry.height+P);v?(null==e[ma]&&(e[ma]=[]),e[ma].push(I)):(H=null!=O?F.model.getCell(M+ea[O]):null,d.push(I),null!=H?(H.style=F.replacePlaceholders(H,B),F.addCell(I,
+H)):f.push(F.addCell(I)))}}for(var na=f.slice(),ka=f.slice(),Q=0;Q<T.length;Q++)for(var ra=T[Q],R=0;R<f.length;R++){var I=f[R],oa=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d){F.setAttributeForCell(b,c.from,null);for(var d=d.split(","),f=0;f<d.length;f++){var e=k[c.to][d[f]];if(null!=e){var g=c.label;null!=c.fromlabel&&(g=(b.getAttribute(c.fromlabel)||"")+(g||""));null!=c.tolabel&&(g=(g||"")+(e.getAttribute(c.tolabel)||""));ka.push(F.insertEdge(null,null,g||"",c.invert?
+e:a,c.invert?a:e,c.style||F.createCurrentEdgeStyle()));mxUtils.remove(c.invert?a:e,na)}}}});oa(I,I,ra);if(null!=e[I.id])for(ha=0;ha<e[I.id].length;ha++)oa(I,e[I.id][ha],ra)}if(null!=pa)for(R=0;R<d.length;R++)for(I=d[R],ha=0;ha<pa.length;ha++)F.setAttributeForCell(I,mxUtils.trim(pa[ha]),null);if(0<f.length){var ua=new mxParallelEdgeLayout(F);ua.spacing=N;var wa=function(){0<ua.spacing&&ua.execute(F.getDefaultParent());for(var a=0;a<f.length;a++){var b=F.getCellGeometry(f[a]);b.x=Math.round(F.snap(b.x));
+b.y=Math.round(F.snap(b.y));"auto"==J&&(b.width=Math.round(F.snap(b.width)));"auto"==S&&(b.height=Math.round(F.snap(b.height)))}};if("["==U.charAt(0)){var qa=Y;F.view.validate();this.executeLayoutList(JSON.parse(U),function(){wa();qa()});Y=null}else if("circle"==U){var Ca=new mxCircleLayout(F);Ca.resetEdges=!1;var Ma=Ca.isVertexIgnored;Ca.isVertexIgnored=function(a){return Ma.apply(this,arguments)||0>mxUtils.indexOf(f,a)};this.executeLayout(function(){Ca.execute(F.getDefaultParent());wa()},!0,Y);
+Y=null}else if("horizontaltree"==U||"verticaltree"==U||"auto"==U&&ka.length==2*f.length-1&&1==na.length){F.view.validate();var Da=new mxCompactTreeLayout(F,"horizontaltree"==U);Da.levelDistance=P;Da.edgeRouting=!1;Da.resetEdges=!1;this.executeLayout(function(){Da.execute(F.getDefaultParent(),0<na.length?na[0]:null)},!0,Y);Y=null}else if("horizontalflow"==U||"verticalflow"==U||"auto"==U&&1==na.length){F.view.validate();var xa=new mxHierarchicalLayout(F,"horizontalflow"==U?mxConstants.DIRECTION_WEST:
+mxConstants.DIRECTION_NORTH);xa.intraCellSpacing=P;xa.parallelEdgeSpacing=N;xa.interRankCellSpacing=ca;xa.disableEdgeStyle=!1;this.executeLayout(function(){xa.execute(F.getDefaultParent(),ka);F.moveCells(ka,la,Z)},!0,Y);Y=null}else if("organic"==U||"auto"==U&&ka.length>f.length){F.view.validate();var ya=new mxFastOrganicLayout(F);ya.forceConstant=3*P;ya.resetEdges=!1;var Ga=ya.isVertexIgnored;ya.isVertexIgnored=function(a){return Ga.apply(this,arguments)||0>mxUtils.indexOf(f,a)};ua=new mxParallelEdgeLayout(F);
+ua.spacing=N;this.executeLayout(function(){ya.execute(F.getDefaultParent());wa()},!0,Y);Y=null}}this.hideDialog()}finally{F.model.endUpdate()}null!=Y&&Y()}}catch(Ha){this.handleError(Ha)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=
function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var u=
EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=u.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};
-var f=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return f.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();
-return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var g=b.init;b.init=function(){g.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+
-a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&
-(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=1;null==this.drive&&"function"!==typeof window.DriveClient||c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.gitLab||c++;b&&a&&isLocalStorage&&"1"==urlParams.browser&&
+var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();
+return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var l=b.init;b.init=function(){l.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+
+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),f=b.source,e=b.outline;e.pageScale=f.pageScale;e.pageFormat=f.pageFormat;e.background=f.background;e.pageVisible=f.pageVisible;e.background=f.background;var g=mxUtils.getCurrentStyle(f.container);e.container.style.backgroundColor=g.backgroundColor;null!=f.view.backgroundPageShape&&null!=e.view.backgroundPageShape&&
+(e.view.backgroundPageShape.fill=f.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=1;null==this.drive&&"function"!==typeof window.DriveClient||c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.gitLab||c++;b&&a&&isLocalStorage&&"1"==urlParams.browser&&
c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);
d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(d);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(d),this.menus.get("newLibrary").setEnabled(d));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&
-a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isAppCache()){var f=applicationCache;if(null!=f&&null==this.offlineStatus){this.offlineStatus=document.createElement("div");
+a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isAppCache()){var e=applicationCache;if(null!=e&&null==this.offlineStatus){this.offlineStatus=document.createElement("div");
this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding="2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,
-function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var f=window.applicationCache,l=null,b=mxUtils.bind(this,function(){var a=f.status,b;a==f.CHECKING&&(a=f.DOWNLOADING);switch(a){case f.UNCACHED:b="";break;case f.IDLE:b="min"==uiTheme?"":'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case f.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';
-break;case f.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case f.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}a!=l&&(this.offlineStatus.innerHTML=b,l=a)});mxEvent.addListener(f,"checking",b);mxEvent.addListener(f,"noupdate",b);mxEvent.addListener(f,"downloading",b);mxEvent.addListener(f,
-"progress",b);mxEvent.addListener(f,"cached",b);mxEvent.addListener(f,"updateready",b);mxEvent.addListener(f,"obsolete",b);mxEvent.addListener(f,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||
-"1"==urlParams.embed&&this.editor.graph.isEnabled()};var v=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){v.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);
+function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,k=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b="min"==uiTheme?"":'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case e.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';
+break;case e.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case e.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}a!=k&&(this.offlineStatus.innerHTML=b,k=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,
+"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||
+"1"==urlParams.embed&&this.editor.graph.isEnabled()};var x=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){x.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);
this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=d);this.actions.get("makeCopy").setEnabled(null!=
d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==d||!d.isRestricted()));this.actions.get("publishLink").setEnabled(null!=d&&!d.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);
this.actions.get("rename").setEnabled(null!=d&&d.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var B=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=
-null);B.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,f,l,g,m){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(f,l,g)),"image/svg+xml");else{var e=a.getFileData(!0,null,null,null,null,!0),k=c.getGraphBounds(),n=Math.floor(k.width*l/c.view.scale),p=Math.floor(k.height*
-l/c.view.scale);if(e.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),"png"!=d&&"jpg"!=d&&"jpeg"!=d||!a.isExportToCanvas()){var q={globalVars:c.getExportVariables()};a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<m?"&dpi="+m:"")+"&bg="+(null!=f?f:"none")+"&w="+n+"&h="+p+"&border="+g+"&xml="+encodeURIComponent(e))})}else"png"==d?a.exportImage(l,
-null==f||"none"==f,!0,!1,!1,g,!0,!1,null,null,m):a.exportImage(l,!1,!0,!1,!1,g,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var d=0;d<this.pages.length;d++){var f=a;this.currentPage!=this.pages[d]&&(f=this.createTemporaryGraph(a.getStylesheet()),f.model.setRoot(this.pages[d].root));b+=this.pages[d].getName()+" "+f.getIndexableText()+" "}else b=
-a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var f=document.createElement("div");f.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";f.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';
-var g={};try{var l=mxSettings.getCustomLibraries();for(a=0;a<l.length;a++){var m=l[a];if("R"==m.substring(0,1)){var p=JSON.parse(decodeURIComponent(m.substring(1)));g[p[0]]={id:p[0],title:p[1],downloadUrl:p[2]}}}}catch(F){}this.remoteInvoke("getCustomLibraries",null,null,function(a){f.innerHTML="";if(0==a.length)f.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];g[d.id]&&
-(b[d.id]=d);var e=this.addCheckbox(f,d.title,g[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,e)}},mxUtils.bind(this,function(a){f.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));f.appendChild(b)}));c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,
-function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==g[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));
-for(c in g)b[c]||this.closeLibrary(new RemoteLibrary(this,null,g[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],
-"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,d,f,l){var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
-this.timeout),k=mxUtils.bind(this,function(){window.clearTimeout(e);c&&f.apply(this,arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:k,error:l});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a){var b=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};
-null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var c=a.funtionName,d=this.remoteInvokableFns[c];if(null!=d&&"function"===typeof this[c]){var f=a.functionArgs;Array.isArray(f)||(f=[]);if(d.isAsync)f.push(function(){b(Array.prototype.slice.apply(arguments))}),f.push(function(a){b(null,a||"Unkown Error")}),this[c].apply(this,f);else{var g=this[c].apply(this,f);b([g])}}else b(null,"Invalid Call: "+c+" is not found.")}catch(x){b(null,"Invalid Call: An error occured, "+
-x.message)}};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=
+null);B.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,e,k,l,m){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(e,k,l)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=c.getGraphBounds(),n=Math.floor(g.width*k/c.view.scale),p=Math.floor(g.height*
+k/c.view.scale);if(f.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),"png"!=d&&"jpg"!=d&&"jpeg"!=d||!a.isExportToCanvas()){var t={globalVars:c.getExportVariables()};a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(t))+(0<m?"&dpi="+m:"")+"&bg="+(null!=e?e:"none")+"&w="+n+"&h="+p+"&border="+l+"&xml="+encodeURIComponent(f))})}else"png"==d?a.exportImage(k,
+null==e||"none"==e,!0,!1,!1,l,!0,!1,null,null,m):a.exportImage(k,!1,!0,!1,!1,l,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var d=0;d<this.pages.length;d++){var e=a;this.currentPage!=this.pages[d]&&(e=this.createTemporaryGraph(a.getStylesheet()),e.model.setRoot(this.pages[d].root));b+=this.pages[d].getName()+" "+e.getIndexableText()+" "}else b=
+a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var e=document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';
+var l={};try{var k=mxSettings.getCustomLibraries();for(a=0;a<k.length;a++){var m=k[a];if("R"==m.substring(0,1)){var p=JSON.parse(decodeURIComponent(m.substring(1)));l[p[0]]={id:p[0],title:p[1],downloadUrl:p[2]}}}}catch(E){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML="";if(0==a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];l[d.id]&&
+(b[d.id]=d);var f=this.addCheckbox(e,d.title,l[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,f)}},mxUtils.bind(this,function(a){e.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(b)}));c.appendChild(e);c=new CustomDialog(this,c,mxUtils.bind(this,
+function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==l[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));
+for(c in l)b[c]||this.closeLibrary(new RemoteLibrary(this,null,l[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],
+"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,d,e,k){var c=!0,f=window.setTimeout(mxUtils.bind(this,function(){c=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
+this.timeout),g=mxUtils.bind(this,function(){window.clearTimeout(f);c&&e.apply(this,arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:g,error:k});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a){var b=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};
+null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var c=a.funtionName,d=this.remoteInvokableFns[c];if(null!=d&&"function"===typeof this[c]){var e=a.functionArgs;Array.isArray(e)||(e=[]);if(d.isAsync)e.push(function(){b(Array.prototype.slice.apply(arguments))}),e.push(function(a){b(null,a||"Unkown Error")}),this[c].apply(this,e);else{var l=this[c].apply(this,e);b([l])}}else b(null,"Invalid Call: "+c+" is not found.")}catch(y){b(null,"Invalid Call: An error occured, "+
+y.message)}};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=
function(a,b,d){var c=this.getCurrentFile();null!=c?c.addComment(a,b,d):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=
function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=
function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")}})();
-var CommentsWindow=function(a,b,f,d,l,m){function p(){for(var a=t.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==t&&b++;F.style.display=0==b?"block":"none"}function u(a,b,c,d){function e(){b.removeChild(l);b.removeChild(m);k.style.display="block";f.style.display="block"}g={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),k=b.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
-"geCommentEditTxtArea";l.style.minHeight=f.offsetHeight+"px";l.value=a.content;b.insertBefore(l,f);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),p()):e();g=null});n.className="geCommentEditBtn";m.appendChild(n);var q=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=l.value;mxUtils.write(f,a.content);e();c(a);g=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
-function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(q.click(),mxEvent.consume(a)):27==a.keyCode&&(n.click(),mxEvent.consume(a)))}));q.focus();q.className="geCommentEditBtn gePrimaryBtn";m.appendChild(q);b.insertBefore(m,f);k.style.display="none";f.style.display="none";l.focus()}function v(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
-[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function B(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function c(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function e(a){a.style.border="";a.removeChild(a.busyImg)}function k(b,d,f,l,m){function y(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
-"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});P.appendChild(e);d&&(e.style.display="none")}function C(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=z;a(b);return{pdiv:d,replies:c}}function x(d,f,g,m,p){function n(){B(v);b.addReply(y,function(a){y.id=a;b.replies.push(y);e(v);g&&g()},function(b){q();c(v);a.handleError(b,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,p)}function q(){u(y,v,function(a){n()},!0)}var t=C().pdiv,y=a.newComment(d,a.getCurrentUser());y.pCommentId=b.id;null==b.replies&&(b.replies=[]);var v=k(y,b.replies,t,l+1);f?q():n()}if(m||!b.isResolved){F.style.display="none";var z=document.createElement("div");z.className="geCommentContainer";z.setAttribute("data-commentId",b.id);z.style.marginLeft=20*l+5+"px";b.isResolved&&"dark"!=uiTheme&&(z.style.backgroundColor="ghostWhite");
-var A=document.createElement("div");A.className="geCommentHeader";var E=document.createElement("img");E.className="geCommentUserImg";E.src=b.user.pictureUrl||Editor.userImage;A.appendChild(E);E=document.createElement("div");E.className="geCommentHeaderTxt";A.appendChild(E);var K=document.createElement("div");K.className="geCommentUsername";mxUtils.write(K,b.user.displayName||"");E.appendChild(K);K=document.createElement("div");K.className="geCommentDate";K.setAttribute("data-commentId",b.id);v(b,
-K);E.appendChild(K);z.appendChild(A);A=document.createElement("div");A.className="geCommentTxt";mxUtils.write(A,b.content||"");z.appendChild(A);A=document.createElement("div");A.className="geCommentActions";var P=document.createElement("ul");P.className="geCommentActionsList";A.appendChild(P);q||0!=l&&!n||y(mxResources.get("reply"),function(){x("",!0)},b.isResolved);E=a.getCurrentUser();null==E||E.id!=b.user.id||q||(y(mxResources.get("edit"),function(){function d(){u(b,z,function(){B(z);b.editComment(b.content,
-function(){e(z)},function(b){c(z);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},b.isResolved),y(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){B(z);b.deleteComment(function(){for(var a=C(b).replies,c=0;c<a.length;c++)t.removeChild(a[c]);for(c=0;c<d.length;c++)if(d[c]==b){d.splice(c,1);break}F.style.display=0==t.getElementsByTagName("div").length?"block":"none"},function(b){c(z);a.handleError(b,null,null,
-null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));q||0!=l||y(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=C(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),
-l=0;l<k.length;l++)k[l]!=c.parentNode&&(k[l].style.display=d);D||(e[g].style.display="none")}p()}b.isResolved?x(mxResources.get("reOpened")+": ",!0,c,!1,!0):x(mxResources.get("markedAsResolved"),!1,c,!0)});z.appendChild(A);null!=f?t.insertBefore(z,f.nextSibling):t.appendChild(z);for(f=0;null!=b.replies&&f<b.replies.length;f++)A=b.replies[f],A.isResolved=b.isResolved,k(A,b.replies,null,l+1,m);null!=g&&(g.comment.id==b.id?(m=b.content,b.content=g.comment.content,u(b,z,g.saveCallback,g.deleteOnCancel),
-b.content=m):null==g.comment.id&&g.comment.pCommentId==b.id&&(t.appendChild(g.div),u(g.comment,g.div,g.saveCallback,g.deleteOnCancel)));return z}}var q=!a.canComment(),n=a.canReplyToReplies(),g=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var A=EditorUi.compactUi?"26px":"30px",t=document.createElement("div");t.className="geCommentsList";t.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":
-Dialog.backdropColor;t.style.bottom=parseInt(A)+7+"px";x.appendChild(t);var F=document.createElement("span");F.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(F,mxResources.get("noCommentsFound"));var y=document.createElement("div");y.className="geToolbarContainer geCommentsToolbar";y.style.height=A;y.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";y.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(y.style.filter=
-"none");A=document.createElement("a");A.className="geButton";mxClient.IS_QUIRKS&&(A.style.filter="none");if(!q){var E=A.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';E.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(E,"click",function(b){function d(){u(f,g,function(b){B(g);a.addComment(b,function(a){b.id=a;z.push(b);e(g)},function(b){c(g);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},
-!0)}var f=a.newComment("",a.getCurrentUser()),g=k(f,z,null,0);d();b.preventDefault();mxEvent.consume(b)});y.appendChild(E)}E=A.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';E.setAttribute("title",mxResources.get("showResolved"));var D=!1;"dark"==uiTheme&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(a){this.className=(D=!D)?"geButton geCheckedBtn":"geButton";L();a.preventDefault();mxEvent.consume(a)});y.appendChild(E);a.commentsRefreshNeeded()&&
-(E=A.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',E.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(E.style.filter="invert(100%)"),mxEvent.addListener(E,"click",function(a){L();a.preventDefault();mxEvent.consume(a)}),y.appendChild(E));a.commentsSaveNeeded()&&(A=A.cloneNode(),A.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',A.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&
-(A.style.filter="invert(100%)"),mxEvent.addListener(A,"click",function(a){m();a.preventDefault();mxEvent.consume(a)}),y.appendChild(A));x.appendChild(y);var z=[],L=mxUtils.bind(this,function(){this.hasError=!1;if(null!=g)try{g.div=g.div.cloneNode(!0);var b=g.div.querySelector(".geCommentEditTxtArea"),c=g.div.querySelector(".geCommentEditBtns");g.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}catch(C){a.handleError(C)}t.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
-IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});t.innerHTML="";t.appendChild(F);F.style.display="block";z=a;for(a=0;a<z.length;a++)b(z[a].replies),
-k(z[a],z,null,0,D);null!=g&&null==g.comment.id&&null==g.comment.pCommentId&&(t.appendChild(g.div),u(g.comment,g.div,g.saveCallback,g.deleteOnCancel))},mxUtils.bind(this,function(a){t.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=!0})):t.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});L();this.refreshComments=L;y=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(v(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}
-if(this.window.isVisible()){for(var b=t.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<z.length;d++)a(z[d])}});setInterval(y,6E4);this.refreshCommentsTime=y;this.window=new mxWindow(mxResources.get("comments"),x,b,f,d,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var O=mxUtils.bind(this,function(){var a=this.window.getX(),
-b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",O);this.destroy=function(){mxEvent.removeListener(window,"resize",O);this.window.destroy()}},ConfirmDialog=function(a,b,f,d,l,m,p,u,v,B,c){var e=document.createElement("div");e.style.textAlign="center";c=null!=c?c:44;var k=document.createElement("div");k.style.padding="6px";k.style.overflow="auto";k.style.maxHeight=c+"px";k.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(k.style.height="60px");mxUtils.write(k,b);
-e.appendChild(k);null!=B&&(k=document.createElement("div"),k.style.padding="6px 0 6px 0",b=document.createElement("img"),b.setAttribute("src",B),k.appendChild(b),e.appendChild(k));B=document.createElement("div");B.style.textAlign="center";B.style.whiteSpace="nowrap";var q=document.createElement("input");q.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(q.checked)});m.className="geBtn";null!=u&&(m.innerHTML=u+"<br>"+m.innerHTML,m.style.paddingBottom=
-"8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");a.editor.cancelFirst&&B.appendChild(m);var n=mxUtils.button(l||mxResources.get("ok"),function(){a.hideDialog();null!=f&&f(q.checked)});B.appendChild(n);null!=p?(n.innerHTML=p+"<br>"+n.innerHTML+"<br>",n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";a.editor.cancelFirst||B.appendChild(m);e.appendChild(B);v?(B.style.marginTop=
-"10px",k=document.createElement("p"),k.style.marginTop="20px",k.appendChild(q),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),k.appendChild(l),e.appendChild(k),mxEvent.addListener(l,"click",function(a){q.checked=!q.checked;mxEvent.consume(a)})):B.style.marginTop="12px";this.init=function(){n.focus()};this.container=e};function DiagramPage(a,b){this.node=a;null!=b?this.node.setAttribute("id",b):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
-DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,f){this.ui=a;this.page=b;this.previous=this.name=f}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
-function MovePage(a,b,f){this.ui=a;this.oldIndex=b;this.newIndex=f}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
-function SelectPage(a,b,f){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b),null!=f&&(b.viewState=f,this.neverShown=!1))}
-SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,b=this.ui.editor,f=b.graph,d=Graph.compressNode(b.getGraphXml(!0));mxUtils.setTextContent(a.node,d);a.viewState=f.getViewState();a.root=f.model.root;null!=a.model&&a.model.rootChanged(a.root);f.view.clear(a.root,!0);f.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;f.model.prefix=Editor.guid()+"-";f.model.rootChanged(a.root);
-f.setViewState(a.viewState);f.gridEnabled=f.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);b.updateGraphComponents();f.view.validate();f.blockMathRender=!0;f.sizeDidChange();f.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,f.selectUnlockedLayer());b.graph.fireEvent(new mxEventObject(mxEvent.ROOT));b.fireEvent(new mxEventObject("pageSelected","change",this))}};
-function ChangePage(a,b,f,d,l){SelectPage.call(this,a,f);this.relatedPage=b;this.index=d;this.previousIndex=null;this.noSelect=l}mxUtils.extend(ChangePage,SelectPage);
+var CommentsWindow=function(a,b,e,d,k,m){function p(){for(var a=q.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==q&&b++;E.style.display=0==b?"block":"none"}function u(a,b,c,d){function e(){b.removeChild(k);b.removeChild(m);g.style.display="block";f.style.display="block"}l={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className=
+"geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),p()):e();l=null});n.className="geCommentEditBtn";m.appendChild(n);var q=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();c(a);l=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this,
+function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(q.click(),mxEvent.consume(a)):27==a.keyCode&&(n.click(),mxEvent.consume(a)))}));q.focus();q.className="geCommentEditBtn gePrimaryBtn";m.appendChild(q);b.insertBefore(m,f);g.style.display="none";f.style.display="none";k.focus()}function x(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
+[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function B(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function c(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function f(a){a.style.border="";a.removeChild(a.busyImg)}function g(b,d,e,k,m){function z(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
+"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});N.appendChild(e);d&&(e.style.display="none")}function C(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=y;a(b);return{pdiv:d,replies:c}}function v(d,e,l,m,p){function n(){B(v);b.addReply(z,function(a){z.id=a;b.replies.push(z);f(v);l&&l()},function(b){q();c(v);a.handleError(b,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,p)}function q(){u(z,v,function(a){n()},!0)}var t=C().pdiv,z=a.newComment(d,a.getCurrentUser());z.pCommentId=b.id;null==b.replies&&(b.replies=[]);var v=g(z,b.replies,t,k+1);e?q():n()}if(m||!b.isResolved){E.style.display="none";var y=document.createElement("div");y.className="geCommentContainer";y.setAttribute("data-commentId",b.id);y.style.marginLeft=20*k+5+"px";b.isResolved&&"dark"!=uiTheme&&(y.style.backgroundColor="ghostWhite");
+var A=document.createElement("div");A.className="geCommentHeader";var G=document.createElement("img");G.className="geCommentUserImg";G.src=b.user.pictureUrl||Editor.userImage;A.appendChild(G);G=document.createElement("div");G.className="geCommentHeaderTxt";A.appendChild(G);var K=document.createElement("div");K.className="geCommentUsername";mxUtils.write(K,b.user.displayName||"");G.appendChild(K);K=document.createElement("div");K.className="geCommentDate";K.setAttribute("data-commentId",b.id);x(b,
+K);G.appendChild(K);y.appendChild(A);A=document.createElement("div");A.className="geCommentTxt";mxUtils.write(A,b.content||"");y.appendChild(A);A=document.createElement("div");A.className="geCommentActions";var N=document.createElement("ul");N.className="geCommentActionsList";A.appendChild(N);t||0!=k&&!n||z(mxResources.get("reply"),function(){v("",!0)},b.isResolved);G=a.getCurrentUser();null==G||G.id!=b.user.id||t||(z(mxResources.get("edit"),function(){function d(){u(b,y,function(){B(y);b.editComment(b.content,
+function(){f(y)},function(b){c(y);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},b.isResolved),z(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){B(y);b.deleteComment(function(){for(var a=C(b).replies,c=0;c<a.length;c++)q.removeChild(a[c]);for(c=0;c<d.length;c++)if(d[c]==b){d.splice(c,1);break}E.style.display=0==q.getElementsByTagName("div").length?"block":"none"},function(b){c(y);a.handleError(b,null,null,
+null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));t||0!=k||z(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=C(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var l=e[g].querySelectorAll(".geCommentAction"),
+k=0;k<l.length;k++)l[k]!=c.parentNode&&(l[k].style.display=d);D||(e[g].style.display="none")}p()}b.isResolved?v(mxResources.get("reOpened")+": ",!0,c,!1,!0):v(mxResources.get("markedAsResolved"),!1,c,!0)});y.appendChild(A);null!=e?q.insertBefore(y,e.nextSibling):q.appendChild(y);for(e=0;null!=b.replies&&e<b.replies.length;e++)A=b.replies[e],A.isResolved=b.isResolved,g(A,b.replies,null,k+1,m);null!=l&&(l.comment.id==b.id?(m=b.content,b.content=l.comment.content,u(b,y,l.saveCallback,l.deleteOnCancel),
+b.content=m):null==l.comment.id&&l.comment.pCommentId==b.id&&(q.appendChild(l.div),u(l.comment,l.div,l.saveCallback,l.deleteOnCancel)));return y}}var t=!a.canComment(),n=a.canReplyToReplies(),l=null,y=document.createElement("div");y.className="geCommentsWin";y.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var A=EditorUi.compactUi?"26px":"30px",q=document.createElement("div");q.className="geCommentsList";q.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":
+Dialog.backdropColor;q.style.bottom=parseInt(A)+7+"px";y.appendChild(q);var E=document.createElement("span");E.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(E,mxResources.get("noCommentsFound"));var z=document.createElement("div");z.className="geToolbarContainer geCommentsToolbar";z.style.height=A;z.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";z.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(z.style.filter=
+"none");A=document.createElement("a");A.className="geButton";mxClient.IS_QUIRKS&&(A.style.filter="none");if(!t){var G=A.cloneNode();G.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';G.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(G,"click",function(b){function d(){u(e,l,function(b){B(l);a.addComment(b,function(a){b.id=a;v.push(b);f(l)},function(b){c(l);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},
+!0)}var e=a.newComment("",a.getCurrentUser()),l=g(e,v,null,0);d();b.preventDefault();mxEvent.consume(b)});z.appendChild(G)}G=A.cloneNode();G.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';G.setAttribute("title",mxResources.get("showResolved"));var D=!1;"dark"==uiTheme&&(G.style.filter="invert(100%)");mxEvent.addListener(G,"click",function(a){this.className=(D=!D)?"geButton geCheckedBtn":"geButton";H();a.preventDefault();mxEvent.consume(a)});z.appendChild(G);a.commentsRefreshNeeded()&&
+(G=A.cloneNode(),G.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',G.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(G.style.filter="invert(100%)"),mxEvent.addListener(G,"click",function(a){H();a.preventDefault();mxEvent.consume(a)}),z.appendChild(G));a.commentsSaveNeeded()&&(A=A.cloneNode(),A.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',A.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&
+(A.style.filter="invert(100%)"),mxEvent.addListener(A,"click",function(a){m();a.preventDefault();mxEvent.consume(a)}),z.appendChild(A));y.appendChild(z);var v=[],H=mxUtils.bind(this,function(){this.hasError=!1;if(null!=l)try{l.div=l.div.cloneNode(!0);var b=l.div.querySelector(".geCommentEditTxtArea"),c=l.div.querySelector(".geCommentEditBtns");l.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}catch(C){a.handleError(C)}q.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});q.innerHTML="";q.appendChild(E);E.style.display="block";v=a;for(a=0;a<v.length;a++)b(v[a].replies),
+g(v[a],v,null,0,D);null!=l&&null==l.comment.id&&null==l.comment.pCommentId&&(q.appendChild(l.div),u(l.comment,l.div,l.saveCallback,l.deleteOnCancel))},mxUtils.bind(this,function(a){q.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=!0})):q.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});H();this.refreshComments=H;z=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(x(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}
+if(this.window.isVisible()){for(var b=q.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<v.length;d++)a(v[d])}});setInterval(z,6E4);this.refreshCommentsTime=z;this.window=new mxWindow(mxResources.get("comments"),y,b,e,d,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var M=mxUtils.bind(this,function(){var a=this.window.getX(),
+b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",M);this.destroy=function(){mxEvent.removeListener(window,"resize",M);this.window.destroy()}},ConfirmDialog=function(a,b,e,d,k,m,p,u,x,B,c){var f=document.createElement("div");f.style.textAlign="center";c=null!=c?c:44;var g=document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight=c+"px";g.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(g.style.height="60px");mxUtils.write(g,b);
+f.appendChild(g);null!=B&&(g=document.createElement("div"),g.style.padding="6px 0 6px 0",b=document.createElement("img"),b.setAttribute("src",B),g.appendChild(b),f.appendChild(g));B=document.createElement("div");B.style.textAlign="center";B.style.whiteSpace="nowrap";var t=document.createElement("input");t.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(t.checked)});m.className="geBtn";null!=u&&(m.innerHTML=u+"<br>"+m.innerHTML,m.style.paddingBottom=
+"8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");a.editor.cancelFirst&&B.appendChild(m);var n=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=e&&e(t.checked)});B.appendChild(n);null!=p?(n.innerHTML=p+"<br>"+n.innerHTML+"<br>",n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";a.editor.cancelFirst||B.appendChild(m);f.appendChild(B);x?(B.style.marginTop=
+"10px",g=document.createElement("p"),g.style.marginTop="20px",g.appendChild(t),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),g.appendChild(k),f.appendChild(g),mxEvent.addListener(k,"click",function(a){t.checked=!t.checked;mxEvent.consume(a)})):B.style.marginTop="12px";this.init=function(){n.focus()};this.container=f};function DiagramPage(a,b){this.node=a;null!=b?this.node.setAttribute("id",b):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,e){this.ui=a;this.page=b;this.previous=this.name=e}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
+function MovePage(a,b,e){this.ui=a;this.oldIndex=b;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
+function SelectPage(a,b,e){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b),null!=e&&(b.viewState=e,this.neverShown=!1))}
+SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,b=this.ui.editor,e=b.graph,d=Graph.compressNode(b.getGraphXml(!0));mxUtils.setTextContent(a.node,d);a.viewState=e.getViewState();a.root=e.model.root;null!=a.model&&a.model.rootChanged(a.root);e.view.clear(a.root,!0);e.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;e.model.prefix=Editor.guid()+"-";e.model.rootChanged(a.root);
+e.setViewState(a.viewState);e.gridEnabled=e.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);b.updateGraphComponents();e.view.validate();e.blockMathRender=!0;e.sizeDidChange();e.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,e.selectUnlockedLayer());b.graph.fireEvent(new mxEventObject(mxEvent.ROOT));b.fireEvent(new mxEventObject("pageSelected","change",this))}};
+function ChangePage(a,b,e,d,k){SelectPage.call(this,a,e);this.relatedPage=b;this.index=d;this.previousIndex=null;this.noSelect=k}mxUtils.extend(ChangePage,SelectPage);
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var a=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(a,1);this.index=a}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;
EditorUi.prototype.getSelectedPageIndex=function(){var a=null;if(null!=this.pages&&null!=this.currentPage)for(var b=0;b<this.pages.length;b++)if(this.pages[b]==this.currentPage){a=b;break}return a};EditorUi.prototype.getPageById=function(a){if(null!=this.pages)for(var b=0;b<this.pages.length;b++)if(this.pages[b].getId()==a)return this.pages[b];return null};
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.keyHandler.bindAction(33,!0,"previousPage",!0);this.keyHandler.bindAction(34,!0,"nextPage",!0);var a=this.editor.graph,b=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var d=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";d!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var f=null,d=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=f&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,
-a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft=a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),f=b);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(a,b){for(var f=b.getProperty("edit").changes,l=0;l<f.length;l++)if(f[l]instanceof SelectPage||f[l]instanceof RenamePage||f[l]instanceof MovePage||f[l]instanceof mxRootChange){d();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
-EditorUi.prototype.restoreViewState=function(a,b,f){a=null!=a?this.getPageById(a.getId()):null;var d=this.editor.graph;null!=a&&null!=this.currentPage&&null!=this.pages&&(a!=this.currentPage?this.selectPage(a,!0,b):(d.setViewState(b),this.editor.updateGraphComponents(),d.view.revalidate(),d.sizeDidChange()),d.container.scrollLeft=d.view.translate.x*d.view.scale+b.scrollLeft,d.container.scrollTop=d.view.translate.y*d.view.scale+b.scrollTop,d.restoreSelection(f))};
-Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),f=parseFloat(a.getAttribute("pageScale")),d=parseFloat(a.getAttribute("pageWidth")),l=parseFloat(a.getAttribute("pageHeight")),m=a.getAttribute("background"),p=a.getAttribute("backgroundImage"),p=null!=p&&0<p.length?JSON.parse(p):null,u=a.getAttribute("extFonts");if(u)try{u=u.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(v){console.log("ExtFonts format error: "+v.message)}return{gridEnabled:"0"!=
-a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=m&&0<m.length?m:null,backgroundImage:null!=p?new mxImage(p.src,p.width,p.height):null,pageScale:isNaN(f)?mxGraph.prototype.pageScale:f,pageFormat:isNaN(d)||isNaN(l)?"undefined"===
-typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat():new mxRectangle(0,0,d,l),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,extFonts:u||[]}};
-Graph.prototype.saveViewState=function(a,b,f){f||(b.setAttribute("grid",null==a||a.gridEnabled?"1":"0"),b.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize),b.setAttribute("guides",null==a||a.guidesEnabled?"1":"0"),b.setAttribute("tooltips",null==a||a.tooltips?"1":"0"),b.setAttribute("connect",null==a||a.connect?"1":"0"),b.setAttribute("arrows",null==a||a.arrows?"1":"0"),b.setAttribute("page",null==a&&this.defaultPageVisible||null!=a&&a.pageVisible?"1":"0"),b.setAttribute("fold",
-null==a||a.foldingEnabled?"1":"0"));b.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);f=null!=a?a.pageFormat:"undefined"===typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=f&&(b.setAttribute("pageWidth",f.width),b.setAttribute("pageHeight",f.height));null!=a&&null!=a.background&&b.setAttribute("background",a.background);null!=a&&null!=a.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(a.backgroundImage));b.setAttribute("math",
+this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";d!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var e=null,d=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=e&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,
+a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft=a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),e=b);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(a,b){for(var e=b.getProperty("edit").changes,k=0;k<e.length;k++)if(e[k]instanceof SelectPage||e[k]instanceof RenamePage||e[k]instanceof MovePage||e[k]instanceof mxRootChange){d();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
+EditorUi.prototype.restoreViewState=function(a,b,e){a=null!=a?this.getPageById(a.getId()):null;var d=this.editor.graph;null!=a&&null!=this.currentPage&&null!=this.pages&&(a!=this.currentPage?this.selectPage(a,!0,b):(d.setViewState(b),this.editor.updateGraphComponents(),d.view.revalidate(),d.sizeDidChange()),d.container.scrollLeft=d.view.translate.x*d.view.scale+b.scrollLeft,d.container.scrollTop=d.view.translate.y*d.view.scale+b.scrollTop,d.restoreSelection(e))};
+Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=parseFloat(a.getAttribute("pageScale")),d=parseFloat(a.getAttribute("pageWidth")),k=parseFloat(a.getAttribute("pageHeight")),m=a.getAttribute("background"),p=a.getAttribute("backgroundImage"),p=null!=p&&0<p.length?JSON.parse(p):null,u=a.getAttribute("extFonts");if(u)try{u=u.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(x){console.log("ExtFonts format error: "+x.message)}return{gridEnabled:"0"!=
+a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=m&&0<m.length?m:null,backgroundImage:null!=p?new mxImage(p.src,p.width,p.height):null,pageScale:isNaN(e)?mxGraph.prototype.pageScale:e,pageFormat:isNaN(d)||isNaN(k)?"undefined"===
+typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat():new mxRectangle(0,0,d,k),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,extFonts:u||[]}};
+Graph.prototype.saveViewState=function(a,b,e){e||(b.setAttribute("grid",null==a||a.gridEnabled?"1":"0"),b.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize),b.setAttribute("guides",null==a||a.guidesEnabled?"1":"0"),b.setAttribute("tooltips",null==a||a.tooltips?"1":"0"),b.setAttribute("connect",null==a||a.connect?"1":"0"),b.setAttribute("arrows",null==a||a.arrows?"1":"0"),b.setAttribute("page",null==a&&this.defaultPageVisible||null!=a&&a.pageVisible?"1":"0"),b.setAttribute("fold",
+null==a||a.foldingEnabled?"1":"0"));b.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);e=null!=a?a.pageFormat:"undefined"===typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=e&&(b.setAttribute("pageWidth",e.width),b.setAttribute("pageHeight",e.height));null!=a&&null!=a.background&&b.setAttribute("background",a.background);null!=a&&null!=a.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(a.backgroundImage));b.setAttribute("math",
null!=a&&a.mathEnabled?"1":"0");b.setAttribute("shadow",null!=a&&a.shadowVisible?"1":"0");null!=a&&null!=a.extFonts&&0<a.extFonts.length&&b.setAttribute("extFonts",a.extFonts.map(function(a){return a.name+"^"+a.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,extFonts:this.extFonts}};
Graph.prototype.setViewState=function(a){if(null!=a){this.lastPasteXml=a.lastPasteXml;this.pasteCounter=a.pasteCounter||0;this.mathEnabled=a.mathEnabled;this.gridEnabled=a.gridEnabled;this.gridSize=a.gridSize;this.graphHandler.guidesEnabled=a.guidesEnabled;this.foldingEnabled=a.foldingEnabled;this.setShadowVisible(a.shadowVisible,!1);this.scrollbars=a.scrollbars;this.pageVisible=!this.isViewer()&&a.pageVisible;this.background=a.background;this.backgroundImage=a.backgroundImage;this.pageScale=a.pageScale;
-this.pageFormat=a.pageFormat;this.view.currentRoot=a.currentRoot;this.defaultParent=a.defaultParent;this.connectionArrowsEnabled=a.arrows;this.setTooltips(a.tooltips);this.setConnectable(a.connect);var b=this.extFonts;this.extFonts=a.extFonts||[];if(null!=b)for(var f=0;f<b.length;f++){var d=document.getElementById("extFont_"+b[f].name);null!=d&&d.parentNode.removeChild(d)}for(f=0;f<this.extFonts.length;f++)this.addExtFont(this.extFonts[f].name,this.extFonts[f].url,!0);this.view.scale=null!=a.scale?
+this.pageFormat=a.pageFormat;this.view.currentRoot=a.currentRoot;this.defaultParent=a.defaultParent;this.connectionArrowsEnabled=a.arrows;this.setTooltips(a.tooltips);this.setConnectable(a.connect);var b=this.extFonts;this.extFonts=a.extFonts||[];if(null!=b)for(var e=0;e<b.length;e++){var d=document.getElementById("extFont_"+b[e].name);null!=d&&d.parentNode.removeChild(d)}for(e=0;e<this.extFonts.length;e++)this.addExtFont(this.extFonts[e].name,this.extFonts[e].url,!0);this.view.scale=null!=a.scale?
a.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!=a.translate&&(this.view.translate=a.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=!0,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat="undefined"===typeof mxSettings?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.extFonts=[];this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged",
"state",a))};
-Graph.prototype.addExtFont=function(a,b,f){if(a&&b){var d="extFont_"+a;if(null==document.getElementById(d))if(0==b.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",b,null,d);else{var l=document.createElement("style");l.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+a+'";\n\tsrc: url("'+b+'");\n}'));l.setAttribute("id",d);document.getElementsByTagName("head")[0].appendChild(l)}if(!f){null==this.extFonts&&(this.extFonts=[]);f=this.extFonts;d=!0;for(l=0;l<f.length;l++)if(f[l].name==a){d=
+Graph.prototype.addExtFont=function(a,b,e){if(a&&b){var d="extFont_"+a;if(null==document.getElementById(d))if(0==b.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",b,null,d);else{var k=document.createElement("style");k.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+a+'";\n\tsrc: url("'+b+'");\n}'));k.setAttribute("id",d);document.getElementsByTagName("head")[0].appendChild(k)}if(!e){null==this.extFonts&&(this.extFonts=[]);e=this.extFonts;d=!0;for(k=0;k<e.length;k++)if(e[k].name==a){d=
!1;break}d&&this.extFonts.push({name:a,url:b})}}};
-EditorUi.prototype.updatePageRoot=function(a){if(null==a.root){var b=this.editor.extractGraphModel(a.node),f=Editor.extractParserError(b);if(f)throw Error(f);null!=b?(a.graphModelNode=b,a.viewState=this.editor.graph.createViewState(b),f=new mxCodec(b.ownerDocument),a.root=f.decode(b).root):a.root=this.editor.graph.model.createRoot()}else if(null==a.viewState){if(null==a.graphModelNode){b=this.editor.extractGraphModel(a.node);if(f=Editor.extractParserError(b))throw Error(f);null!=b&&(a.graphModelNode=
+EditorUi.prototype.updatePageRoot=function(a){if(null==a.root){var b=this.editor.extractGraphModel(a.node),e=Editor.extractParserError(b);if(e)throw Error(e);null!=b?(a.graphModelNode=b,a.viewState=this.editor.graph.createViewState(b),e=new mxCodec(b.ownerDocument),a.root=e.decode(b).root):a.root=this.editor.graph.model.createRoot()}else if(null==a.viewState){if(null==a.graphModelNode){b=this.editor.extractGraphModel(a.node);if(e=Editor.extractParserError(b))throw Error(e);null!=b&&(a.graphModelNode=
b)}null!=a.graphModelNode&&(a.viewState=this.editor.graph.createViewState(a.graphModelNode))}return a};
-EditorUi.prototype.selectPage=function(a,b,f){try{if(a!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b=null!=b?b:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var l=new SelectPage(this,a,f);l.execute();d.add(l);d.notify();this.editor.graph.tooltipHandler.hide();b||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}}catch(m){this.handleError(m)}};
+EditorUi.prototype.selectPage=function(a,b,e){try{if(a!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b=null!=b?b:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var k=new SelectPage(this,a,e);k.execute();d.add(k);d.notify();this.editor.graph.tooltipHandler.hide();b||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}}catch(m){this.handleError(m)}};
EditorUi.prototype.selectNextPage=function(a){var b=this.currentPage;null!=b&&null!=this.pages&&(b=mxUtils.indexOf(this.pages,b),a?this.selectPage(this.pages[mxUtils.mod(b+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(b-1,this.pages.length)]))};
-EditorUi.prototype.insertPage=function(a,b){if(this.editor.graph.isEnabled()){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);a=null!=a?a:this.createPage(null,this.createPageId());b=null!=b?b:this.pages.length;var f=new ChangePage(this,a,a,b);this.editor.graph.model.execute(f)}return a};EditorUi.prototype.createPageId=function(){var a;do a=Editor.guid();while(null!=this.getPageById(a));return a};
-EditorUi.prototype.createPage=function(a,b){var f=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),b);f.setName(null!=a?a:this.createPageName());return f};EditorUi.prototype.createPageName=function(){for(var a={},b=0;b<this.pages.length;b++){var f=this.pages[b].getName();null!=f&&0<f.length&&(a[f]=f)}b=this.pages.length;do f=mxResources.get("pageWithNumber",[++b]);while(null!=a[f]);return f};
-EditorUi.prototype.removePage=function(a){try{var b=this.editor.graph,f=mxUtils.indexOf(this.pages,a);if(b.isEnabled()&&0<=f){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b.model.beginUpdate();try{var d=this.currentPage;d==a&&1<this.pages.length?(f==this.pages.length-1?f--:f++,d=this.pages[f]):1>=this.pages.length&&(d=this.insertPage(),b.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1]))));b.model.execute(new ChangePage(this,a,d))}finally{b.model.endUpdate()}}}catch(l){this.handleError(l)}return a};
-EditorUi.prototype.duplicatePage=function(a,b){var f=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var l=a.node.cloneNode(!1);l.removeAttribute("id");f=new DiagramPage(l);f.root=d.cloneCell(d.model.root);f.viewState=d.getViewState();f.viewState.scale=1;f.viewState.scrollLeft=null;f.viewState.scrollTop=null;f.viewState.currentRoot=null;f.viewState.defaultParent=null;f.setName(b);f=this.insertPage(f,mxUtils.indexOf(this.pages,a)+1)}}catch(m){this.handleError(m)}return f};
+EditorUi.prototype.insertPage=function(a,b){if(this.editor.graph.isEnabled()){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);a=null!=a?a:this.createPage(null,this.createPageId());b=null!=b?b:this.pages.length;var e=new ChangePage(this,a,a,b);this.editor.graph.model.execute(e)}return a};EditorUi.prototype.createPageId=function(){var a;do a=Editor.guid();while(null!=this.getPageById(a));return a};
+EditorUi.prototype.createPage=function(a,b){var e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),b);e.setName(null!=a?a:this.createPageName());return e};EditorUi.prototype.createPageName=function(){for(var a={},b=0;b<this.pages.length;b++){var e=this.pages[b].getName();null!=e&&0<e.length&&(a[e]=e)}b=this.pages.length;do e=mxResources.get("pageWithNumber",[++b]);while(null!=a[e]);return e};
+EditorUi.prototype.removePage=function(a){try{var b=this.editor.graph,e=mxUtils.indexOf(this.pages,a);if(b.isEnabled()&&0<=e){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b.model.beginUpdate();try{var d=this.currentPage;d==a&&1<this.pages.length?(e==this.pages.length-1?e--:e++,d=this.pages[e]):1>=this.pages.length&&(d=this.insertPage(),b.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1]))));b.model.execute(new ChangePage(this,a,d))}finally{b.model.endUpdate()}}}catch(k){this.handleError(k)}return a};
+EditorUi.prototype.duplicatePage=function(a,b){var e=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var k=a.node.cloneNode(!1);k.removeAttribute("id");e=new DiagramPage(k);e.root=d.cloneCell(d.model.root);e.viewState=d.getViewState();e.viewState.scale=1;e.viewState.scrollLeft=null;e.viewState.scrollTop=null;e.viewState.currentRoot=null;e.viewState.defaultParent=null;e.setName(b);e=this.insertPage(e,mxUtils.indexOf(this.pages,a)+1)}}catch(m){this.handleError(m)}return e};
EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var b=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(b){null!=b&&0<b.length&&this.editor.graph.model.execute(new RenamePage(this,a,b))}),mxResources.get("rename"));this.showDialog(b.container,300,80,!0,!0);b.init()}return a};EditorUi.prototype.movePage=function(a,b){this.editor.graph.model.execute(new MovePage(this,a,b))};
EditorUi.prototype.createTabContainer=function(){var a=document.createElement("div");a.className="geTabContainer";a.style.position="absolute";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.height="0px";return a};
-EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,b=document.createElement("div");b.style.position="relative";b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="13px";b.style.marginLeft="30px";for(var f=this.editor.isChromelessView()?29:59,d=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
-f)/this.pages.length)+1),l=null,m=0;m<this.pages.length;m++)mxUtils.bind(this,function(d,c){this.pages[d]==this.currentPage?(c.className="geActivePage",c.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#fff"):c.className="geInactivePage";c.setAttribute("draggable","true");mxEvent.addListener(c,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),l=d):mxEvent.consume(b)}));mxEvent.addListener(c,"dragend",mxUtils.bind(this,function(a){l=
-null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null!=l&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=l&&d!=l&&this.movePage(l,d);a.stopPropagation();a.preventDefault()}));b.appendChild(c)})(m,this.createTabForPage(this.pages[m],d,this.pages[m]!=this.currentPage,m+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);d=this.createPageMenuTab();
-this.tabContainer.appendChild(d);d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(b.clientWidth>this.tabContainer.clientWidth-f){null!=d&&(d.style.position="absolute",d.style.right="0px",b.style.marginRight="30px");var p=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");p.style.position="absolute";p.style.right=this.editor.chromeless?"29px":"55px";p.style.fontSize="13pt";this.tabContainer.appendChild(p);var u=this.createControlTab(4,"&nbsp;&#10095;");
-u.style.position="absolute";u.style.right=this.editor.chromeless?"0px":"29px";u.style.fontSize="13pt";this.tabContainer.appendChild(u);var v=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=v+"px";mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,v-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(p,0<b.scrollLeft?100:
-50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(u,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,v-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,b=document.createElement("div");b.style.position="relative";b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="13px";b.style.marginLeft="30px";for(var e=this.editor.isChromelessView()?29:59,d=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
+e)/this.pages.length)+1),k=null,m=0;m<this.pages.length;m++)mxUtils.bind(this,function(d,c){this.pages[d]==this.currentPage?(c.className="geActivePage",c.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#fff"):c.className="geInactivePage";c.setAttribute("draggable","true");mxEvent.addListener(c,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),k=d):mxEvent.consume(b)}));mxEvent.addListener(c,"dragend",mxUtils.bind(this,function(a){k=
+null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=k&&d!=k&&this.movePage(k,d);a.stopPropagation();a.preventDefault()}));b.appendChild(c)})(m,this.createTabForPage(this.pages[m],d,this.pages[m]!=this.currentPage,m+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);d=this.createPageMenuTab();
+this.tabContainer.appendChild(d);d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(b.clientWidth>this.tabContainer.clientWidth-e){null!=d&&(d.style.position="absolute",d.style.right="0px",b.style.marginRight="30px");var p=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");p.style.position="absolute";p.style.right=this.editor.chromeless?"29px":"55px";p.style.fontSize="13pt";this.tabContainer.appendChild(p);var u=this.createControlTab(4,"&nbsp;&#10095;");
+u.style.position="absolute";u.style.right=this.editor.chromeless?"0px":"29px";u.style.fontSize="13pt";this.tabContainer.appendChild(u);var x=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=x+"px";mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,x-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(p,0<b.scrollLeft?100:
+50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(u,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,x-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(a){var b=document.createElement("div");b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.whiteSpace="nowrap";b.style.boxSizing="border-box";b.style.position="relative";b.style.overflow="hidden";b.style.textAlign="center";b.style.marginLeft="-1px";b.style.height=this.tabContainer.clientHeight+"px";b.style.padding="12px 4px 8px 4px";b.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #e8eaed";b.style.borderTopStyle="none";b.style.borderBottomStyle=
"none";b.style.backgroundColor=this.tabContainer.style.backgroundColor;b.style.cursor="move";b.style.color="gray";a&&(mxEvent.addListener(b,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(b.style.backgroundColor="dark"==uiTheme?"black":"#e8eaed",mxEvent.consume(a))})),mxEvent.addListener(b,"mouseleave",mxUtils.bind(this,function(a){b.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return b};
-EditorUi.prototype.createControlTab=function(a,b){var f=this.createTab(!0);f.style.lineHeight=this.tabContainerHeight+"px";f.style.paddingTop=a+"px";f.style.cursor="pointer";f.style.width="30px";f.innerHTML=b;null!=f.firstChild&&null!=f.firstChild.style&&mxUtils.setOpacity(f.firstChild,40);return f};
+EditorUi.prototype.createControlTab=function(a,b){var e=this.createTab(!0);e.style.lineHeight=this.tabContainerHeight+"px";e.style.paddingTop=a+"px";e.style.cursor="pointer";e.style.width="30px";e.innerHTML=b;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e};
EditorUi.prototype.createPageMenuTab=function(){var a=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;margin-top:5px;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("pages"));a.style.position="absolute";a.style.marginLeft="0px";a.style.top="0px";a.style.left="1px";mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var d=
-0;d<this.pages.length;d++)mxUtils.bind(this,function(d){var c=a.addItem(this.pages[d].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[d])}),b);this.pages[d]==this.currentPage&&a.addCheckmark(c,Editor.checkmarkImage)})(d);if(this.editor.graph.isEnabled()){a.addSeparator(b);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),b);var f=this.currentPage;null!=f&&(a.addSeparator(b),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this,
-function(){this.removePage(f)}),b),a.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(f,f.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(f,mxResources.get("copyOf",[f.getName()]))}),b))}}));b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var d=
-mxEvent.getClientX(a),l=mxEvent.getClientY(a);b.popup(d,l,null,a);this.setCurrentMenu(b);mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
-EditorUi.prototype.createTabForPage=function(a,b,f,d){f=this.createTab(f);var l=a.getName()||mxResources.get("untitled"),m=a.getId();f.setAttribute("title",l+(null!=m?" ("+m+")":"")+" ["+d+"]");mxUtils.write(f,l);f.style.maxWidth=b+"px";f.style.width=b+"px";this.addTabListeners(a,f);42<b&&(f.style.textOverflow="ellipsis");return f};
-EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var f=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,l=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){d=null!=this.currentMenu;l=a==this.currentPage;f.isMouseDown||l||this.selectPage(a)}),null,mxUtils.bind(this,function(m){if(f.isEnabled()&&!f.isMouseDown&&(mxEvent.isTouchEvent(m)&&l||mxEvent.isPopupTrigger(m))){f.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!d){var p=new mxPopupMenu(this.createPageMenu(a));p.div.className+=" geMenubarMenu";p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);this.resetCurrentMenu();p.destroy()});var u=mxEvent.getClientX(m),v=mxEvent.getClientY(m);p.popup(u,v,null,m);this.setCurrentMenu(p,b)}mxEvent.consume(m)}}))};
-EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(f,d){f.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),d);f.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),d);f.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),d);var l=this.getCurrentFile();null!=l&&l.constructor!=LocalFile&&(f.addSeparator(d),f.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){var b=this.getSearch("create title mode url drive splash state".split(" ")),b=b+((0==b.length?"?":"&")+"page-id="+a.getId()),b=window.location.protocol+"//"+window.location.host+"/"+b+"#"+l.getHash(),b=new EmbedDialog(this,b);this.showDialog(b.container,440,240,!0,!0);b.init()}),d));f.addSeparator(d);f.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,mxResources.get("copyOf",[a.getName()]))}),d)})};
-(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(b){a.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,f,d){d.ui=a.ui;return f};a.afterDecode=function(a,f,d){a=d.oldIndex;d.oldIndex=d.newIndex;d.newIndex=a;return d};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,f,d){d.ui=a.ui;return f};a.afterDecode=function(a,f,d){a=d.previous;d.previous=d.name;d.name=a;return d};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),b="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,d,l){l.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(l.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.viewState&&l.setAttribute("viewState",JSON.stringify(d.relatedPage.viewState,function(a,d){return 0>mxUtils.indexOf(b,
-a)?d:void 0})),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,l));return l};a.beforeDecode=function(a,b,l){l.ui=a.ui;l.relatedPage=l.ui.getPageById(b.getAttribute("relatedPage"));if(null==l.relatedPage){var d=b.ownerDocument.createElement("diagram");d.setAttribute("id",b.getAttribute("relatedPage"));d.setAttribute("name",b.getAttribute("name"));l.relatedPage=new DiagramPage(d);d=b.getAttribute("viewState");null!=d&&(l.relatedPage.viewState=JSON.parse(d),b.removeAttribute("viewState"));
-b=b.cloneNode(!0);d=b.firstChild;if(null!=d)for(l.relatedPage.root=a.decodeCell(d,!1),l=d.nextSibling,d.parentNode.removeChild(d),d=l;null!=d;){l=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var f=d.getAttribute("id");null==a.lookup(f)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=l}}return b};a.afterDecode=function(a,b,l){l.index=l.previousIndex;return l};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png";EditorUi.prototype.altShiftActions[68]=
-"selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,d,f,u,v){d=null!=d?d:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var l=f.slice(),c=[],e=0;e<f.length;e++){var k=this.view.getState(f[e]),m=null!=k?k.style:this.getCellStyle(f[e]);"1"==mxUtils.getValue(m,"treeFolding","0")&&(this.traverse(f[e],!0,mxUtils.bind(this,function(a,b){null!=b&&c.push(b);a!=f[e]&&c.push(a);return a==f[e]||!this.model.isCollapsed(a)})),
-this.model.setCollapsed(f[e],a))}for(e=0;e<c.length;e++)this.model.setVisible(c[e],!a);f=l;f=b.apply(this,arguments)}finally{this.model.endUpdate()}return f};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return x.isVertex(a)&&f(a)}function d(a){var b=!1;null!=a&&(b=g.view.getState(a),b="1"==(null!=b?b.style:g.getCellStyle(a)).treeMoving);
-return b}function f(a){var b=!1;null!=a&&(a=x.getParent(a),b=g.view.getState(a),b="tree"==(null!=b?b.style:g.getCellStyle(a)).containerType);return b}function u(a){var b=!1;null!=a&&(a=x.getParent(a),b=g.view.getState(a),g.view.getState(a),b=null!=(null!=b?b.style:g.getCellStyle(a)).childLayout);return b}function v(a){a=g.view.getState(a);if(null!=a){var b=g.getIncomingEdges(a.cell);if(0<b.length&&(b=g.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==
-a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function B(a,b){b=null!=b?b:!0;g.model.beginUpdate();try{var c=g.model.getParent(a),d=g.getIncomingEdges(a),e=g.cloneCells([d[0],a]);g.model.setTerminal(e[0],g.model.getTerminal(d[0],!0),!0);var f=v(a),k=c.geometry;f==mxConstants.DIRECTION_SOUTH||
-f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;g.view.currentRoot!=c&&(e[1].geometry.x-=k.x,e[1].geometry.y-=k.y);var l=g.view.getState(a),m=g.view.scale;if(null!=l){var n=mxRectangle.fromRectangle(l);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*m:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*m;var p=g.getOutgoingEdges(g.model.getTerminal(d[0],
-!0));if(null!=p){for(var q=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,t=k=d=0;t<p.length;t++){var y=g.model.getTerminal(p[t],!1);if(f==v(y)){var u=g.view.getState(y);y!=a&&null!=u&&(q&&b!=u.getCenterX()<l.getCenterX()||!q&&b!=u.getCenterY()<l.getCenterY())&&mxUtils.intersects(n,u)&&(d=10+Math.max(d,(Math.min(n.x+n.width,u.x+u.width)-Math.max(n.x,u.x))/m),k=10+Math.max(k,(Math.min(n.y+n.height,u.y+u.height)-Math.max(n.y,u.y))/m))}}q?k=0:d=0;for(t=0;t<p.length;t++)if(y=g.model.getTerminal(p[t],
-!1),f==v(y)&&(u=g.view.getState(y),y!=a&&null!=u&&(q&&b!=u.getCenterX()<l.getCenterX()||!q&&b!=u.getCenterY()<l.getCenterY()))){var C=[];g.traverse(u.cell,!0,function(a,b){null!=b&&C.push(b);C.push(a);return!0});g.moveCells(C,(b?1:-1)*d,(b?1:-1)*k)}}}return g.addCells(e,c)}finally{g.model.endUpdate()}}function c(a){g.model.beginUpdate();try{var b=v(a),c=g.getIncomingEdges(a),d=g.cloneCells([c[0],a]);g.model.setTerminal(c[0],d[1],!1);g.model.setTerminal(d[0],d[1],!0);g.model.setTerminal(d[0],a,!1);
-var e=g.model.getParent(a),f=e.geometry,k=[];g.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);g.traverse(a,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});var l=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?l=0:b==mxConstants.DIRECTION_NORTH?(l=0,m=-m):b==mxConstants.DIRECTION_WEST?(l=-l,m=0):b==mxConstants.DIRECTION_EAST&&(m=0);g.moveCells(k,l,m);return g.addCells(d,e)}finally{g.model.endUpdate()}}function e(a){g.model.beginUpdate();try{var b=
-g.model.getParent(a),c=g.getIncomingEdges(a),d=g.cloneCells([c[0],a]);g.model.setTerminal(d[0],a,!0);var c=g.getOutgoingEdges(a),e=b.geometry,f=[];g.view.currentRoot==b&&(e=new mxRectangle);for(var k=0;k<c.length;k++){var l=g.model.getTerminal(c[k],!1);null!=l&&f.push(l)}var m=g.view.getBounds(f),n=v(a),p=g.view.translate,q=g.view.scale;n==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/q-p.x-e.x+10,d[1].geometry.y+=d[1].geometry.height-
-e.y+40):n==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/q-p.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height+e.y+40):(d[1].geometry.x=n==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width+e.x+40):d[1].geometry.x+(d[1].geometry.width-e.x+40),d[1].geometry.y=null==m?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(m.y+m.height)/q-p.y+-e.y+10);return g.addCells(d,b)}finally{g.model.endUpdate()}}function k(a,
-b,c){a=g.getOutgoingEdges(a);c=g.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=g.view.getState(g.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function q(a,b){var c=v(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
-c==mxConstants.DIRECTION_WEST)==d&&c!=b?n.actions.get("selectParent").funct():c==b?(d=g.getOutgoingEdges(a),null!=d&&0<d.length&&g.setSelectionCell(g.model.getTerminal(d[0],!1))):(c=g.getIncomingEdges(a),null!=c&&0<c.length&&(d=k(g.model.getTerminal(c[0],!0),d,a),c=g.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&g.setSelectionCell(d[c].cell)))))}var n=this,g=n.editor.graph,x=g.getModel(),A=n.menus.createPopupMenu;
-n.menus.createPopupMenu=function(a,c,d){A.apply(this,arguments);if(1==g.getSelectionCount()){c=g.getSelectionCell();var e=g.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(g.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(g.getSelectionCell())&&(a.addSeparator(),0<g.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};n.actions.addAction("selectChildren",function(){if(g.isEnabled()&&
-1==g.getSelectionCount()){var a=g.getSelectionCell(),a=g.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(g.model.getTerminal(a[c],!1));g.setSelectionCells(b)}}},null,null,"Alt+Shift+X");n.actions.addAction("selectSiblings",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),a=g.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=g.getOutgoingEdges(g.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(g.model.getTerminal(a[c],
-!1));g.setSelectionCells(b)}}},null,null,"Alt+Shift+S");n.actions.addAction("selectParent",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),a=g.getIncomingEdges(a);null!=a&&0<a.length&&g.setSelectionCell(g.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");n.actions.addAction("selectDescendants",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),b=[];g.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});g.setSelectionCells(b)}},
-null,null,"Alt+Shift+D");var t=g.removeCells;g.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var d=[],e=0;e<a.length;e++){var k=a[e];x.isEdge(k)&&f(k)&&(d.push(k),k=x.getTerminal(k,!1));b(k)?(g.traverse(k,!0,function(a,b){null!=b&&d.push(b);d.push(a);return!0}),k=g.getIncomingEdges(a[e]),a=a.concat(k)):d.push(a[e])}a=d;return t.apply(this,arguments)};n.hoverIcons.getStateAt=function(a,c,
-d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var F=g.duplicateCells;g.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=g.view.getState(d[e]);if(null!=f&&b(f.cell))for(var k=g.getIncomingEdges(f.cell),f=0;f<k.length;f++)mxUtils.remove(k[f],a)}this.model.beginUpdate();try{var l=F.call(this,a,c);if(l.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var m=g.getIncomingEdges(l[e]),k=g.getIncomingEdges(a[e]);
-if(0==m.length&&0<k.length){var n=this.cloneCell(k[0]);this.addEdge(n,g.getDefaultParent(),this.model.getTerminal(k[0],!0),l[e])}}}finally{this.model.endUpdate()}return l};var y=g.moveCells;g.moveCells=function(a,c,d,e,f,k,l){var m=null;this.model.beginUpdate();try{var n=f,p=this.view.getState(f),q=null!=p?p.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(q,"treeFolding","0")){for(var t=0;t<a.length;t++)if(b(a[t])||g.model.isEdge(a[t])&&null==g.model.getTerminal(a[t],!0)){f=g.model.getParent(a[t]);
-break}if(null!=n&&f!=n&&null!=this.view.getState(a[0])){var u=g.getIncomingEdges(a[0]);if(0<u.length){var v=g.view.getState(g.model.getTerminal(u[0],!0));if(null!=v){var x=g.view.getState(n);null!=x&&(c=(x.getCenterX()-v.getCenterX())/g.view.scale,d=(x.getCenterY()-v.getCenterY())/g.view.scale)}}}}m=y.apply(this,arguments);if(null!=m&&null!=a&&m.length==a.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(a[t])&&(u=g.getIncomingEdges(a[t]),0<u.length))if(!e)b(n)&&0>mxUtils.indexOf(a,this.model.getTerminal(u[0],!0))&&this.model.setTerminal(u[0],n,!0);else if(0==g.getIncomingEdges(m[t]).length){p=n;if(null==p||p==g.model.getParent(a[t]))p=g.model.getTerminal(u[0],!0);e=this.cloneCell(u[0]);this.addEdge(e,g.getDefaultParent(),p,m[t])}}finally{this.model.endUpdate()}return m};if(null!=n.sidebar){var E=n.sidebar.dropAndConnect;n.sidebar.dropAndConnect=function(a,c,d,e){var f=g.model,k=null;
-f.beginUpdate();try{if(k=E.apply(this,arguments),b(a))for(var l=0;l<k.length;l++)if(f.isEdge(k[l])&&null==f.getTerminal(k[l],!0)){f.setTerminal(k[l],a,!0);var m=g.getCellGeometry(k[l]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return k}}var D={88:n.actions.get("selectChildren"),84:n.actions.get("selectSubtree"),80:n.actions.get("selectParent"),83:n.actions.get("selectSiblings")},z=n.onKeyDown;n.onKeyDown=function(a){try{if(g.isEnabled()&&!g.isEditing()&&
-b(g.getSelectionCell())&&1==g.getSelectionCount()){var d=null;0<g.getIncomingEdges(g.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?c(g.getSelectionCell()):e(g.getSelectionCell()):13==a.which&&(d=B(g.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&g.model.isEdge(d[0])?g.setSelectionCell(g.model.getTerminal(d[0],!1)):g.setSelectionCell(d[d.length-1]),null!=n.hoverIcons&&n.hoverIcons.update(g.view.getState(g.getSelectionCell())),g.startEditingAtCell(g.getSelectionCell()),
-mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var f=D[a.keyCode];null!=f&&(f.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(q(g.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(q(g.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(q(g.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(q(g.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(T){console.log("error",
-T)}mxEvent.isConsumed(a)||z.apply(this,arguments)};var L=g.connectVertex;g.connectVertex=function(a,d,f,k,l,m){var n=g.getIncomingEdges(a);return b(a)&&0<n.length?(f=v(a),k=f==mxConstants.DIRECTION_EAST||f==mxConstants.DIRECTION_WEST,l=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,f==d?e(a):k==l?c(a):B(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):L.call(this,a,d,f,k,l,m)};g.getSubtree=function(a){var c=[a];!d(a)&&!b(a)||u(a)||g.traverse(a,!0,function(a,b){null!=
-b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var O=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){O.apply(this,arguments);(d(this.state.cell)||b(this.state.cell))&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="18px",
+0;d<this.pages.length;d++)mxUtils.bind(this,function(d){var c=a.addItem(this.pages[d].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[d])}),b);this.pages[d]==this.currentPage&&a.addCheckmark(c,Editor.checkmarkImage)})(d);if(this.editor.graph.isEnabled()){a.addSeparator(b);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),b);var e=this.currentPage;null!=e&&(a.addSeparator(b),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this,
+function(){this.removePage(e)}),b),a.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.getName()]))}),b))}}));b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var d=
+mxEvent.getClientX(a),k=mxEvent.getClientY(a);b.popup(d,k,null,a);this.setCurrentMenu(b);mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
+EditorUi.prototype.createTabForPage=function(a,b,e,d){e=this.createTab(e);var k=a.getName()||mxResources.get("untitled"),m=a.getId();e.setAttribute("title",k+(null!=m?" ("+m+")":"")+" ["+d+"]");mxUtils.write(e,k);e.style.maxWidth=b+"px";e.style.width=b+"px";this.addTabListeners(a,e);42<b&&(e.style.textOverflow="ellipsis");return e};
+EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,k=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){d=null!=this.currentMenu;k=a==this.currentPage;e.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(m){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(m)&&k||mxEvent.isPopupTrigger(m))){e.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!d){var p=new mxPopupMenu(this.createPageMenu(a));p.div.className+=" geMenubarMenu";p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);this.resetCurrentMenu();p.destroy()});var u=mxEvent.getClientX(m),x=mxEvent.getClientY(m);p.popup(u,x,null,m);this.setCurrentMenu(p,b)}mxEvent.consume(m)}}))};
+EditorUi.prototype.getLinkForPage=function(a){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var b=this.getCurrentFile();if(null!=b&&b.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var e=this.getSearch("create title mode url drive splash state".split(" ")),e=e+((0==e.length?"?":"&")+"page-id="+a.getId());return window.location.protocol+"//"+window.location.host+"/"+e+"#"+b.getHash()}}return null};
+EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(e,d){e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),d);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),d);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),d);var k=this.getLinkForPage(a);null!=k&&(e.addSeparator(d),e.addItem(mxResources.get("link"),null,
+mxUtils.bind(this,function(){var a=new EmbedDialog(this,k);this.showDialog(a.container,440,240,!0,!0);a.init()}),d));e.addSeparator(d);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,mxResources.get("copyOf",[a.getName()]))}),d)})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(b){a.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();
+(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){a=d.oldIndex;d.oldIndex=d.newIndex;d.newIndex=a;return d};mxCodecRegistry.register(a)})();(function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){a=d.previous;d.previous=d.name;d.name=a;return d};mxCodecRegistry.register(a)})();
+(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),b="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,d,k){k.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(k.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.viewState&&k.setAttribute("viewState",JSON.stringify(d.relatedPage.viewState,function(a,d){return 0>mxUtils.indexOf(b,
+a)?d:void 0})),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,k));return k};a.beforeDecode=function(a,b,k){k.ui=a.ui;k.relatedPage=k.ui.getPageById(b.getAttribute("relatedPage"));if(null==k.relatedPage){var d=b.ownerDocument.createElement("diagram");d.setAttribute("id",b.getAttribute("relatedPage"));d.setAttribute("name",b.getAttribute("name"));k.relatedPage=new DiagramPage(d);d=b.getAttribute("viewState");null!=d&&(k.relatedPage.viewState=JSON.parse(d),b.removeAttribute("viewState"));
+b=b.cloneNode(!0);d=b.firstChild;if(null!=d)for(k.relatedPage.root=a.decodeCell(d,!1),k=d.nextSibling,d.parentNode.removeChild(d),d=k;null!=d;){k=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var e=d.getAttribute("id");null==a.lookup(e)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=k}}return b};a.afterDecode=function(a,b,k){k.index=k.previousIndex;return k};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png";EditorUi.prototype.altShiftActions[68]=
+"selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,d,e,u,x){d=null!=d?d:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var k=e.slice(),c=[],f=0;f<e.length;f++){var g=this.view.getState(e[f]),m=null!=g?g.style:this.getCellStyle(e[f]);"1"==mxUtils.getValue(m,"treeFolding","0")&&(this.traverse(e[f],!0,mxUtils.bind(this,function(a,b){null!=b&&c.push(b);a!=e[f]&&c.push(a);return a==e[f]||!this.model.isCollapsed(a)})),
+this.model.setCollapsed(e[f],a))}for(f=0;f<c.length;f++)this.model.setVisible(c[f],!a);e=k;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return y.isVertex(a)&&e(a)}function d(a){var b=!1;null!=a&&(b=l.view.getState(a),b="1"==(null!=b?b.style:l.getCellStyle(a)).treeMoving);
+return b}function e(a){var b=!1;null!=a&&(a=y.getParent(a),b=l.view.getState(a),b="tree"==(null!=b?b.style:l.getCellStyle(a)).containerType);return b}function u(a){var b=!1;null!=a&&(a=y.getParent(a),b=l.view.getState(a),l.view.getState(a),b=null!=(null!=b?b.style:l.getCellStyle(a)).childLayout);return b}function x(a){a=l.view.getState(a);if(null!=a){var b=l.getIncomingEdges(a.cell);if(0<b.length&&(b=l.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==
+a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function B(a,b){b=null!=b?b:!0;l.model.beginUpdate();try{var c=l.model.getParent(a),d=l.getIncomingEdges(a),e=l.cloneCells([d[0],a]);l.model.setTerminal(e[0],l.model.getTerminal(d[0],!0),!0);var f=x(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||
+f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;l.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=l.view.getState(a),m=l.view.scale;if(null!=k){var n=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*m:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*m;var p=l.getOutgoingEdges(l.model.getTerminal(d[0],
+!0));if(null!=p){for(var q=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,t=g=d=0;t<p.length;t++){var z=l.model.getTerminal(p[t],!1);if(f==x(z)){var u=l.view.getState(z);z!=a&&null!=u&&(q&&b!=u.getCenterX()<k.getCenterX()||!q&&b!=u.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,u)&&(d=10+Math.max(d,(Math.min(n.x+n.width,u.x+u.width)-Math.max(n.x,u.x))/m),g=10+Math.max(g,(Math.min(n.y+n.height,u.y+u.height)-Math.max(n.y,u.y))/m))}}q?g=0:d=0;for(t=0;t<p.length;t++)if(z=l.model.getTerminal(p[t],
+!1),f==x(z)&&(u=l.view.getState(z),z!=a&&null!=u&&(q&&b!=u.getCenterX()<k.getCenterX()||!q&&b!=u.getCenterY()<k.getCenterY()))){var v=[];l.traverse(u.cell,!0,function(a,b){null!=b&&v.push(b);v.push(a);return!0});l.moveCells(v,(b?1:-1)*d,(b?1:-1)*g)}}}return l.addCells(e,c)}finally{l.model.endUpdate()}}function c(a){l.model.beginUpdate();try{var b=x(a),c=l.getIncomingEdges(a),d=l.cloneCells([c[0],a]);l.model.setTerminal(c[0],d[1],!1);l.model.setTerminal(d[0],d[1],!0);l.model.setTerminal(d[0],a,!1);
+var e=l.model.getParent(a),f=e.geometry,g=[];l.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);l.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,m=-m):b==mxConstants.DIRECTION_WEST?(k=-k,m=0):b==mxConstants.DIRECTION_EAST&&(m=0);l.moveCells(g,k,m);return l.addCells(d,e)}finally{l.model.endUpdate()}}function f(a){l.model.beginUpdate();try{var b=
+l.model.getParent(a),c=l.getIncomingEdges(a),d=l.cloneCells([c[0],a]);l.model.setTerminal(d[0],a,!0);var c=l.getOutgoingEdges(a),e=b.geometry,f=[];l.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var k=l.model.getTerminal(c[g],!1);null!=k&&f.push(k)}var m=l.view.getBounds(f),n=x(a),p=l.view.translate,q=l.view.scale;n==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/q-p.x-e.x+10,d[1].geometry.y+=d[1].geometry.height-
+e.y+40):n==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/q-p.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height+e.y+40):(d[1].geometry.x=n==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width+e.x+40):d[1].geometry.x+(d[1].geometry.width-e.x+40),d[1].geometry.y=null==m?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(m.y+m.height)/q-p.y+-e.y+10);return l.addCells(d,b)}finally{l.model.endUpdate()}}function g(a,
+b,c){a=l.getOutgoingEdges(a);c=l.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=l.view.getState(l.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function t(a,b){var c=x(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
+c==mxConstants.DIRECTION_WEST)==d&&c!=b?n.actions.get("selectParent").funct():c==b?(d=l.getOutgoingEdges(a),null!=d&&0<d.length&&l.setSelectionCell(l.model.getTerminal(d[0],!1))):(c=l.getIncomingEdges(a),null!=c&&0<c.length&&(d=g(l.model.getTerminal(c[0],!0),d,a),c=l.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&l.setSelectionCell(d[c].cell)))))}var n=this,l=n.editor.graph,y=l.getModel(),A=n.menus.createPopupMenu;
+n.menus.createPopupMenu=function(a,c,d){A.apply(this,arguments);if(1==l.getSelectionCount()){c=l.getSelectionCell();var e=l.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(l.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(l.getSelectionCell())&&(a.addSeparator(),0<l.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};n.actions.addAction("selectChildren",function(){if(l.isEnabled()&&
+1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(l.model.getTerminal(a[c],!1));l.setSelectionCells(b)}}},null,null,"Alt+Shift+X");n.actions.addAction("selectSiblings",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=l.getOutgoingEdges(l.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(l.model.getTerminal(a[c],
+!1));l.setSelectionCells(b)}}},null,null,"Alt+Shift+S");n.actions.addAction("selectParent",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getIncomingEdges(a);null!=a&&0<a.length&&l.setSelectionCell(l.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");n.actions.addAction("selectDescendants",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),b=[];l.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});l.setSelectionCells(b)}},
+null,null,"Alt+Shift+D");var q=l.removeCells;l.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var d=[],f=0;f<a.length;f++){var g=a[f];y.isEdge(g)&&e(g)&&(d.push(g),g=y.getTerminal(g,!1));b(g)?(l.traverse(g,!0,function(a,b){null!=b&&d.push(b);d.push(a);return!0}),g=l.getIncomingEdges(a[f]),a=a.concat(g)):d.push(a[f])}a=d;return q.apply(this,arguments)};n.hoverIcons.getStateAt=function(a,c,
+d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var E=l.duplicateCells;l.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=l.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=l.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var k=E.call(this,a,c);if(k.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var m=l.getIncomingEdges(k[e]),g=l.getIncomingEdges(a[e]);
+if(0==m.length&&0<g.length){var n=this.cloneCell(g[0]);this.addEdge(n,l.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var z=l.moveCells;l.moveCells=function(a,c,d,e,f,g,k){var m=null;this.model.beginUpdate();try{var n=f,p=this.view.getState(f),q=null!=p?p.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(q,"treeFolding","0")){for(var t=0;t<a.length;t++)if(b(a[t])||l.model.isEdge(a[t])&&null==l.model.getTerminal(a[t],!0)){f=l.model.getParent(a[t]);
+break}if(null!=n&&f!=n&&null!=this.view.getState(a[0])){var u=l.getIncomingEdges(a[0]);if(0<u.length){var v=l.view.getState(l.model.getTerminal(u[0],!0));if(null!=v){var y=l.view.getState(n);null!=y&&(c=(y.getCenterX()-v.getCenterX())/l.view.scale,d=(y.getCenterY()-v.getCenterY())/l.view.scale)}}}}m=z.apply(this,arguments);if(null!=m&&null!=a&&m.length==a.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(a[t])&&(u=l.getIncomingEdges(a[t]),0<u.length))if(!e)b(n)&&0>mxUtils.indexOf(a,this.model.getTerminal(u[0],!0))&&this.model.setTerminal(u[0],n,!0);else if(0==l.getIncomingEdges(m[t]).length){p=n;if(null==p||p==l.model.getParent(a[t]))p=l.model.getTerminal(u[0],!0);e=this.cloneCell(u[0]);this.addEdge(e,l.getDefaultParent(),p,m[t])}}finally{this.model.endUpdate()}return m};if(null!=n.sidebar){var G=n.sidebar.dropAndConnect;n.sidebar.dropAndConnect=function(a,c,d,e){var f=l.model,g=null;
+f.beginUpdate();try{if(g=G.apply(this,arguments),b(a))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],a,!0);var m=l.getCellGeometry(g[k]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var D={88:n.actions.get("selectChildren"),84:n.actions.get("selectSubtree"),80:n.actions.get("selectParent"),83:n.actions.get("selectSiblings")},v=n.onKeyDown;n.onKeyDown=function(a){try{if(l.isEnabled()&&!l.isEditing()&&
+b(l.getSelectionCell())&&1==l.getSelectionCount()){var d=null;0<l.getIncomingEdges(l.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?c(l.getSelectionCell()):f(l.getSelectionCell()):13==a.which&&(d=B(l.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&l.model.isEdge(d[0])?l.setSelectionCell(l.model.getTerminal(d[0],!1)):l.setSelectionCell(d[d.length-1]),null!=n.hoverIcons&&n.hoverIcons.update(l.view.getState(l.getSelectionCell())),l.startEditingAtCell(l.getSelectionCell()),
+mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=D[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(t(l.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(t(l.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(t(l.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(t(l.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(P){console.log("error",
+P)}mxEvent.isConsumed(a)||v.apply(this,arguments)};var H=l.connectVertex;l.connectVertex=function(a,d,e,g,k,m){var n=l.getIncomingEdges(a);return b(a)&&0<n.length?(e=x(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?f(a):g==k?c(a):B(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):H.call(this,a,d,e,g,k,m)};l.getSubtree=function(a){var c=[a];!d(a)&&!b(a)||u(a)||l.traverse(a,!0,function(a,b){null!=
+b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var M=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){M.apply(this,arguments);(d(this.state.cell)||b(this.state.cell))&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="18px",
this.moveHandle.style.height="18px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));this.graph.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells);this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);
-this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var 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 S=mxVertexHandler.prototype.destroy;
+this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var J=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var S=mxVertexHandler.prototype.destroy;
mxVertexHandler.prototype.destroy=function(a,b){S.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 a=d.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");
a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");b.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;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;");d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;b.insertEdge(f,!0);d.insertEdge(f,!1);var c=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");
-c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;b.insertEdge(e,!0);c.insertEdge(e,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;");k.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-l.geometry.relative=!0;l.edge=!0;b.insertEdge(l,!0);k.insertEdge(l,!1);var m=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]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");m.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);m.insertEdge(g,!1);a.insert(f);a.insert(e);a.insert(l);a.insert(g);a.insert(b);a.insert(d);a.insert(c);a.insert(k);a.insert(m);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");a.vertex=
+new mxGeometry(320,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=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;b.insertEdge(e,!0);d.insertEdge(e,!1);var c=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");
+c.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;b.insertEdge(f,!0);c.insertEdge(f,!1);var g=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=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;b.insertEdge(k,!0);g.insertEdge(k,!1);var m=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]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");m.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+l.geometry.relative=!0;l.edge=!0;b.insertEdge(l,!0);m.insertEdge(l,!1);a.insert(e);a.insert(f);a.insert(k);a.insert(l);a.insert(b);a.insert(d);a.insert(c);a.insert(g);a.insert(m);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");a.vertex=
!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");a.vertex=!0;var b=new mxCell("",
new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;");
a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");
-a.vertex=!0;var d=new mxCell("Organization",new mxGeometry(80,40,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;container=1;recursiveResize=0;");b.setAttributeForCell(d,"treeRoot","1");d.vertex=!0;var f=new mxCell("Division",new mxGeometry(20,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");f.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-l.geometry.relative=!0;l.edge=!0;d.insertEdge(l,!0);f.insertEdge(l,!1);var c=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");c.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;d.insertEdge(e,!0);c.insertEdge(e,!1);a.insert(l);a.insert(e);a.insert(d);a.insert(f);
+a.vertex=!0;var d=new mxCell("Organization",new mxGeometry(80,40,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;container=1;recursiveResize=0;");b.setAttributeForCell(d,"treeRoot","1");d.vertex=!0;var e=new mxCell("Division",new mxGeometry(20,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");e.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;d.insertEdge(k,!0);e.insertEdge(k,!1);var c=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");c.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;d.insertEdge(f,!0);c.insertEdge(f,!1);a.insert(k);a.insert(f);a.insert(d);a.insert(e);
a.insert(c);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=new mxCell("Organization",new mxGeometry(0,0,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;container=1;recursiveResize=0;");b.setAttributeForCell(a,"treeRoot","1");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree division",function(){var a=new mxCell("Division",
new mxGeometry(20,40,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree sub sections",
function(){var a=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var d=new mxCell("Sub Section",
-new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");f.geometry.setTerminalPoint(new mxPoint(110,-40),!0);f.geometry.relative=!0;f.edge=!0;d.insertEdge(f,!1);return sb.createVertexTemplateFromCells([b,f,a,d],220,60,
-"Sub Sections")})])}}})();EditorUi.initMinimalTheme=function(){function a(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new l(a,mxResources.get("format"),Math.max(20,a.diagramContainer.clientWidth-240-12),56,240,Math.min(566,b.container.clientHeight-10),function(b){b=a.createFormat(b);b.init();return b}),a.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0)):a.formatWindow.window.setVisible(!a.formatWindow.window.isVisible());a.formatWindow.window.isVisible()&&
-a.formatWindow.window.fit()}function b(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();new mxRectangle;if(null==a.sidebarWindow){var c=Math.min(b.container.clientWidth-10,218);a.sidebarWindow=new l(a,mxResources.get("shapes"),10,56,c-6,Math.min(650,b.container.clientHeight-30),function(b){function c(c,d){var f=a.menus.get(c),g=e.addMenu(d,mxUtils.bind(this,function(){f.funct.apply(this,arguments)}));g.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
+new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;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=!0;e.edge=!0;d.insertEdge(e,!1);return sb.createVertexTemplateFromCells([b,e,a,d],220,60,
+"Sub Sections")})])}}})();EditorUi.initMinimalTheme=function(){function a(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new k(a,mxResources.get("format"),Math.max(20,a.diagramContainer.clientWidth-240-12),56,240,Math.min(566,b.container.clientHeight-10),function(b){b=a.createFormat(b);b.init();return b}),a.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0)):a.formatWindow.window.setVisible(!a.formatWindow.window.isVisible());a.formatWindow.window.isVisible()&&
+a.formatWindow.window.fit()}function b(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();new mxRectangle;if(null==a.sidebarWindow){var c=Math.min(b.container.clientWidth-10,218);a.sidebarWindow=new k(a,mxResources.get("shapes"),10,56,c-6,Math.min(650,b.container.clientHeight-30),function(b){function c(c,d){var f=a.menus.get(c),g=e.addMenu(d,mxUtils.bind(this,function(){f.funct.apply(this,arguments)}));g.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
g.className="geTitle";b.appendChild(g);return g}var d=document.createElement("div");d.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";d.className="geTitle";d.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(d,mxResources.get("moreShapes"));b.appendChild(d);mxEvent.addListener(d,"click",function(){a.actions.get("shapes").funct()});var e=new Menubar(a,b);if(!Editor.enableCustomLibraries||
"1"==urlParams.embed&&"1"!=urlParams.libraries)d.style.bottom="0";else if(null!=a.actions.get("newLibrary")){d=document.createElement("div");d.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;";d.className="geTitle";var f=document.createElement("span");f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("newLibrary"));d.appendChild(f);b.appendChild(d);mxEvent.addListener(d,
"click",a.actions.get("newLibrary").funct);d=document.createElement("div");d.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;";d.className="geTitle";f=document.createElement("span");f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("openLibrary"));d.appendChild(f);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("openLibrary").funct)}else d=
c("newLibrary",mxResources.get("newLibrary")),d.style.boxSizing="border-box",d.style.paddingRight="6px",d.style.paddingLeft="6px",d.style.height="32px",d.style.left="0",d=c("openLibraryFrom",mxResources.get("openLibraryFrom")),d.style.borderLeft="1px solid lightgray",d.style.boxSizing="border-box",d.style.paddingRight="6px",d.style.paddingLeft="6px",d.style.height="32px",d.style.left="50%";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.minimumSize=new mxRectangle(0,
-0,90,90);a.sidebarWindow.window.setVisible(!0);a.getLocalData("sidebar",function(b){a.sidebar.showEntries(b,null,!0)});a.restoreLibraries()}else a.sidebarWindow.window.setVisible(!a.sidebarWindow.window.isVisible());a.sidebarWindow.window.isVisible()&&a.sidebarWindow.window.fit()}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var f=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
+0,90,90);a.sidebarWindow.window.setVisible(!0);a.getLocalData("sidebar",function(b){a.sidebar.showEntries(b,null,!0)});a.restoreLibraries()}else a.sidebarWindow.window.setVisible(!a.sidebarWindow.window.isVisible());a.sidebarWindow.window.isVisible()&&a.sidebarWindow.window.fit()}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
try{var d=document.createElement("style");d.type="text/css";d.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * { font-size:13px; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select:none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity:0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding:2px;display:inline-block; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geToolbarContainer { background:#fff !important; }div.geSidebarContainer { background-color: #ffffff; }div.geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: rgb(249, 249, 249) !important; color: #A0A0A0 !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }"+
-(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"");document.getElementsByTagName("head")[0].appendChild(d)}catch(g){}var l=function(a,b,c,d,e,f,k){var g=document.createElement("div");g.className="geSidebarContainer";g.style.position="absolute";g.style.width="100%";g.style.height="100%";g.style.border="1px solid whiteSmoke";g.style.overflowX="hidden";g.style.overflowY="auto";k(g);this.window=new mxWindow(b,g,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"");document.getElementsByTagName("head")[0].appendChild(d)}catch(l){}var k=function(a,b,c,d,e,f,g){var l=document.createElement("div");l.className="geSidebarContainer";l.style.position="absolute";l.style.width="100%";l.style.height="100%";l.style.border="1px solid whiteSmoke";l.style.overflowX="hidden";l.style.overflowY="auto";g(l);this.window=new mxWindow(b,l,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&&
(this.window.div.onselectstart=mxUtils.bind(this,function(b){null==b&&(b=window.event);return null!=b&&a.isSelectionAllowed(b)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;
mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR=
"#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.prototype.inactiveTabBackgroundColor=
"#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var m=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=
-function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px");m.apply(this,arguments)};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var u=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>f&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",
-b.shortcut):u.apply(this,arguments)};var v=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){v.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height=
+function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px");m.apply(this,arguments)};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var u=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",
+b.shortcut):u.apply(this,arguments)};var x=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){x.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height=
"24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"));"none"!=a.style.display&&(a.style.display="inline-block")}};var B=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){B.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage=
"url("+Editor.shareImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px"}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="8px";a.style.marginRight="4px";var b=document.createElement("a");b.className="geMenuItem gePrimaryBtn";b.style.marginLeft=
"8px";b.style.padding="6px";"1"==urlParams.noSaveBtn?(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),
@@ -3473,9 +3476,9 @@ b.shortcut):u.apply(this,arguments)};var v=App.prototype.updateUserElement;App.p
"6px";b.style.padding="6px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.buttonContainer.appendChild(a);this.buttonContainer.style.top="6px"}};Sidebar.prototype.getTooltipOffset=function(){var a=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);a.y+=40;return a};var c=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,d){var e=this.editorUi.editor.graph;a.smartSeparators=!0;c.apply(this,arguments);
mxUtils.bind(this,function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});1==e.getSelectionCount()?(this.addMenuItems(a,["editTooltip","-","editStyle","editGeometry","-"],null,d),e.isCellFoldable(e.getSelectionCell())&&this.addMenuItems(a,e.isCellCollapsed(b)?["expand"]:["collapse"],null,d),this.addMenuItems(a,["collapsible","-","lockUnlock","enterGroup"],
null,d),a.addSeparator(),this.addSubmenu("layout",a)):e.isSelectionEmpty()&&e.isEnabled()?(a.addSeparator(),this.addMenuItems(a,["editData"],null,d),a.addSeparator(),this.addSubmenu("layout",a),this.addSubmenu("view",a,null,mxResources.get("options")),this.addMenuItems(a,["-","exitGroup"],null,d)):e.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,d)};EditorUi.prototype.toggleFormatPanel=function(b){null!=this.formatWindow?this.formatWindow.window.setVisible(b?!1:!this.formatWindow.window.isVisible()):
-a(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var e=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),
-this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.window.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);e.apply(this,arguments)};var k=
-EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){k.apply(this,arguments);a||(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};EditorUi.prototype.chromelessWindowResize=function(){};var q=Menus.prototype.init;Menus.prototype.init=function(){q.apply(this,arguments);var c=this.editorUi,d=c.editor.graph;c.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";c.actions.get("createShape").label=
+a(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var f=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),
+this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.window.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);f.apply(this,arguments)};var g=
+EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){g.apply(this,arguments);a||(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};EditorUi.prototype.chromelessWindowResize=function(){};var t=Menus.prototype.init;Menus.prototype.init=function(){t.apply(this,arguments);var 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.put("importCsv",new Action(mxResources.get("csv")+"...",function(){d.popupMenuHandler.hideMenu();c.showImportCsvDialog()}));c.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(c,"Insert from Text");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("formatSql",new Action(mxResources.get("formatSql")+
"...",function(){var a=new ParseDialog(c,"Insert from Text","formatSql");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",function(){b(c)}));c.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(c)}));EditorUi.enablePlantUml&&!c.isOffline()&&c.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(c,"Insert from Text","plantUml");c.showDialog(a.container,
620,420,!0,!1);a.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(a,b){var d=c.getCurrentFile();c.menus.addSubmenu("extras",a,b,mxResources.get("preferences"));a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(c.menus.addMenuItems(a,["new","open","-"],b),EditorUi.isElectronApp&&c.menus.addMenuItems(a,["synchronize","-"],b),c.menus.addMenuItems(a,["save","saveAs","-"],b)):"1"==urlParams.embed?(c.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&c.menus.addMenuItems(a,
@@ -3484,95 +3487,95 @@ b);c.commentsSupported()&&c.menus.addMenuItems(a,["comments"],b);c.menus.addMenu
b):(c.menus.addMenuItems(a,["save","saveAs","-","rename"],b),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(a,["upload"],b):c.menus.addMenuItems(a,["makeCopy"],b));c.menus.addMenuItems(a,["-","autosave"],b);null!=d&&d.isRevisionHistorySupported()&&c.menus.addMenuItems(a,["-","revisionHistory"],b)})));var e=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){e.funct(a,b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||c.menus.addMenuItems(a,
["publishLink"],b);a.addSeparator(b);c.menus.addSubmenu("embed",a,b)})));var f=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(a,b){"1"!=urlParams.embed&&c.menus.addSubmenu("theme",a,b);null!=f&&c.menus.addSubmenu("language",a,b);c.menus.addSubmenu("units",a,b);a.addSeparator(b);c.menus.addMenuItems(a,["scrollbars","tooltips","ruler"],b);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&c.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],
b);!c.isOfflineApp()&&isLocalStorage&&c.menus.addMenuItem(a,"plugins",b);a.addSeparator(b);c.menus.addMenuItem(a,"drawConfig",b);a.addSeparator(b)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"importText plantUml - formatSql importCsv - createShape editDiagram".split(" "),b)})));this.put("insert",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),
-b);c.insertTemplateEnabled&&!c.isOffline()&&c.menus.addMenuItems(a,["insertTemplate"],b);a.addSeparator(b);this.addMenuItems(a,["createShape","insertFreehand","-"],b);this.addSubmenu("insertLayout",a,b,mxResources.get("layout"));this.addSubmenu("insertAdvanced",a,b,mxResources.get("advanced"));a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(a,["import"],b):c.menus.addSubmenu("importFrom",a,b)})));var k="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
-l=function(a,b,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(c,d,e);c.showDialog(a.container,620,420,!0,!1);a.init()}),b)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<k.length;c++)"-"==k[c]?a.addSeparator(b):l(a,b,mxResources.get(k[c])+"...",k[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"grid guides ruler - connectionArrows connectionPoints -".split(" "),b);if("undefined"!==typeof MathJax){var d=
-c.menus.addMenuItem(a,"mathematicalTypesetting",b);c.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}c.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"],b)})))};var n=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a,b,c){var d=l.menus.get(a),e=u.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),q);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";
-e.style.top="6px";e.style.marginRight="6px";e.style.height="30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",mxResources.get(a));l.menus.menuCreated(d,e,"geMenuItem");null!=c?(e.style.backgroundImage="url("+c+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.width="34px",e.innerHTML=""):b||(e.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",e.style.backgroundPosition=
-"right 6px center",e.style.backgroundRepeat="no-repeat",e.style.paddingRight="22px");return e}function c(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=l.statusContainer?p.insertBefore(g,l.statusContainer):p.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition=
+b);c.insertTemplateEnabled&&!c.isOffline()&&c.menus.addMenuItems(a,["insertTemplate"],b);a.addSeparator(b);this.addMenuItems(a,["createShape","insertFreehand","-"],b);this.addSubmenu("insertLayout",a,b,mxResources.get("layout"));this.addSubmenu("insertAdvanced",a,b,mxResources.get("advanced"));a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(a,["import"],b):c.menus.addSubmenu("importFrom",a,b)})));var g="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
+k=function(a,b,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(c,d,e);c.showDialog(a.container,620,420,!0,!1);a.init()}),b)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<g.length;c++)"-"==g[c]?a.addSeparator(b):k(a,b,mxResources.get(g[c])+"...",g[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"grid guides ruler - connectionArrows connectionPoints -".split(" "),b);if("undefined"!==typeof MathJax){var d=
+c.menus.addMenuItem(a,"mathematicalTypesetting",b);c.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}c.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"],b)})))};var n=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a,b,c){var d=k.menus.get(a),e=u.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),t);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";
+e.style.top="6px";e.style.marginRight="6px";e.style.height="30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",mxResources.get(a));k.menus.menuCreated(d,e,"geMenuItem");null!=c?(e.style.backgroundImage="url("+c+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.width="34px",e.innerHTML=""):b||(e.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",e.style.backgroundPosition=
+"right 6px center",e.style.backgroundRepeat="no-repeat",e.style.paddingRight="22px");return e}function c(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=k.statusContainer?p.insertBefore(g,k.statusContainer):p.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition=
"center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px"):mxUtils.write(g,a);mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(g,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),g.style.cursor=
"pointer"):(g.setAttribute("disabled","disabled"),g.style.cursor="default")},e.addListener("stateChanged",a),a());return g}function d(a,b){var c=document.createElement("div");c.className="geMenuItem";c.style.display="inline-block";c.style.verticalAlign="top";c.style.marginRight="6px";c.style.padding="0 4px 0 4px";c.style.height="30px";c.style.position="relative";c.style.top="0px";for(var d=0;d<a.length;d++)null!=a[d]&&(a[d].style.margin="0px",a[d].style.boxShadow="none",c.appendChild(a[d]));null!=
-b&&mxUtils.setOpacity(c,b);null!=l.statusContainer?p.insertBefore(c,l.statusContainer):p.appendChild(c);return c}function e(){for(var b=p.firstChild;null!=b;){var e=b.nextSibling;"geMenuItem"!=b.className&&"geItem"!=b.className||b.parentNode.removeChild(b);b=e}q=p.firstChild;f=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(b=1E3>f)||a("diagram");d([b?a("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,c(mxResources.get("shapes"),l.actions.get("toggleShapes").funct,
-null,mxResources.get("shapes"),l.actions.get("image"),b?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),c(mxResources.get("format"),l.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+l.actions.get("formatPanel").shortcut+")",l.actions.get("image"),
+b&&mxUtils.setOpacity(c,b);null!=k.statusContainer?p.insertBefore(c,k.statusContainer):p.appendChild(c);return c}function f(){for(var b=p.firstChild;null!=b;){var f=b.nextSibling;"geMenuItem"!=b.className&&"geItem"!=b.className||b.parentNode.removeChild(b);b=f}t=p.firstChild;e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(b=1E3>e)||a("diagram");d([b?a("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,c(mxResources.get("shapes"),k.actions.get("toggleShapes").funct,
+null,mxResources.get("shapes"),k.actions.get("image"),b?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),c(mxResources.get("format"),k.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+k.actions.get("formatPanel").shortcut+")",k.actions.get("image"),
b?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
-null)],b?60:null);e=a("insert",!0,b?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null);d([e,c(mxResources.get("delete"),l.actions.get("delete").funct,null,mxResources.get("delete"),l.actions.get("delete"),b?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
-null)],b?60:null);if(411<=f&&(e=l.actions.get("undo"),b=l.actions.get("redo"),e=c("",e.funct,null,mxResources.get("undo")+" ("+e.shortcut+")",e,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),b=c("",
-b.funct,null,mxResources.get("redo")+" ("+b.shortcut+")",b,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),d([e,b],60),480<=f)){var b=l.actions.get("zoomIn"),e=l.actions.get("zoomOut"),g=l.actions.get("resetView");
-d([c("",function(){m.popupMenuHandler.hideMenu();var a=m.view.scale,b=m.view.translate.x,c=m.view.translate.y;l.actions.get("resetView").funct();1E-5>Math.abs(a-m.view.scale)&&b==m.view.translate.x&&c==m.view.translate.y&&l.actions.get(m.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
-640<=f?c("",b.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",b,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
-null,640<=f?c("",e.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",e,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
-null],60)}b=l.menus.get("language");null!=b&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=f?(null==P&&(e=u.addMenu("",b.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",p.appendChild(e),P=e),l.buttonContainer.style.paddingRight="34px"):(l.buttonContainer.style.paddingRight="4px",null!=P&&(P.parentNode.removeChild(P),P=null))}n.apply(this,arguments);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);null==urlParams.clibs&&
-null==urlParams.libs||b(this);var l=this,m=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var p=document.createElement("div");p.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var q=null,u=new Menubar(l,p);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position="relative";
-l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus())}));var v=l.descriptorChanged;l.descriptorChanged=function(){v.apply(this,arguments);var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":
-"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);p.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else p.removeAttribute("title")};l.setStatusText(l.editor.getStatus());p.appendChild(l.statusContainer);l.buttonContainer=document.createElement("div");l.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";p.appendChild(l.buttonContainer);l.menubarContainer=l.buttonContainer;
-l.tabContainer=document.createElement("div");l.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var k=l.diagramContainer.parentNode,B=document.createElement("div");B.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";l.diagramContainer.style.top="47px";var S=l.menus.get("viewZoom");
+null)],b?60:null);f=a("insert",!0,b?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null);d([f,c(mxResources.get("delete"),k.actions.get("delete").funct,null,mxResources.get("delete"),k.actions.get("delete"),b?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
+null)],b?60:null);if(411<=e&&(f=k.actions.get("undo"),b=k.actions.get("redo"),f=c("",f.funct,null,mxResources.get("undo")+" ("+f.shortcut+")",f,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),b=c("",
+b.funct,null,mxResources.get("redo")+" ("+b.shortcut+")",b,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),d([f,b],60),480<=e)){var b=k.actions.get("zoomIn"),f=k.actions.get("zoomOut"),g=k.actions.get("resetView");
+d([c("",function(){m.popupMenuHandler.hideMenu();var a=m.view.scale,b=m.view.translate.x,c=m.view.translate.y;k.actions.get("resetView").funct();1E-5>Math.abs(a-m.view.scale)&&b==m.view.translate.x&&c==m.view.translate.y&&k.actions.get(m.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
+640<=e?c("",b.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",b,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
+null,640<=e?c("",f.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",f,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
+null],60)}b=k.menus.get("language");null!=b&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e?(null==N&&(f=u.addMenu("",b.funct),f.setAttribute("title",mxResources.get("language")),f.className="geToolbarButton",f.style.backgroundImage="url("+Editor.globeImage+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.position="absolute",f.style.height="24px",f.style.width="24px",f.style.zIndex="1",f.style.right="8px",f.style.cursor=
+"pointer",f.style.top="1"==urlParams.embed?"12px":"11px",p.appendChild(f),N=f),k.buttonContainer.style.paddingRight="34px"):(k.buttonContainer.style.paddingRight="4px",null!=N&&(N.parentNode.removeChild(N),N=null))}n.apply(this,arguments);var g=document.createElement("div");g.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";g.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(g);null==urlParams.clibs&&
+null==urlParams.libs||b(this);var k=this,m=k.editor.graph;k.toolbar=this.createToolbar(k.createDiv("geToolbar"));k.defaultLibraryName=mxResources.get("untitledLibrary");var p=document.createElement("div");p.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var t=null,u=new Menubar(k,p);k.statusContainer=k.createStatusContainer();k.statusContainer.style.position="relative";
+k.statusContainer.style.maxWidth="";k.statusContainer.style.marginTop="7px";k.statusContainer.style.marginLeft="6px";k.statusContainer.style.color="gray";k.statusContainer.style.cursor="default";k.editor.addListener("statusChanged",mxUtils.bind(this,function(){k.setStatusText(k.editor.getStatus())}));var x=k.descriptorChanged;k.descriptorChanged=function(){x.apply(this,arguments);var a=k.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":
+"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);p.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else p.removeAttribute("title")};k.setStatusText(k.editor.getStatus());p.appendChild(k.statusContainer);k.buttonContainer=document.createElement("div");k.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";p.appendChild(k.buttonContainer);k.menubarContainer=k.buttonContainer;
+k.tabContainer=document.createElement("div");k.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var g=k.diagramContainer.parentNode,B=document.createElement("div");B.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";k.diagramContainer.style.top="47px";var S=k.menus.get("viewZoom");
if(null!=S){this.tabContainer.style.right="70px";var C=u.addMenu("100%",S.funct);C.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");C.style.whiteSpace="nowrap";C.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";C.style.backgroundPosition="right 6px center";C.style.backgroundRepeat="no-repeat";C.style.backgroundColor="#ffffff";C.style.paddingRight="10px";C.style.display="block";C.style.position="absolute";C.style.textDecoration="none";C.style.textDecoration="none";
-C.style.right="0px";C.style.bottom="0px";C.style.overflow="hidden";C.style.visibility="hidden";C.style.textAlign="center";C.style.color="#000";C.style.fontSize="12px";C.style.color="#707070";C.style.width="59px";C.style.cursor="pointer";C.style.borderTop="1px solid lightgray";C.style.borderLeft="1px solid lightgray";C.style.height=parseInt(l.tabContainerHeight)-1+"px";C.style.lineHeight=parseInt(l.tabContainerHeight)+1+"px";B.appendChild(C);S=mxUtils.bind(this,function(){C.innerHTML=Math.round(100*
-l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,S);l.editor.addListener("resetGraphView",S);l.editor.addListener("pageSelected",S);var K=l.setGraphEnabled;l.setGraphEnabled=function(){K.apply(this,arguments);null!=this.tabContainer&&(C.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}B.appendChild(l.tabContainer);B.appendChild(p);B.appendChild(l.diagramContainer);
-k.appendChild(B);l.updateTabContainer();var P=null;e();mxEvent.addListener(window,"resize",function(){e();null!=l.sidebarWindow&&l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();null!=l.actions.outlineWindow&&l.actions.outlineWindow.window.fit();null!=l.actions.layersWindow&&l.actions.layersWindow.window.fit();null!=l.menus.tagsWindow&&l.menus.tagsWindow.window.fit();null!=l.menus.findWindow&&l.menus.findWindow.window.fit()})}}};
-(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();DrawioComment=function(a,b,f,d,l,m,p){this.file=a;this.id=b;this.content=f;this.modifiedDate=d;this.createdDate=l;this.isResolved=m;this.user=p;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,b,f,d,l){b()};DrawioComment.prototype.editComment=function(a,b,f){b()};DrawioComment.prototype.deleteComment=function(a,b){a()};DrawioUser=function(a,b,f,d,l){this.id=a;this.email=b;this.displayName=f;this.pictureUrl=d;this.locale=l};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\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncsv=CSV\ndark=Dark\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.\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\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Download draw.io 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\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\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\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\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\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedbackToDrawIo=Send your feedback to draw.io\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\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\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\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\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\ndrwaDiag=draw.io diagram\nunknownErr=Unkown Error\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=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=Gliffy diagram "{1}" found. Importing\nconfAGliffyDiagImported=Gliffy diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported Gliffy diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing Gliffy diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching Gliffy 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. \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="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement;
-Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,b,f){this.init(a,b,f)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://www.draw.io/";GraphViewer.prototype.imageBaseUrl="https://www.draw.io/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.allowZoomIn=!1;
+C.style.right="0px";C.style.bottom="0px";C.style.overflow="hidden";C.style.visibility="hidden";C.style.textAlign="center";C.style.color="#000";C.style.fontSize="12px";C.style.color="#707070";C.style.width="59px";C.style.cursor="pointer";C.style.borderTop="1px solid lightgray";C.style.borderLeft="1px solid lightgray";C.style.height=parseInt(k.tabContainerHeight)-1+"px";C.style.lineHeight=parseInt(k.tabContainerHeight)+1+"px";B.appendChild(C);S=mxUtils.bind(this,function(){C.innerHTML=Math.round(100*
+k.editor.graph.view.scale)+"%"});k.editor.graph.view.addListener(mxEvent.EVENT_SCALE,S);k.editor.addListener("resetGraphView",S);k.editor.addListener("pageSelected",S);var K=k.setGraphEnabled;k.setGraphEnabled=function(){K.apply(this,arguments);null!=this.tabContainer&&(C.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}B.appendChild(k.tabContainer);B.appendChild(p);B.appendChild(k.diagramContainer);
+g.appendChild(B);k.updateTabContainer();var N=null;f();mxEvent.addListener(window,"resize",function(){f();null!=k.sidebarWindow&&k.sidebarWindow.window.fit();null!=k.formatWindow&&k.formatWindow.window.fit();null!=k.actions.outlineWindow&&k.actions.outlineWindow.window.fit();null!=k.actions.layersWindow&&k.actions.layersWindow.window.fit();null!=k.menus.tagsWindow&&k.menus.tagsWindow.window.fit();null!=k.menus.findWindow&&k.menus.findWindow.window.fit()})}}};
+(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();DrawioComment=function(a,b,e,d,k,m,p){this.file=a;this.id=b;this.content=e;this.modifiedDate=d;this.createdDate=k;this.isResolved=m;this.user=p;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,b,e,d,k){b()};DrawioComment.prototype.editComment=function(a,b,e){b()};DrawioComment.prototype.deleteComment=function(a,b){a()};DrawioUser=function(a,b,e,d,k){this.id=a;this.email=b;this.displayName=e;this.pictureUrl=d;this.locale=k};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncsv=CSV\ndark=Dark\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.\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\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Download draw.io 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\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\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\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\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\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedbackToDrawIo=Send your feedback to draw.io\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\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\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\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\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\ndrwaDiag=draw.io diagram\nunknownErr=Unkown Error\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=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=Gliffy diagram "{1}" found. Importing\nconfAGliffyDiagImported=Gliffy diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported Gliffy diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing Gliffy diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching Gliffy 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. \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="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement;
+Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,b,e){this.init(a,b,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://www.draw.io/";GraphViewer.prototype.imageBaseUrl="https://www.draw.io/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.allowZoomIn=!1;
GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;
-GraphViewer.prototype.init=function(a,b,f){this.graphConfig=null!=f?f:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=
+GraphViewer.prototype.init=function(a,b,e){this.graphConfig=null!=e?e:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center;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!=a?a.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.pageId=this.graphConfig.pageId;
this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=b&&(this.xmlDocument=b.ownerDocument,this.xmlNode=b,this.xml=mxUtils.getXml(b),null!=a)){var d=mxUtils.bind(this,function(){this.graph=new Graph(a);this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=!1;this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(a){return!0});this.lightboxClickEnabled&&(a.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!=b&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var d=this;this.graph.getImageFromBundles=function(a){return d.getImageUrl(a)};
-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 l=0;l<f.length;l++)if(this.pageId==f[l].getAttribute("id")){this.currentPage=l;break}var m=this.graph.getGlobalVariable,d=this;this.graph.getGlobalVariable=function(a){var b=f[d.currentPage];return"page"==a?b.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==a?d.currentPage+
-1:"pagecount"==a?f.length:m.apply(this,arguments)}}}this.diagrams=[];var c=null;this.selectPage=function(a){this.handlingResize||(this.currentPage=mxUtils.mod(a,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(a){for(var b=!1,c=0;c<this.diagrams.length;c++)if(this.diagrams[c].getAttribute("id")==a){this.selectPage(c);b=!0;break}return b};l=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=
-[];this.xmlNode!=c&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),c=this.xmlNode)});this.addListener("xmlNodeChanged",l);l();urlParams.page=d.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=
+mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var e=this.xmlNode.getElementsByTagName("diagram");if(0<e.length){if(null!=this.pageId)for(var k=0;k<e.length;k++)if(this.pageId==e[k].getAttribute("id")){this.currentPage=k;break}var m=this.graph.getGlobalVariable,d=this;this.graph.getGlobalVariable=function(a){var b=e[d.currentPage];return"page"==a?b.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==a?d.currentPage+
+1:"pagecount"==a?e.length:m.apply(this,arguments)}}}this.diagrams=[];var c=null;this.selectPage=function(a){this.handlingResize||(this.currentPage=mxUtils.mod(a,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(a){for(var b=!1,c=0;c<this.diagrams.length;c++)if(this.diagrams[c].getAttribute("id")==a){this.selectPage(c);b=!0;break}return b};k=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=
+[];this.xmlNode!=c&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),c=this.xmlNode)});this.addListener("xmlNodeChanged",k);k();urlParams.page=d.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=
!0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow};this.graph.panningHandler.usePopupTrigger=!1;this.graph.panningHandler.pinchEnabled=!1;this.graph.panningHandler.ignoreCell=!0;this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&a.setAttribute("title",this.graphConfig.title);this.addSizeHandler();this.showLayers(this.graph);
-this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};d=this;this.graph.customLinkClicked=function(a){var b=!0;if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");d.selectPageById(a.substring(c+1))||(b=!1,alert(mxResources.get("pageNotFound")||"Page not found"))}else this.handleCustomLink(a);return b};this.fireEvent(new mxEventObject("render"))});f=window.MutationObserver||
-window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof f){var l=this.getObservableParent(a),m=new f(mxUtils.bind(this,function(b){0<a.offsetWidth&&(m.disconnect(),d())}));m.observe(l,{attributes:!0})}else d()}};GraphViewer.prototype.getObservableParent=function(a){for(a=a.parentNode;a!=document.body&&null!=a.parentNode&&"none"!==mxUtils.getCurrentStyle(a).display;)a=a.parentNode;return a};
+this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};d=this;this.graph.customLinkClicked=function(a){var b=!0;if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");d.selectPageById(a.substring(c+1))||(b=!1,alert(mxResources.get("pageNotFound")||"Page not found"))}else this.handleCustomLink(a);return b};this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||
+window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof e){var k=this.getObservableParent(a),m=new e(mxUtils.bind(this,function(b){0<a.offsetWidth&&(m.disconnect(),d())}));m.observe(k,{attributes:!0})}else d()}};GraphViewer.prototype.getObservableParent=function(a){for(a=a.parentNode;a!=document.body&&null!=a.parentNode&&"none"!==mxUtils.getCurrentStyle(a).display;)a=a.parentNode;return a};
GraphViewer.prototype.getImageUrl=function(a){null!=a&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)&&("/"==a.charAt(0)&&(a=a.substring(1,a.length)),a=this.imageBaseUrl+a);return a};GraphViewer.prototype.setXmlNode=function(a){this.xmlDocument=a.ownerDocument;this.xml=mxUtils.getXml(a);this.xmlNode=a;this.updateGraphXml(a);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
GraphViewer.prototype.setFileNode=function(a){null==this.xmlNode&&(this.xmlDocument=a.ownerDocument,this.xml=mxUtils.getXml(a),this.xmlNode=a);this.setGraphXml(a)};GraphViewer.prototype.updateGraphXml=function(a){this.setGraphXml(a);this.fireEvent(new mxEventObject("graphChanged"))};
GraphViewer.prototype.setGraphXml=function(a){null!=this.graph&&(this.graph.view.translate=new mxPoint,this.graph.view.scale=1,this.graph.getModel().clear(),this.editor.setGraphXml(a),this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph(),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale})};
-GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),f=!1;a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var d=mxUtils.bind(this,function(){if(!f){f=!0;var b=this.graph.getGraphBounds();a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?b.width+2*this.graph.border>a.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){var b=a.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};this.toolbar.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px",this.toolbar.style.top=b.top+1+"px"):this.toolbar.style.top=b.top+"px"}f=
-!1}}),l=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(b){var d=a.offsetWidth;d==l||this.handlingResize||(this.handlingResize=!0,"auto"==a.style.overflow&&(a.style.overflow="hidden"),this.graph.maxFitScale=null!=b?b:this.graphConfig.zoom||(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=a.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=a.style.height||this.updateContainerHeight(a,
-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},l=d,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=!1}),0))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",d),this.graph.addListener("size",d)):new ResizeSensor(this.graph.container,d));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||""!=a.style.height&&this.autoFit||this.updateContainerWidth(a,b.width+2*this.graph.border),0==this.graphConfig.resize&&""!=a.style.height||this.updateContainerHeight(a,Math.max(this.minHeight,b.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var m=l=null,d=mxUtils.bind(this,function(){window.clearTimeout(m);
-this.handlingResize||(m=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",d):new ResizeSensor(this.graph.container,d))}else mxClient.IS_QUIRKS||9>=document.documentMode||this.graph.addListener("size",d);var p=mxUtils.bind(this,function(){var d=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");var f=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=
-a.style.height&&this.autoFit?a.offsetHeight:void 0;if(0<a.offsetWidth&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>f)){var m=null;null!=f&&b.height+2*this.graph.border>f-2&&(m=(f-2*this.graph.border-2)/b.height);this.fitGraph(m)}else this.widthIsEmpty||0!=this.graphConfig.resize||""==a.style.height?(this.graph.view.setTranslate(Math.floor(this.graph.border-b.x/this.graph.view.scale),Math.floor(this.graph.border-b.y/this.graph.view.scale)),l=a.offsetWidth):
-this.graph.center((!this.widthIsEmpty||b.width<this.minWidth)&&1!=this.graphConfig.resize);a.style.minWidth=d});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(p,0):p();this.positionGraph=function(){b=this.graph.getGraphBounds();l=null;p()}};GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};
+GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),e=!1;a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var d=mxUtils.bind(this,function(){if(!e){e=!0;var b=this.graph.getGraphBounds();a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?b.width+2*this.graph.border>a.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){var b=a.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};this.toolbar.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px",this.toolbar.style.top=b.top+1+"px"):this.toolbar.style.top=b.top+"px"}e=
+!1}}),k=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(b){var d=a.offsetWidth;d==k||this.handlingResize||(this.handlingResize=!0,"auto"==a.style.overflow&&(a.style.overflow="hidden"),this.graph.maxFitScale=null!=b?b:this.graphConfig.zoom||(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=a.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=a.style.height||this.updateContainerHeight(a,
+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},k=d,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=!1}),0))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",d),this.graph.addListener("size",d)):new ResizeSensor(this.graph.container,d));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||""!=a.style.height&&this.autoFit||this.updateContainerWidth(a,b.width+2*this.graph.border),0==this.graphConfig.resize&&""!=a.style.height||this.updateContainerHeight(a,Math.max(this.minHeight,b.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var m=k=null,d=mxUtils.bind(this,function(){window.clearTimeout(m);
+this.handlingResize||(m=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",d):new ResizeSensor(this.graph.container,d))}else mxClient.IS_QUIRKS||9>=document.documentMode||this.graph.addListener("size",d);var p=mxUtils.bind(this,function(){var d=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");var e=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=
+a.style.height&&this.autoFit?a.offsetHeight:void 0;if(0<a.offsetWidth&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>e)){var m=null;null!=e&&b.height+2*this.graph.border>e-2&&(m=(e-2*this.graph.border-2)/b.height);this.fitGraph(m)}else this.widthIsEmpty||0!=this.graphConfig.resize||""==a.style.height?(this.graph.view.setTranslate(Math.floor(this.graph.border-b.x/this.graph.view.scale),Math.floor(this.graph.border-b.y/this.graph.view.scale)),k=a.offsetWidth):
+this.graph.center((!this.widthIsEmpty||b.width<this.minWidth)&&1!=this.graphConfig.resize);a.style.minWidth=d});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(p,0):p();this.positionGraph=function(){b=this.graph.getGraphBounds();k=null;p()}};GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};
GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=b+"px"};
-GraphViewer.prototype.showLayers=function(a,b){var f=this.graphConfig.layers,f=null!=f?f.split(" "):[],d=this.graphConfig.layerIds,l=null!=d&&0<d.length;if(0<f.length||l||null!=b){var m=null!=b?b.getModel():null,p=a.getModel();p.beginUpdate();try{for(var u=p.getChildCount(p.root),v=0;v<u;v++)p.setVisible(p.getChildAt(p.root,v),null!=b?m.isVisible(m.getChildAt(m.root,v)):!1);if(null==m)if(l)for(v=0;v<d.length;v++)p.setVisible(p.getCell(d[v]),!0);else for(v=0;v<f.length;v++)p.setVisible(p.getChildAt(p.root,
-parseInt(f[v])),!0)}finally{p.endUpdate()}}};
-GraphViewer.prototype.addToolbar=function(){function a(a,b,d,e){var g=document.createElement("div");g.style.borderRight="1px solid #d0d0d0";g.style.padding="3px 6px 3px 6px";mxEvent.addListener(g,"click",a);null!=d&&g.setAttribute("title",d);g.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==e||e?(mxEvent.addListener(g,"mouseenter",function(){g.style.backgroundColor="#ddd"}),mxEvent.addListener(g,"mouseleave",
-function(){g.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(a);f.appendChild(g);c++;return g}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var f=b.ownerDocument.createElement("div");f.style.position="absolute";f.style.overflow="hidden";f.style.boxSizing="border-box";
-f.style.whiteSpace="nowrap";f.style.textAlign="left";f.style.zIndex=this.toolbarZIndex;f.style.backgroundColor="#eee";f.style.height=this.toolbarHeight+"px";this.toolbar=f;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(f.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(f,30);var d=null,l=null,m=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setOpacity(f,0);d=null;l=window.setTimeout(mxUtils.bind(this,function(){f.style.display="none";l=null}),100)}),a||200)}),p=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);f.style.display="";mxUtils.setOpacity(f,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(p(30),m())}));mxEvent.addListener(f,mxClient.IS_POINTER?
-"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(a){p(100)}));mxEvent.addListener(f,"mousemove",mxUtils.bind(this,function(a){p(100);mxEvent.consume(a)}));mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||p(30)}));var u=this.graph,v=u.getTolerance();u.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();
-this.scrollLeft=u.container.scrollLeft;this.scrollTop=u.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-u.container.scrollLeft)<v&&Math.abs(this.scrollTop-u.container.scrollTop)<v&&Math.abs(this.startX-b.getGraphX())<v&&Math.abs(this.startY-b.getGraphY())<v&&(0<parseFloat(f.style.opacity||0)?m():p(30))}})}for(var B=this.toolbarItems,c=0,e=null,k=null,q=0;q<B.length;q++){var n=B[q];if("pages"==n){k=b.ownerDocument.createElement("div");
-k.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(k,70);var g=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");g.style.borderRightStyle="none";g.style.paddingLeft="0px";g.style.paddingRight="0px";f.appendChild(k);var x=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");x.style.paddingLeft="0px";x.style.paddingRight="0px";n=mxUtils.bind(this,function(){k.innerHTML="";mxUtils.write(k,this.currentPage+1+" / "+this.diagrams.length);k.style.display=1<this.diagrams.length?"inline-block":"none";g.style.display=k.style.display;x.style.display=k.style.display});this.addListener("graphChanged",n);n()}else if("zoom"==n)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
-mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==n){if(this.layersEnabled){var A=this.graph.getModel(),t=a(mxUtils.bind(this,function(a){if(null!=e)e.parentNode.removeChild(e),
-e=null;else{e=this.graph.createLayersDialog();mxEvent.addListener(e,"mouseleave",function(){e.parentNode.removeChild(e);e=null});a=t.getBoundingClientRect();e.style.width="140px";e.style.padding="2px 0px 2px 0px";e.style.border="1px solid #d0d0d0";e.style.backgroundColor="#eee";e.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";e.style.fontSize="11px";e.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(e,80);var b=mxUtils.getDocumentScrollOrigin(document);e.style.left=b.x+a.left+
-"px";e.style.top=b.y+a.bottom+"px";document.body.appendChild(e)}}),Editor.layersImage,mxResources.get("layers")||"Layers");A.addListener(mxEvent.CHANGE,function(){t.style.display=1<A.getChildCount(A.root)?"inline-block":"none"});t.style.display=1<A.getChildCount(A.root)?"inline-block":"none"}}else"lightbox"==n?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(n=this.graphConfig["toolbar-buttons"][n],
+GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers,e=null!=e?e.split(" "):[],d=this.graphConfig.layerIds,k=null!=d&&0<d.length;if(0<e.length||k||null!=b){var m=null!=b?b.getModel():null,p=a.getModel();p.beginUpdate();try{for(var u=p.getChildCount(p.root),x=0;x<u;x++)p.setVisible(p.getChildAt(p.root,x),null!=b?m.isVisible(m.getChildAt(m.root,x)):!1);if(null==m)if(k)for(x=0;x<d.length;x++)p.setVisible(p.getCell(d[x]),!0);else for(x=0;x<e.length;x++)p.setVisible(p.getChildAt(p.root,
+parseInt(e[x])),!0)}finally{p.endUpdate()}}};
+GraphViewer.prototype.addToolbar=function(){function a(a,b,d,f){var g=document.createElement("div");g.style.borderRight="1px solid #d0d0d0";g.style.padding="3px 6px 3px 6px";mxEvent.addListener(g,"click",a);null!=d&&g.setAttribute("title",d);g.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==f||f?(mxEvent.addListener(g,"mouseenter",function(){g.style.backgroundColor="#ddd"}),mxEvent.addListener(g,"mouseleave",
+function(){g.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(a);e.appendChild(g);c++;return g}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.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 d=null,k=null,m=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setOpacity(e,0);d=null;k=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";k=null}),100)}),a||200)}),p=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(p(30),m())}));mxEvent.addListener(e,mxClient.IS_POINTER?
+"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){p(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||p(30)}));var u=this.graph,x=u.getTolerance();u.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();
+this.scrollLeft=u.container.scrollLeft;this.scrollTop=u.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-u.container.scrollLeft)<x&&Math.abs(this.scrollTop-u.container.scrollTop)<x&&Math.abs(this.startX-b.getGraphX())<x&&Math.abs(this.startY-b.getGraphY())<x&&(0<parseFloat(e.style.opacity||0)?m():p(30))}})}for(var B=this.toolbarItems,c=0,f=null,g=null,t=0;t<B.length;t++){var n=B[t];if("pages"==n){g=b.ownerDocument.createElement("div");
+g.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(g,70);var l=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");l.style.borderRightStyle="none";l.style.paddingLeft="0px";l.style.paddingRight="0px";e.appendChild(g);var y=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");y.style.paddingLeft="0px";y.style.paddingRight="0px";n=mxUtils.bind(this,function(){g.innerHTML="";mxUtils.write(g,this.currentPage+1+" / "+this.diagrams.length);g.style.display=1<this.diagrams.length?"inline-block":"none";l.style.display=g.style.display;y.style.display=g.style.display});this.addListener("graphChanged",n);n()}else if("zoom"==n)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
+mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==n){if(this.layersEnabled){var A=this.graph.getModel(),q=a(mxUtils.bind(this,function(a){if(null!=f)f.parentNode.removeChild(f),
+f=null;else{f=this.graph.createLayersDialog();mxEvent.addListener(f,"mouseleave",function(){f.parentNode.removeChild(f);f=null});a=q.getBoundingClientRect();f.style.width="140px";f.style.padding="2px 0px 2px 0px";f.style.border="1px solid #d0d0d0";f.style.backgroundColor="#eee";f.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";f.style.fontSize="11px";f.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(f,80);var b=mxUtils.getDocumentScrollOrigin(document);f.style.left=b.x+a.left+
+"px";f.style.top=b.y+a.bottom+"px";document.body.appendChild(f)}}),Editor.layersImage,mxResources.get("layers")||"Layers");A.addListener(mxEvent.CHANGE,function(){q.style.display=1<A.getChildCount(A.root)?"inline-block":"none"});q.style.display=1<A.getChildCount(A.root)?"inline-block":"none"}}else"lightbox"==n?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(n=this.graphConfig["toolbar-buttons"][n],
null!=n&&a(null==n.enabled||n.enabled?n.handler:function(){},n.image,n.title,n.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*c);null!=this.graphConfig.title&&(B=b.ownerDocument.createElement("div"),B.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;",B.setAttribute("title",this.graphConfig.title),mxUtils.write(B,this.graphConfig.title),mxUtils.setOpacity(B,
-70),f.appendChild(B));this.minToolbarWidth=34*c;var F=b.style.border,B=mxUtils.bind(this,function(){f.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";f.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top-
-c.top,bottom:a.bottom-c.top,right:a.right-c.left};f.style.left=a.left+"px";"bottom"==this.graphConfig["toolbar-position"]?f.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(f.style.marginTop=-this.toolbarHeight+"px",f.style.top=a.top+1+"px"):f.style.top=a.top+"px";"1px solid transparent"==F&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(f);var d=mxUtils.bind(this,function(){null!=f.parentNode&&f.parentNode.removeChild(f);null!=e&&(e.parentNode.removeChild(e),
-e=null);b.style.border=F});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==f||a==e)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})}else f.style.top=-this.toolbarHeight+"px",b.appendChild(f)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",B):B()};
-GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(f,d){if(null==d){var l=mxEvent.getSource(f);"a"==l.nodeName.toLowerCase()&&(d=l.getAttribute("href"))}null!=b?null==d||a.isExternalProtocol(d)||a.isBlankLink(d)||a.customLinkClicked(d)?mxEvent.consume(f):window.setTimeout(function(){b.destroy()},0):null!=d&&null==b&&a.isCustomLink(d)&&(mxEvent.isTouchEvent(f)||!mxEvent.isPopupTrigger(f))&&
-a.customLinkClicked(d)&&mxEvent.consume(f)}),mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
-GraphViewer.prototype.showLightbox=function(a,b,f){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){a=null!=a?a:null!=this.graphConfig.editable?this.graphConfig.editable:!0;f={client:1,lightbox:1,target:null!=f?f:"blank"};a&&(f.edit=this.graphConfig.edit||"_blank");if(null!=b?b:1)f.close=1;this.layersEnabled&&(f.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(f.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&&
-(f.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(f.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(a){"ready"==a.data&&a.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):f.data=encodeURIComponent(this.xml);a="www.draw.io";"1"==urlParams.dev&&(f.dev="1",f.drawdev=
-"1",a="test.draw.io");this.lightboxWindow=window.open("https://"+a+"/#P"+encodeURIComponent(JSON.stringify(f)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
+70),e.appendChild(B));this.minToolbarWidth=34*c;var E=b.style.border,B=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top-
+c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==E&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=f&&(f.parentNode.removeChild(f),
+f=null);b.style.border=E});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==f)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",B):B()};
+GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,d){if(null==d){var k=mxEvent.getSource(e);"a"==k.nodeName.toLowerCase()&&(d=k.getAttribute("href"))}null!=b?null==d||a.isExternalProtocol(d)||a.isBlankLink(d)||a.customLinkClicked(d)?mxEvent.consume(e):window.setTimeout(function(){b.destroy()},0):null!=d&&null==b&&a.isCustomLink(d)&&(mxEvent.isTouchEvent(e)||!mxEvent.isPopupTrigger(e))&&
+a.customLinkClicked(d)&&mxEvent.consume(e)}),mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
+GraphViewer.prototype.showLightbox=function(a,b,e){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){a=null!=a?a:null!=this.graphConfig.editable?this.graphConfig.editable:!0;e={client:1,lightbox:1,target:null!=e?e:"blank"};a&&(e.edit=this.graphConfig.edit||"_blank");if(null!=b?b: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(a){"ready"==a.data&&a.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):e.data=encodeURIComponent(this.xml);a="www.draw.io";"1"==urlParams.dev&&(e.dev="1",e.drawdev=
+"1",a="test.draw.io");this.lightboxWindow=window.open("https://"+a+"/#P"+encodeURIComponent(JSON.stringify(e)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScrollOrigin(document),b=document.createElement("div");mxClient.IS_QUIRKS?(b.style.position="absolute",b.style.left=a.x+"px",b.style.top=a.y+"px",b.style.width=document.body.offsetWidth+"px",b.style.height=document.body.offsetHeight+"px"):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 f=document.createElement("img");f.setAttribute("border","0");f.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(f.style.position="absolute",f.style.right="32px",f.style.top=a.y+32+"px"):f.style.cssText="position:fixed;top:32px;right:32px;";f.style.cursor="pointer";mxEvent.addListener(f,"click",function(){l.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds?this.graphConfig.layerIds.join(" "):
+var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(e.style.position="absolute",e.style.right="32px",e.style.top=a.y+32+"px"):e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";mxEvent.addListener(e,"click",function(){k.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds?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 d=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";
-var l=new EditorUi(new Editor(!0),document.createElement("div"),!0);l.editor.editBlankUrl=this.editBlankUrl;l.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=d;l.refresh=function(){};var m=mxUtils.bind(this,function(a){27==a.keyCode&&l.destroy()}),p=l.destroy;l.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",m);document.body.removeChild(b);document.body.removeChild(f);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;p.apply(this,
-arguments)};var u=l.editor.graph,v=u.container;v.style.overflow="hidden";this.lightboxChrome?(v.style.border="1px solid #c0c0c0",v.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",m)):(b.style.display="none",f.style.display="none");var B=this;u.getImageFromBundles=function(a){return B.getImageUrl(a)};var c=l.createTemporaryGraph;l.createTemporaryGraph=function(){var a=c.apply(this,arguments);a.getImageFromBundles=function(a){return B.getImageUrl(a)};return a};this.graphConfig.move&&
-(u.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(v.style,"border-radius","4px"),v.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(v.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(v.style,"transition","all .25s ease-in-out"));this.addClickHandler(u,l);window.setTimeout(mxUtils.bind(this,function(){v.style.outline="none";v.style.zIndex=this.lightboxZIndex;
-f.style.zIndex=this.lightboxZIndex;document.body.appendChild(v);document.body.appendChild(f);l.setFileData(this.xml);mxUtils.setPrefixedStyle(v.style,"transform","rotateY(0deg)");l.chromelessToolbar.style.bottom="60px";l.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(l.chromelessToolbar);l.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(v.style.position="absolute",v.style.display="block",v.style.left=a.x+"px",v.style.top=a.y+"px",v.style.width=
-document.body.clientWidth-80+"px",v.style.height=document.body.clientHeight-80+"px",v.style.backgroundColor="white",l.chromelessToolbar.style.display="block",l.chromelessToolbar.style.position="absolute",l.chromelessToolbar.style.bottom="",l.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");l.lightboxFit();l.chromelessResize();this.showLayers(u,this.graph);mxEvent.addListener(b,"click",function(){l.destroy()})}),0);return l};
-GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(f){throw a.innerHTML=f.message,f;}})};
-GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var f=0;f<b.length;f++)a.push(b[f]);return a}for(var d=document.getElementsByTagName("*"),b=[],f=0;f<d.length;f++){var l=d[f].className;null!=l&&0<l.length&&(l=l.split(" "),0<=mxUtils.indexOf(l,a)&&b.push(d[f]))}return b};
-GraphViewer.createViewerForElement=function(a,b){var f=a.getAttribute("data-mxgraph");if(null!=f){var d=JSON.parse(f),l=function(f){f=mxUtils.parseXml(f);f=new GraphViewer(a,f.documentElement,d);null!=b&&b(f)};null!=d.url?GraphViewer.getUrl(d.url,function(a){l(a)}):l(d.xml)}};
+var k=new EditorUi(new Editor(!0),document.createElement("div"),!0);k.editor.editBlankUrl=this.editBlankUrl;k.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=d;k.refresh=function(){};var m=mxUtils.bind(this,function(a){27==a.keyCode&&k.destroy()}),p=k.destroy;k.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",m);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;p.apply(this,
+arguments)};var u=k.editor.graph,x=u.container;x.style.overflow="hidden";this.lightboxChrome?(x.style.border="1px solid #c0c0c0",x.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",m)):(b.style.display="none",e.style.display="none");var B=this;u.getImageFromBundles=function(a){return B.getImageUrl(a)};var c=k.createTemporaryGraph;k.createTemporaryGraph=function(){var a=c.apply(this,arguments);a.getImageFromBundles=function(a){return B.getImageUrl(a)};return a};this.graphConfig.move&&
+(u.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(x.style,"border-radius","4px"),x.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(x.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(x.style,"transition","all .25s ease-in-out"));this.addClickHandler(u,k);window.setTimeout(mxUtils.bind(this,function(){x.style.outline="none";x.style.zIndex=this.lightboxZIndex;
+e.style.zIndex=this.lightboxZIndex;document.body.appendChild(x);document.body.appendChild(e);k.setFileData(this.xml);mxUtils.setPrefixedStyle(x.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});mxClient.IS_QUIRKS&&(x.style.position="absolute",x.style.display="block",x.style.left=a.x+"px",x.style.top=a.y+"px",x.style.width=
+document.body.clientWidth-80+"px",x.style.height=document.body.clientHeight-80+"px",x.style.backgroundColor="white",k.chromelessToolbar.style.display="block",k.chromelessToolbar.style.position="absolute",k.chromelessToolbar.style.bottom="",k.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");k.lightboxFit();k.chromelessResize();this.showLayers(u,this.graph);mxEvent.addListener(b,"click",function(){k.destroy()})}),0);return k};
+GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(e){throw a.innerHTML=e.message,e;}})};
+GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var e=0;e<b.length;e++)a.push(b[e]);return a}for(var d=document.getElementsByTagName("*"),b=[],e=0;e<d.length;e++){var k=d[e].className;null!=k&&0<k.length&&(k=k.split(" "),0<=mxUtils.indexOf(k,a)&&b.push(d[e]))}return b};
+GraphViewer.createViewerForElement=function(a,b){var e=a.getAttribute("data-mxgraph");if(null!=e){var d=JSON.parse(e),k=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(a,e.documentElement,d);null!=b&&b(e)};null!=d.url?GraphViewer.getUrl(d.url,function(a){k(a)}):k(d.xml)}};
GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type="text/css";a.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(a)}catch(b){}};
-GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,f){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var d=0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;d.open("GET",a);d.onload=function(){b(null!=d.getText?d.getText():d.responseText)};d.onerror=f;d.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
-(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(f,d){function l(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function m(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function p(b,c){if(!b.resizedAttached)b.resizedAttached=
-new l,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-b.appendChild(b.resizeSensor);"static"==m(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],k=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};k();var p=!1,t=function(){b.resizedAttached&&(p&&(b.resizedAttached.call(),p=!1),a(t))};a(t);var u,v,B,D,z=function(){if((B=b.offsetWidth)!=u||(D=b.offsetHeight)!=v)p=!0,u=B,v=D;k()},L=function(a,b,c){a.attachEvent?
-a.attachEvent("on"+b,c):a.addEventListener(b,c)};L(d,"scroll",z);L(f,"scroll",z)}var u=function(){GraphViewer.resizeSensorEnabled&&d()},v=Object.prototype.toString.call(f),B="[object Array]"===v||"[object NodeList]"===v||"[object HTMLCollection]"===v||"undefined"!==typeof jQuery&&f instanceof jQuery||"undefined"!==typeof Elements&&f instanceof Elements;if(B)for(var v=0,c=f.length;v<c;v++)p(f[v],u);else p(f,u);this.detach=function(){if(B)for(var a=0,c=f.length;a<c;a++)b.detach(f[a]);else b.detach(f)}};
+GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,e){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var d=0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;d.open("GET",a);d.onload=function(){b(null!=d.getText?d.getText():d.responseText)};d.onerror=e;d.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
+(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,d){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function m(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function p(b,c){if(!b.resizedAttached)b.resizedAttached=
+new k,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
+b.appendChild(b.resizeSensor);"static"==m(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var p=!1,q=function(){b.resizedAttached&&(p&&(b.resizedAttached.call(),p=!1),a(q))};a(q);var u,x,B,D,v=function(){if((B=b.offsetWidth)!=u||(D=b.offsetHeight)!=x)p=!0,u=B,x=D;g()},H=function(a,b,c){a.attachEvent?
+a.attachEvent("on"+b,c):a.addEventListener(b,c)};H(d,"scroll",v);H(f,"scroll",v)}var u=function(){GraphViewer.resizeSensorEnabled&&d()},x=Object.prototype.toString.call(e),B="[object Array]"===x||"[object NodeList]"===x||"[object HTMLCollection]"===x||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(B)for(var x=0,c=e.length;x<c;x++)p(e[x],u);else p(e,u);this.detach=function(){if(B)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}};
b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})();
(function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();
diff --git a/src/main/webapp/plugins/update.js b/src/main/webapp/plugins/update.js
index 78423c9f..8836c7e7 100644
--- a/src/main/webapp/plugins/update.js
+++ b/src/main/webapp/plugins/update.js
@@ -214,7 +214,7 @@ Draw.loadPlugin(function(editorUi)
// Ignores short edges
var state = graph.view.getState(cell);
- if (Math.random() > 0.5 && state.length > 50)
+ if (Math.random() > 0.5 && state != null && state.length > 50)
{
var update = doc.createElement('update');
update.setAttribute('id', cell.id);
diff --git a/src/main/webapp/resources/dia_ca.txt b/src/main/webapp/resources/dia_ca.txt
index bb49d554..8e3339b8 100644
--- a/src/main/webapp/resources/dia_ca.txt
+++ b/src/main/webapp/resources/dia_ca.txt
@@ -2,10 +2,10 @@
# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE
aboutDrawio=Sobre draw.io
accessDenied=Accés denegat
-action=Action
+action=Acció
actualSize=Mida real
add=Afegeix
-addAccount=Add account
+addAccount=Afegeix un compte
addedFile=Afegit {1}
addImages=Afegeix imatges
addImageUrl=Afegeix l'URL de la imatge
@@ -28,11 +28,11 @@ android=Android
angle=Angle
arc=Arc
areYouSure=N'esteu segurs?
-ensureDataSaved=Si us plau, assegura't d'haver desat les dades abans de tancar.
+ensureDataSaved=Si us plau, assegureu-vos d'haver desat les dades abans de tancar.
allChangesSaved=S'han desat tots els canvis
allChangesSavedInDrive=S'han desat tots els canvis a Drive
allowPopups=Permet els elements emergents per evitar aquest quadre de diàleg.
-allowRelativeUrl=Allow relative URL
+allowRelativeUrl=Permet URL relatiu
alreadyConnected=Els nodes ja estan connectats
apply=Aplica
archiMate21=ArchiMate 2.1
@@ -45,15 +45,15 @@ author=Autor
authorizationRequired=Cal autorització
authorizeThisAppIn=Autoritza aquesta aplicació a {1}:
authorize=Autoritza
-authorizing=Autoritzant
+authorizing=S'està autoritzant
automatic=Automàtic
-autosave=Desat automàtic
-autosize=Autodimensionar
-attachments=Arxius adjunts
+autosave=Desada automàtica
+autosize=Mida automàtica
+attachments=Fitxers adjunts
aws=AWS
aws3d=AWS 3D
azure=Azure
-back=Back
+back=Darrera
background=Fons
backgroundColor=Color de fons
backgroundImage=Imatge de fons
@@ -65,24 +65,24 @@ blockquote=Cita en bloc
blog=Blog
bold=Negreta
bootstrap=Bootstrap
-border=Border
+border=Vora
borderColor=Color de la vora
borderWidth=Amplada de la vora
-bottom=Abaix
+bottom=A baix
bottomAlign=Alineació inferior
-bottomLeft=Abaix esquerra
-bottomRight=Abaix dreta
+bottomLeft=A baix esquerra
+bottomRight=A baix dreta
bpmn=BPMN
browser=Navegador
bulletedList=Llista de pics
business=Professional
busy=Operació en marxa
cabinets=Cabinets
-cancel=Cancel·lar
+cancel=Cancel·la
center=Centra
-cannotLoad=La càrrega ha fallat. Si us plau, torna a intentar-ho més tard.
-cannotLogin=L'inici de sessió ha fallat. Si us plau, torna a intentar-ho més tard.
-cannotOpenFile=No es pot obrir el fitxer
+cannotLoad=S'ha produït un error la càrrega. Torneu-ho a provar més tard.
+cannotLogin=S'ha produït un error en l l'inici de sessió. Torneu-ho a provar més tard.
+cannotOpenFile=No s'ha pogut obrir el fitxer
change=Canvia
changeOrientation=Canvia l'orientació
changeUser=Canvia d'usuari
@@ -95,17 +95,17 @@ chooseAnOption=Escolliu una opció
chromeApp=Aplicació Chrome
collaborativeEditingNotice=Important Notice for Collaborative Editing
compressed=Comprimit
-commitMessage=Missatge de Commit
+commitMessage=Missatge de la comissió
configLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!
configLinkConfirm=Click OK to configure and restart draw.io.
csv=CSV
-dark=Dark
+dark=Fosc
didYouMeanToExportToPdf=Did you mean to export to PDF?
draftFound=S'ha trobat un esborrany per a '{1}'. Carrega'l a l'editor o descarta'l per continuar.
-dragAndDropNotSupported=Les imatges no es poden arrosegar i amollar. Vols importar-les?
+dragAndDropNotSupported=Les imatges no es poden arrossegar i deixar anar. Voleu importar-les?
dropboxCharsNotAllowed=No es permeten aquests caràcters: \ / : ? * " |
check=Comprova
-checksum=Checksum
+checksum=Suma de verificació
circle=Cercle
cisco=Cisco
classic=Clàssic
@@ -113,7 +113,7 @@ clearDefaultStyle=Esborra l'estil predeterminat
clearWaypoints=Esborra els waypoint
clipart=Imatges predissenyades
close=Tanca
-closingFile=Closing file
+closingFile=S'està tancant el fitxer
collaborator=Col·laborador
collaborators=Col·laboradors
collapse=Minimitza
@@ -132,13 +132,13 @@ connectionArrows=Fletxes de connexió
connectionPoints=Punts de connexió
constrainProportions=Limita les proporcions
containsValidationErrors=Conté errors de validació
-copiedToClipboard=Copiat al portapapers
+copiedToClipboard=Copiat al porta-retalls
copy=Copia
copyConnect=Copia en connectar
copyCreated=A copy of the file was created.
copyOf=Còpia de {1}
copyOfDrawing=Còpia del dibuix
-copySize=Copy Size
+copySize=Copia la mida
copyStyle=Copia l'estil
create=Crea
createNewDiagram=Crea un diagrama nou
@@ -184,16 +184,16 @@ dotted=Puntejat
doubleClickOrientation=Fes doble clic per canviar l'orientació
doubleClickTooltip=Fes doble clic per inserir text
doubleClickChangeProperty=Fes doble clic per canviar el nom de la propietat
-download=Descarregar
-downloadDesktop=Download draw.io Desktop
-downloadAs=Descarregar com
-clickHereToSave=Clica aquí per desar.
+download=Descarrega
+downloadDesktop=Descarrega el draw.io per escriptori
+downloadAs=Descarrega com
+clickHereToSave=Feu clic aquí per desar.
dpi=DPI
-draftDiscarded=Esborrany descartat
-draftSaved=Esborrany desat
-dragElementsHere=Arrossega elements aquí
-dragImagesHere=Arrossega les imatges o els URL aquí
-dragUrlsHere=Arrosega els URL aquí
+draftDiscarded=S'ha descartat l'esborrany
+draftSaved=S'ha desat l'esborrany
+dragElementsHere=Arrossegueu elements aquí
+dragImagesHere=Arrossegueu les imatges o els URL aquí
+dragUrlsHere=Arrossegueu els URL aquí
draw.io=draw.io
drawing=Dibuix{1}
drawingEmpty=El dibuix està buit
@@ -218,7 +218,7 @@ editStyle=Edita l'estil
editText=Edita el text
editTooltip=Edita els consells d'eines
glass=Vidre
-googleImages=Google Images
+googleImages=Google Imatges
imageSearch=Buscador d'imatges
eip=EIP
embed=Incrusta
@@ -227,10 +227,10 @@ mainEmbedNotice=Enganxa-ho a la pàgina
electrical=Elèctric
ellipse=Ellipse
embedNotice=Enganxa-ho una vegada al final de la pàgina
-enterGroup=Introdueix grup
-enterName=Introdueix el nom
-enterPropertyName=Introdueix el nom de propietat
-enterValue=Introdueix el valor
+enterGroup=Introduïu el grup
+enterName=Introduïu el nom
+enterPropertyName=Introduïu el nom de propietat
+enterValue=Introduïu el valor
entityRelation=Relació de l'entitat
error=Error
errorDeletingFile=Error en esborrar el fitxer
@@ -246,16 +246,16 @@ errorSavingFileNameConflict=No s'ha pogut desar el diagrama. La pàgina actual c
errorSavingFileNotFound=Error en desar. No s'ha trobat el fitxer.
errorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.
errorSavingFileSessionTimeout=La teva sessió ha acabat. Si us plau, <a target='_blank' href='{1}'>{2}</a> i retorna a aquesta pestanya per intentar desar-ho de nou.
-errorSendingFeedback=Error en enviar la opinió.
+errorSendingFeedback=Error en enviar l'opinió.
errorUpdatingPreview=Error pujant la vista prèvia.
-exit=Sortir
-exitGroup=Sortir del grup
+exit=Surt
+exitGroup=Surt del grup
expand=Amplia
export=Exporta
-exporting=Exportant
+exporting=S'està exportant
exportAs=Exporta com a
exportOptionsDisabled=Opcions d'exportació inactives
-exportOptionsDisabledDetails=El propietari ha desactivat les opcions per a descarregar, imprimir o copiar aquest fitxer per las que només tenen permís per visualitzar i comentar.
+exportOptionsDisabledDetails=El propietari ha desactivat les opcions per a descarregar, imprimir o copiar aquest fitxer per els que només tenen permís per visualitzar i comentar.
externalChanges=External Changes
extras=Extres
facebook=Facebook
@@ -269,7 +269,7 @@ fileChangedOverwriteDialog=El fitxer s'ha modificat. Sobreescriure els canvis?
fileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?
fileChangedSync=The file has been modified. Click here to synchronize.
overwrite=Sobreescriure
-synchronize=Synchronize
+synchronize=Sincronitza
filename=Nom del fitxer
fileExists=Aquest fitxer ja existeix
fileMovedToTrash=File was moved to trash
@@ -287,16 +287,16 @@ fileWillBeSavedInAppFolder={1} es desarà a la carpeta d'aplicacions.
fill=Farcit
fillColor=Color de farcit
filterCards=Filter Cards
-find=Buscar
+find=Cerca
fit=Ajusta
fitContainer=Redimensiona el contenidor
fitIntoContainer=Ajusta'l al contenidor
fitPage=Ajusta la pàgina
fitPageWidth=Ajusta l'amplada de pàgina
fitTo=Ajusta a
-fitToSheetsAcross=pàgina(es) a través
+fitToSheetsAcross=pàgines a través
fitToBy=per
-fitToSheetsDown=pàgina(es) cap abaix
+fitToSheetsDown=pàgines cap a baix
fitTwoPages=Dues pàgines
fitWindow=Ajusta la finestra
flip=Inverteix
@@ -311,8 +311,8 @@ fontSize=Mida de la font
forbidden=No esteu autoritzats a accedir a aquest fitxer
format=Format
formatPanel=Tauler de format
-formatted=Formatejat
-formattedText=Text formatejat
+formatted=Formatat
+formattedText=Text formatat
formatPng=PNG
formatGif=GIF
formatJpg=JPEG
@@ -338,23 +338,23 @@ gcp=GCP
general=General
github=GitHub
gitlab=GitLab
-gliffy=Gliffy
+gliffy=Gliffy
global=Global
-googleDocs=Google Docs
+googleDocs=Documents de Google
googleDrive=Google Drive
googleGadget=Google Gadget
googlePlus=Google+
googleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:
-googleSlides=Google Slides
+googleSlides=Presentacions de Google
googleSites=Google Sites
-googleSheets=Google Sheets
+googleSheets=Fulls de càlcul de Google
gradient=Gradient
gradientColor=Color
grid=Quadrícula
gridColor=Color de la quadrícula
gridSize=Mida de la quadrícula
group=Agrupar
-guides=Guíes
+guides=Guies
hateApp=Odio draw.io
heading=Capçalera
height=Alçada
@@ -382,14 +382,14 @@ imgur=Imgur
import=Importa
importFrom=Importa des de
includeCopyOfMyDiagram=Inclou una còpia del meu diagrama
-increaseIndent=Aumenta la sagnia
-decreaseIndent=Disminueix la sagnia
+increaseIndent=Augmenta el sagnat
+decreaseIndent=Disminueix el sagnat
insert=Afegeix
insertColumnBefore=Afegeix una columna a l'esquerra
insertColumnAfter=Afegeix una columna a la dreta
-insertEllipse=Afegeix un el·lipse
+insertEllipse=Afegeix una el·lipse
insertImage=Afegeix una imatge
-insertHorizontalRule=Afegeix una regla horizontal
+insertHorizontalRule=Afegeix una regla horitzontal
insertLink=Afegeix un enllaç
insertPage=Afegeix una pàgina
insertRectangle=Afegeix un rectangle
@@ -428,7 +428,7 @@ hours=hores
days=dies
months=mesos
years=anys
-restartForChangeRequired=Cal refrescar la pàgina per a que els canvis tinguin efecte.
+restartForChangeRequired=Cal refrescar la pàgina perquè els canvis tinguin efecte.
laneColor=Color de la fila
lastModified=Modificat per darrera vegada
layout=Disseny
@@ -450,7 +450,7 @@ loggedOut=Desconnectat
logIn=Iniciar sessió
loveIt=M'encanta {1}
lucidchart=Lucidchart
-maps=Maps
+maps=Mapes
mathematicalTypesetting=Composició tipogràfica matemàtica
makeCopy=Fes una còpia
manual=Manual
@@ -459,7 +459,7 @@ microsoftExcel=Microsoft Excel
microsoftPowerPoint=Microsoft PowerPoint
microsoftWord=Microsoft Word
middle=Mig
-minimal=Minimal
+minimal=Mínim
misc=Diversos
mockups=Esbossos
modificationDate=Data de modificació
@@ -473,7 +473,7 @@ moving=Movent
moveSelectionTo=Mou la selecció a {1}
name=Nom
navigation=Navegació
-network=Network
+network=Xarxa
networking=Connexió
new=Nou
newLibrary=Biblioteca nova
@@ -539,7 +539,7 @@ pageView=Vista de pàgina
pageSetup=Configuració de la pàgina
pageScale=Escala de la pàgina
pan=Panoràmica
-panTooltip=Espai+Arrosega per fer panoràmica
+panTooltip=Espai+Arrossegueu per fer panoràmica
paperSize=Mida del paper
pattern=Patró
paste=Enganxa
@@ -579,8 +579,8 @@ reconnecting=Reconnectant
recentlyUpdated=Actualitzat recentment
recentlyViewed=Visitat recentment
rectangle=Rectangle
-redirectToNewApp=Aquest fitxer va ser creat o modificat en una versió posterior d'aquesta aplicació. Ara s'hi redireccionarà.
-realtimeTimeout=Sembla que hes fet canvis mentres estaves desconnectat. Disculpa les molèsties, no es poden desar aquests canvis.
+redirectToNewApp=Aquest fitxer va ser creat o modificat en una versió posterior d'aquesta aplicació. Ara hi sereu redirigits.
+realtimeTimeout=Sembla que heu fet canvis mentre s'estava desconnectat. Malauradament, aquests canvis ara no es poden desar.
redo=Refés
refresh=Refresca
regularExpression=Expressió normal
@@ -626,9 +626,9 @@ save=Desa
saveAndExit=Desa i surt
saveAs=Desa com
saveAsXmlFile=Desar com a fitxer XML?
-saved=Desat
-saveDiagramFirst=Please save the diagram first
-saveDiagramsTo=Desa els diagramas a
+saved=S'ha desat
+saveDiagramFirst=Deseu primer el diagrama
+saveDiagramsTo=Desa els diagrames a
saveLibrary403=Permisos insuficients per editar aquesta biblioteca
saveLibrary500=Hi ha hagut un error desant la biblioteca
saving=Desant
@@ -650,7 +650,7 @@ sendMessage=Envia
sendYourFeedbackToDrawIo=Envia la teva opinió a draw.io
serviceUnavailableOrBlocked=Servei no disponible o bloquejat
sessionExpired=La teva sessió ha caducat. Si us plau, refresca la finestra del teu navegador.
-sessionTimeoutOnSave=El teva sessió ha caducat i s'ha desconnectat de Google Drive. Prem Accepta per accedir-hi i desar.
+sessionTimeoutOnSave=La sessió ha caducat i s'ha desconnectat de Google Drive. Prem Accepta per accedir-hi i desar.
setAsDefaultStyle=Estableix com estil predeterminat
shadow=Ombra
shape=Forma
@@ -675,8 +675,8 @@ space=Espai
spacing=Espaiat
specialLink=Enllaç especial
standard=Estàndard
-startDrawing=Start drawing
-stopDrawing=Stop drawing
+startDrawing=Comença a dibuixar
+stopDrawing=Para de dibuixar
starting=Iniciant
straight=Recte
strikethrough=Strikethrough
@@ -689,8 +689,8 @@ support=Ajuda
sysml=SysML
tags=Etiquetes
table=Taula
-tables=Tables
-takeOver=Take Over
+tables=Taules
+takeOver=Preneu el control
targetSpacing=Espaiat de l'objectiu
template=Plantilla
templates=Plantilles
@@ -703,7 +703,7 @@ title=Títol
to=a
toBack=Vés enrere
toFront=Vés endavant
-toolbar=Toolbar
+toolbar=Barra d'eines
tooltips=Consells d'eines
top=Dalt
topAlign=Alinea a dalt
@@ -734,14 +734,14 @@ updatingPreview=Actualitzant la vista prèvia. Si us plau, espera...
updatingSelection=Actualitzant la selecció. Si us plau, espera...
upload=Carrega
url=URL
-useOffline=Use Offline
-useRootFolder=Use root folder?
+useOffline=Feu-ho servir fora de línia
+useRootFolder=Voleu fer servir la carpeta arrel?
userManual=Manual d'usuari
vertical=Vertical
verticalFlow=Flux vertical
verticalTree=Arbre vertical
view=Vista
-viewerSettings=Viewer Settings
+viewerSettings=Paràmetres del visualitzador
viewUrl=Enllaç a vista: {1}
voiceAssistant=Assistent de veu (beta)
warning=Atenció
@@ -767,7 +767,7 @@ mockups=Esbossos
networkdiagrams=Diagrames de xarxa
nothingIsSelected=No hi ha res seleccionat
other=Altres
-softwaredesign=Diseny de programari
+softwaredesign=Disseny de programari
venndiagrams=Diagrames de Venn
webEmailOrOther=Web, e-mail o qualsevol altra adreça d'internet
webLink=Enllaç web
diff --git a/src/main/webapp/resources/dia_zh.txt b/src/main/webapp/resources/dia_zh.txt
index 3b5d06b7..e904dae9 100644
--- a/src/main/webapp/resources/dia_zh.txt
+++ b/src/main/webapp/resources/dia_zh.txt
@@ -617,7 +617,7 @@ revisionHistory=修订历史
rhombus=Rhombus
right=右
rightAlign=右对齐
-rightToLeft=由由至左
+rightToLeft=由右至左
rotate=旋转
rotateTooltip=点选拖拽旋转,或点击选择90度
rotation=旋转