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:
Diffstat (limited to 'src/main/webapp/js/viewer.min.js')
-rw-r--r--src/main/webapp/js/viewer.min.js1318
1 files changed, 661 insertions, 657 deletions
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index 88f53f79..5bc3eb6e 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -108,9 +108,9 @@ return a}();
a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=window.location.host;if("test.draw.io"!=a){var c="diagrams.net";b=a.length-c.length;c=a.lastIndexOf(c,b);-1!==c&&c===b?window.DRAWIO_LOG_URL="https://log.diagrams.net":(c="draw.io",b=a.length-c.length,c=a.lastIndexOf(c,b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();
if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
-"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],ADD_ATTR:["target"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^(?:(?:https?|mailto|tel|callto|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";
-window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";
-window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"18.1.2",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],ADD_ATTR:["target"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
+window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"18.1.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&
0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!==
@@ -1989,53 +1989,53 @@ Editor.prototype.setFilename=function(b){this.filename=b};
Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(n,D){e.undoableEditHappened(D.getProperty("edit"))};var k=mxUtils.bind(this,function(n,D){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,k);b.getView().addListener(mxEvent.UNDO,k);k=function(n,D){n=b.getSelectionCellsForChanges(D.getProperty("edit").changes,function(E){return!(E instanceof mxChildChange)});if(0<n.length){b.getModel();D=[];for(var t=0;t<n.length;t++)null!=
b.view.getState(n[t])&&D.push(n[t]);b.setSelectionCells(D)}};e.addListener(mxEvent.UNDO,k);e.addListener(mxEvent.REDO,k);return e};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
-function Dialog(b,e,k,n,D,t,E,d,f,g,l){var q=f?57:0,y=k,F=n,C=f?0:64,H=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(H.height=window.innerHeight);var G=H.height,aa=Math.max(1,Math.round((H.width-k-C)/2)),da=Math.max(1,Math.round((G-n-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-C):k;n=Math.min(n,G-C);0<b.dialogs.length&&(this.zIndex+=
+function Dialog(b,e,k,n,D,t,E,d,f,g,m){var q=f?57:0,y=k,F=n,C=f?0:64,H=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(H.height=window.innerHeight);var G=H.height,aa=Math.max(1,Math.round((H.width-k-C)/2)),da=Math.max(1,Math.round((G-n-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-C):k;n=Math.min(n,G-C);0<b.dialogs.length&&(this.zIndex+=
2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=G+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));H=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=H.x+"px";this.bg.style.top=H.y+"px";aa+=H.x;da+=H.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+
"px",da+=b.embedViewport.y,aa+=b.embedViewport.x);D&&document.body.appendChild(this.bg);var ba=b.createDiv(f?"geTransDialog":"geDialog");D=this.getPosition(aa,da,k,n);aa=D.x;da=D.y;ba.style.width=k+"px";ba.style.height=n+"px";ba.style.left=aa+"px";ba.style.top=da+"px";ba.style.zIndex=this.zIndex;ba.appendChild(e);document.body.appendChild(ba);!d&&e.clientHeight>ba.clientHeight-C&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(t&&(t=document.createElement("img"),t.setAttribute("src",Dialog.prototype.closeImage),
-t.setAttribute("title",mxResources.get("close")),t.className="geDialogClose",t.style.top=da+14+"px",t.style.left=aa+k+38-q+"px",t.style.zIndex=this.zIndex,mxEvent.addListener(t,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(t),this.dialogImg=t,!l)){var Y=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(qa){Y=!0}),null,mxUtils.bind(this,function(qa){Y&&(b.hideDialog(!0),Y=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var qa=
+t.setAttribute("title",mxResources.get("close")),t.className="geDialogClose",t.style.top=da+14+"px",t.style.left=aa+k+38-q+"px",t.style.zIndex=this.zIndex,mxEvent.addListener(t,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(t),this.dialogImg=t,!m)){var Y=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(qa){Y=!0}),null,mxUtils.bind(this,function(qa){Y&&(b.hideDialog(!0),Y=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var qa=
g();null!=qa&&(y=k=qa.w,F=n=qa.h)}qa=mxUtils.getDocumentSize();G=qa.height;this.bg.style.height=G+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");aa=Math.max(1,Math.round((qa.width-k-C)/2));da=Math.max(1,Math.round((G-n-b.footerHeight)/3));k=null!=document.body?Math.min(y,document.body.scrollWidth-C):y;n=Math.min(F,G-C);qa=this.getPosition(aa,da,k,n);aa=qa.x;da=qa.y;ba.style.left=aa+"px";ba.style.top=da+"px";ba.style.width=k+"px";ba.style.height=
n+"px";!d&&e.clientHeight>ba.clientHeight-C&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=da+14+"px",this.dialogImg.style.left=aa+k+38-q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=E;this.container=ba;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,e){return new mxPoint(b,e)};Dialog.prototype.close=function(b,e){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,e))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(b,e,k,n,D,t,E,d,f,g,l){f=null!=f?f:!0;var q=document.createElement("div");q.style.textAlign="center";if(null!=e){var y=document.createElement("div");y.style.padding="0px";y.style.margin="0px";y.style.fontSize="18px";y.style.paddingBottom="16px";y.style.marginBottom="10px";y.style.borderBottom="1px solid #c0c0c0";y.style.color="gray";y.style.whiteSpace="nowrap";y.style.textOverflow="ellipsis";y.style.overflow="hidden";mxUtils.write(y,e);y.setAttribute("title",e);q.appendChild(y)}e=
-document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";e.innerHTML=k;q.appendChild(e);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=t&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();t()}),e.className="geBtn",k.appendChild(e),k.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=l&&l()}),g.className="geBtn",k.appendChild(g));var F=mxUtils.button(n,function(){f&&b.hideDialog();null!=D&&D()});
+var ErrorDialog=function(b,e,k,n,D,t,E,d,f,g,m){f=null!=f?f:!0;var q=document.createElement("div");q.style.textAlign="center";if(null!=e){var y=document.createElement("div");y.style.padding="0px";y.style.margin="0px";y.style.fontSize="18px";y.style.paddingBottom="16px";y.style.marginBottom="10px";y.style.borderBottom="1px solid #c0c0c0";y.style.color="gray";y.style.whiteSpace="nowrap";y.style.textOverflow="ellipsis";y.style.overflow="hidden";mxUtils.write(y,e);y.setAttribute("title",e);q.appendChild(y)}e=
+document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";e.innerHTML=k;q.appendChild(e);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=t&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();t()}),e.className="geBtn",k.appendChild(e),k.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=m&&m()}),g.className="geBtn",k.appendChild(g));var F=mxUtils.button(n,function(){f&&b.hideDialog();null!=D&&D()});
F.className="geBtn";k.appendChild(F);null!=E&&(n=mxUtils.button(E,function(){f&&b.hideDialog();null!=d&&d()}),n.className="geBtn gePrimaryBtn",k.appendChild(n));this.init=function(){F.focus()};q.appendChild(k);this.container=q},PrintDialog=function(b,e){this.create(b,e)};
-PrintDialog.prototype.create=function(b){function e(F){var C=E.checked||g.checked,H=parseInt(q.value)/100;isNaN(H)&&(H=1,q.value="100%");H*=.75;var G=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,aa=1/k.pageScale;if(C){var da=E.checked?1:parseInt(l.value);isNaN(da)||(aa=mxUtils.getScaleForPageCount(da,k,G))}k.getGraphBounds();var ba=da=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*H);G.height=Math.ceil(G.height*H);aa*=H;!C&&k.pageVisible?(H=k.getPageLayout(),da-=H.x*G.width,ba-=H.y*
+PrintDialog.prototype.create=function(b){function e(F){var C=E.checked||g.checked,H=parseInt(q.value)/100;isNaN(H)&&(H=1,q.value="100%");H*=.75;var G=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,aa=1/k.pageScale;if(C){var da=E.checked?1:parseInt(m.value);isNaN(da)||(aa=mxUtils.getScaleForPageCount(da,k,G))}k.getGraphBounds();var ba=da=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*H);G.height=Math.ceil(G.height*H);aa*=H;!C&&k.pageVisible?(H=k.getPageLayout(),da-=H.x*G.width,ba-=H.y*
G.height):C=!0;C=PrintDialog.createPrintPreview(k,aa,G,0,da,ba,C);C.open();F&&PrintDialog.printPreview(C)}var k=b.editor.graph,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var D=document.createElement("tbody");var t=document.createElement("tr");var E=document.createElement("input");E.setAttribute("type","checkbox");var d=document.createElement("td");d.setAttribute("colspan","2");d.style.fontSize="10pt";d.appendChild(E);var f=document.createElement("span");mxUtils.write(f,
" "+mxResources.get("fitPage"));d.appendChild(f);mxEvent.addListener(f,"click",function(F){E.checked=!E.checked;g.checked=!E.checked;mxEvent.consume(F)});mxEvent.addListener(E,"change",function(){g.checked=!E.checked});t.appendChild(d);D.appendChild(t);t=t.cloneNode(!1);var g=document.createElement("input");g.setAttribute("type","checkbox");d=document.createElement("td");d.style.fontSize="10pt";d.appendChild(g);f=document.createElement("span");mxUtils.write(f," "+mxResources.get("posterPrint")+":");
-d.appendChild(f);mxEvent.addListener(f,"click",function(F){g.checked=!g.checked;E.checked=!g.checked;mxEvent.consume(F)});t.appendChild(d);var l=document.createElement("input");l.setAttribute("value","1");l.setAttribute("type","number");l.setAttribute("min","1");l.setAttribute("size","4");l.setAttribute("disabled","disabled");l.style.width="50px";d=document.createElement("td");d.style.fontSize="10pt";d.appendChild(l);mxUtils.write(d," "+mxResources.get("pages")+" (max)");t.appendChild(d);D.appendChild(t);
-mxEvent.addListener(g,"change",function(){g.checked?l.removeAttribute("disabled"):l.setAttribute("disabled","disabled");E.checked=!g.checked});t=t.cloneNode(!1);d=document.createElement("td");mxUtils.write(d,mxResources.get("pageScale")+":");t.appendChild(d);d=document.createElement("td");var q=document.createElement("input");q.setAttribute("value","100 %");q.setAttribute("size","5");q.style.width="50px";d.appendChild(q);t.appendChild(d);D.appendChild(t);t=document.createElement("tr");d=document.createElement("td");
+d.appendChild(f);mxEvent.addListener(f,"click",function(F){g.checked=!g.checked;E.checked=!g.checked;mxEvent.consume(F)});t.appendChild(d);var m=document.createElement("input");m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.setAttribute("size","4");m.setAttribute("disabled","disabled");m.style.width="50px";d=document.createElement("td");d.style.fontSize="10pt";d.appendChild(m);mxUtils.write(d," "+mxResources.get("pages")+" (max)");t.appendChild(d);D.appendChild(t);
+mxEvent.addListener(g,"change",function(){g.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");E.checked=!g.checked});t=t.cloneNode(!1);d=document.createElement("td");mxUtils.write(d,mxResources.get("pageScale")+":");t.appendChild(d);d=document.createElement("td");var q=document.createElement("input");q.setAttribute("value","100 %");q.setAttribute("size","5");q.style.width="50px";d.appendChild(q);t.appendChild(d);D.appendChild(t);t=document.createElement("tr");d=document.createElement("td");
d.colSpan=2;d.style.paddingTop="20px";d.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&d.appendChild(f);if(PrintDialog.previewEnabled){var y=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});y.className="geBtn";d.appendChild(y)}y=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});y.className="geBtn gePrimaryBtn";d.appendChild(y);
b.editor.cancelFirst||d.appendChild(f);t.appendChild(d);D.appendChild(t);n.appendChild(D);this.container=n};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var e=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(e,500):e()}}catch(k){}};
PrintDialog.createPrintPreview=function(b,e,k,n,D,t,E){e=new mxPrintPreview(b,e,k,n,D,t);e.title=mxResources.get("preview");e.printBackgroundImage=!0;e.autoOrigin=E;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.backgroundColor=b;var d=e.writeHead;e.writeHead=function(f){d.apply(this,arguments);f.writeln('<style type="text/css">');f.writeln("@media screen {");f.writeln(" body > div { padding:30px;box-sizing:content-box; }");f.writeln("}");f.writeln("</style>")};return e};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(b){function e(){null==l||l==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=l,g.style.backgroundImage="")}function k(){var G=C;null!=G&&Graph.isPageLink(G.src)&&(G=b.createImageForPageLink(G.src,null));null!=G&&null!=G.src?(F.setAttribute("src",G.src),F.style.display=""):(F.removeAttribute("src"),F.style.display="none")}var n=b.editor.graph,D=document.createElement("table");D.style.width=
+var PageSetupDialog=function(b){function e(){null==m||m==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=m,g.style.backgroundImage="")}function k(){var G=C;null!=G&&Graph.isPageLink(G.src)&&(G=b.createImageForPageLink(G.src,null));null!=G&&null!=G.src?(F.setAttribute("src",G.src),F.style.display=""):(F.removeAttribute("src"),F.style.display="none")}var n=b.editor.graph,D=document.createElement("table");D.style.width=
"100%";D.style.height="100%";var t=document.createElement("tbody");var E=document.createElement("tr");var d=document.createElement("td");d.style.verticalAlign="top";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("paperSize")+":");E.appendChild(d);d=document.createElement("td");d.style.verticalAlign="top";d.style.fontSize="10pt";var f=PageSetupDialog.addPageFormatPanel(d,"pagesetupdialog",n.pageFormat);E.appendChild(d);t.appendChild(E);E=document.createElement("tr");d=document.createElement("td");
-mxUtils.write(d,mxResources.get("background")+":");E.appendChild(d);d=document.createElement("td");d.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var g=document.createElement("button");g.style.width="22px";g.style.height="22px";g.style.cursor="pointer";g.style.marginRight="20px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(g.style.position="relative",g.style.top="-6px");var l=n.background;e();mxEvent.addListener(g,
-"click",function(G){b.pickColor(l||"none",function(aa){l=aa;e()});mxEvent.consume(G)});d.appendChild(g);mxUtils.write(d,mxResources.get("gridSize")+":");var q=document.createElement("input");q.setAttribute("type","number");q.setAttribute("min","0");q.style.width="40px";q.style.marginLeft="6px";q.value=n.getGridSize();d.appendChild(q);mxEvent.addListener(q,"change",function(){var G=parseInt(q.value);q.value=Math.max(1,isNaN(G)?n.getGridSize():G)});E.appendChild(d);t.appendChild(E);E=document.createElement("tr");
+mxUtils.write(d,mxResources.get("background")+":");E.appendChild(d);d=document.createElement("td");d.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var g=document.createElement("button");g.style.width="22px";g.style.height="22px";g.style.cursor="pointer";g.style.marginRight="20px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(g.style.position="relative",g.style.top="-6px");var m=n.background;e();mxEvent.addListener(g,
+"click",function(G){b.pickColor(m||"none",function(aa){m=aa;e()});mxEvent.consume(G)});d.appendChild(g);mxUtils.write(d,mxResources.get("gridSize")+":");var q=document.createElement("input");q.setAttribute("type","number");q.setAttribute("min","0");q.style.width="40px";q.style.marginLeft="6px";q.value=n.getGridSize();d.appendChild(q);mxEvent.addListener(q,"change",function(){var G=parseInt(q.value);q.value=Math.max(1,isNaN(G)?n.getGridSize():G)});E.appendChild(d);t.appendChild(E);E=document.createElement("tr");
d=document.createElement("td");mxUtils.write(d,mxResources.get("image")+":");E.appendChild(d);d=document.createElement("td");var y=document.createElement("button");y.className="geBtn";y.style.margin="0px";mxUtils.write(y,mxResources.get("change")+"...");var F=document.createElement("img");F.setAttribute("valign","middle");F.style.verticalAlign="middle";F.style.border="1px solid lightGray";F.style.borderRadius="4px";F.style.marginRight="14px";F.style.maxWidth="100px";F.style.cursor="pointer";F.style.height=
"60px";F.style.padding="4px";var C=n.backgroundImage,H=function(G){b.showBackgroundImageDialog(function(aa,da){da||(C=aa,k())},C);mxEvent.consume(G)};mxEvent.addListener(y,"click",H);mxEvent.addListener(F,"click",H);k();d.appendChild(F);d.appendChild(y);E.appendChild(d);t.appendChild(E);E=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="16px";d.setAttribute("align","right");y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});y.className=
-"geBtn";b.editor.cancelFirst&&d.appendChild(y);H=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var G=parseInt(q.value);isNaN(G)||n.gridSize===G||n.setGridSize(G);G=new ChangePageSetup(b,l,C,f.get());G.ignoreColor=n.background==l;G.ignoreImage=(null!=n.backgroundImage?n.backgroundImage.src:null)===(null!=C?C.src:null);n.pageFormat.width==G.previousFormat.width&&n.pageFormat.height==G.previousFormat.height&&G.ignoreColor&&G.ignoreImage||n.model.execute(G)});H.className="geBtn gePrimaryBtn";
+"geBtn";b.editor.cancelFirst&&d.appendChild(y);H=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var G=parseInt(q.value);isNaN(G)||n.gridSize===G||n.setGridSize(G);G=new ChangePageSetup(b,m,C,f.get());G.ignoreColor=n.background==m;G.ignoreImage=(null!=n.backgroundImage?n.backgroundImage.src:null)===(null!=C?C.src:null);n.pageFormat.width==G.previousFormat.width&&n.pageFormat.height==G.previousFormat.height&&G.ignoreColor&&G.ignoreImage||n.model.execute(G)});H.className="geBtn gePrimaryBtn";
d.appendChild(H);b.editor.cancelFirst||d.appendChild(y);E.appendChild(d);t.appendChild(E);D.appendChild(t);this.container=D};
PageSetupDialog.addPageFormatPanel=function(b,e,k,n){function D(qa,O,X){if(X||q!=document.activeElement&&y!=document.activeElement){qa=!1;for(O=0;O<C.length;O++)X=C[O],da?"custom"==X.key&&(d.value=X.key,da=!1):null!=X.format&&("a4"==X.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==X.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),k.width==
-X.format.width&&k.height==X.format.height?(d.value=X.key,t.setAttribute("checked","checked"),t.defaultChecked=!0,t.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,qa=!0):k.width==X.format.height&&k.height==X.format.width&&(d.value=X.key,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,qa=E.checked=!0));qa?(f.style.display="",l.style.display="none"):(q.value=k.width/100,y.value=k.height/100,t.setAttribute("checked",
-"checked"),d.value="custom",f.style.display="none",l.style.display="")}}e="format-"+e;var t=document.createElement("input");t.setAttribute("name",e);t.setAttribute("type","radio");t.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",e);E.setAttribute("type","radio");E.setAttribute("value","landscape");var d=document.createElement("select");d.style.marginBottom="8px";d.style.borderRadius="4px";d.style.border="1px solid rgb(160, 160, 160)";d.style.width="206px";
-var f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";f.style.height="24px";t.style.marginRight="6px";f.appendChild(t);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));f.appendChild(e);E.style.marginLeft="10px";E.style.marginRight="6px";f.appendChild(E);var g=document.createElement("span");g.style.width="100px";mxUtils.write(g,mxResources.get("landscape"));f.appendChild(g);var l=document.createElement("div");l.style.marginLeft=
-"4px";l.style.width="210px";l.style.height="24px";var q=document.createElement("input");q.setAttribute("size","7");q.style.textAlign="right";l.appendChild(q);mxUtils.write(l," in x ");var y=document.createElement("input");y.setAttribute("size","7");y.style.textAlign="right";l.appendChild(y);mxUtils.write(l," in");f.style.display="none";l.style.display="none";for(var F={},C=PageSetupDialog.getFormats(),H=0;H<C.length;H++){var G=C[H];F[G.key]=G;var aa=document.createElement("option");aa.setAttribute("value",
-G.key);mxUtils.write(aa,G.title);d.appendChild(aa)}var da=!1;D();b.appendChild(d);mxUtils.br(b);b.appendChild(f);b.appendChild(l);var ba=k,Y=function(qa,O){qa=F[d.value];null!=qa.format?(q.value=qa.format.width/100,y.value=qa.format.height/100,l.style.display="none",f.style.display=""):(f.style.display="none",l.style.display="");qa=parseFloat(q.value);if(isNaN(qa)||0>=qa)q.value=k.width/100;qa=parseFloat(y.value);if(isNaN(qa)||0>=qa)y.value=k.height/100;qa=new mxRectangle(0,0,Math.floor(100*parseFloat(q.value)),
+X.format.width&&k.height==X.format.height?(d.value=X.key,t.setAttribute("checked","checked"),t.defaultChecked=!0,t.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,qa=!0):k.width==X.format.height&&k.height==X.format.width&&(d.value=X.key,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,qa=E.checked=!0));qa?(f.style.display="",m.style.display="none"):(q.value=k.width/100,y.value=k.height/100,t.setAttribute("checked",
+"checked"),d.value="custom",f.style.display="none",m.style.display="")}}e="format-"+e;var t=document.createElement("input");t.setAttribute("name",e);t.setAttribute("type","radio");t.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",e);E.setAttribute("type","radio");E.setAttribute("value","landscape");var d=document.createElement("select");d.style.marginBottom="8px";d.style.borderRadius="4px";d.style.border="1px solid rgb(160, 160, 160)";d.style.width="206px";
+var f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";f.style.height="24px";t.style.marginRight="6px";f.appendChild(t);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));f.appendChild(e);E.style.marginLeft="10px";E.style.marginRight="6px";f.appendChild(E);var g=document.createElement("span");g.style.width="100px";mxUtils.write(g,mxResources.get("landscape"));f.appendChild(g);var m=document.createElement("div");m.style.marginLeft=
+"4px";m.style.width="210px";m.style.height="24px";var q=document.createElement("input");q.setAttribute("size","7");q.style.textAlign="right";m.appendChild(q);mxUtils.write(m," in x ");var y=document.createElement("input");y.setAttribute("size","7");y.style.textAlign="right";m.appendChild(y);mxUtils.write(m," in");f.style.display="none";m.style.display="none";for(var F={},C=PageSetupDialog.getFormats(),H=0;H<C.length;H++){var G=C[H];F[G.key]=G;var aa=document.createElement("option");aa.setAttribute("value",
+G.key);mxUtils.write(aa,G.title);d.appendChild(aa)}var da=!1;D();b.appendChild(d);mxUtils.br(b);b.appendChild(f);b.appendChild(m);var ba=k,Y=function(qa,O){qa=F[d.value];null!=qa.format?(q.value=qa.format.width/100,y.value=qa.format.height/100,m.style.display="none",f.style.display=""):(f.style.display="none",m.style.display="");qa=parseFloat(q.value);if(isNaN(qa)||0>=qa)q.value=k.width/100;qa=parseFloat(y.value);if(isNaN(qa)||0>=qa)y.value=k.height/100;qa=new mxRectangle(0,0,Math.floor(100*parseFloat(q.value)),
Math.floor(100*parseFloat(y.value)));"custom"!=d.value&&E.checked&&(qa=new mxRectangle(0,0,qa.height,qa.width));O&&da||qa.width==ba.width&&qa.height==ba.height||(ba=qa,null!=n&&n(ba))};mxEvent.addListener(e,"click",function(qa){t.checked=!0;Y(qa);mxEvent.consume(qa)});mxEvent.addListener(g,"click",function(qa){E.checked=!0;Y(qa);mxEvent.consume(qa)});mxEvent.addListener(q,"blur",Y);mxEvent.addListener(q,"click",Y);mxEvent.addListener(y,"blur",Y);mxEvent.addListener(y,"click",Y);mxEvent.addListener(E,
"change",Y);mxEvent.addListener(t,"change",Y);mxEvent.addListener(d,"change",function(qa){da="custom"==d.value;Y(qa,!0)});Y();return{set:function(qa){k=qa;D(null,null,!0)},get:function(){return ba},widthInput:q,heightInput:y}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(b,e,k,n,D,t,E,d,f,g,l,q){f=null!=f?f:!0;var y=document.createElement("table"),F=document.createElement("tbody");y.style.position="absolute";y.style.top="30px";y.style.left="20px";var C=document.createElement("tr");var H=document.createElement("td");H.style.textOverflow="ellipsis";H.style.textAlign="right";H.style.maxWidth="100px";H.style.fontSize="10pt";H.style.width="84px";mxUtils.write(H,(D||mxResources.get("filename"))+":");C.appendChild(H);var G=document.createElement("input");
+var FilenameDialog=function(b,e,k,n,D,t,E,d,f,g,m,q){f=null!=f?f:!0;var y=document.createElement("table"),F=document.createElement("tbody");y.style.position="absolute";y.style.top="30px";y.style.left="20px";var C=document.createElement("tr");var H=document.createElement("td");H.style.textOverflow="ellipsis";H.style.textAlign="right";H.style.maxWidth="100px";H.style.fontSize="10pt";H.style.width="84px";mxUtils.write(H,(D||mxResources.get("filename"))+":");C.appendChild(H);var G=document.createElement("input");
G.setAttribute("value",e||"");G.style.marginLeft="4px";G.style.width=null!=q?q+"px":"180px";var aa=mxUtils.button(k,function(){if(null==t||t(G.value))f&&b.hideDialog(),n(G.value)});aa.className="geBtn gePrimaryBtn";this.init=function(){if(null!=D||null==E)if(G.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?G.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var da=y.parentNode;if(null!=da){var ba=null;mxEvent.addListener(da,"dragleave",function(Y){null!=ba&&(ba.style.backgroundColor=
"",ba=null);Y.stopPropagation();Y.preventDefault()});mxEvent.addListener(da,"dragover",mxUtils.bind(this,function(Y){null==ba&&(!mxClient.IS_IE||10<document.documentMode)&&(ba=G,ba.style.backgroundColor="#ebf2f9");Y.stopPropagation();Y.preventDefault()}));mxEvent.addListener(da,"drop",mxUtils.bind(this,function(Y){null!=ba&&(ba.style.backgroundColor="",ba=null);0<=mxUtils.indexOf(Y.dataTransfer.types,"text/uri-list")&&(G.value=decodeURIComponent(Y.dataTransfer.getData("text/uri-list")),aa.click());
-Y.stopPropagation();Y.preventDefault()}))}}};H=document.createElement("td");H.style.whiteSpace="nowrap";H.appendChild(G);C.appendChild(H);if(null!=D||null==E)F.appendChild(C),null!=l&&(H.appendChild(FilenameDialog.createTypeHint(b,G,l)),null!=b.editor.diagramFileTypes&&(C=document.createElement("tr"),H=document.createElement("td"),H.style.textOverflow="ellipsis",H.style.textAlign="right",H.style.maxWidth="100px",H.style.fontSize="10pt",H.style.width="84px",mxUtils.write(H,mxResources.get("type")+
+Y.stopPropagation();Y.preventDefault()}))}}};H=document.createElement("td");H.style.whiteSpace="nowrap";H.appendChild(G);C.appendChild(H);if(null!=D||null==E)F.appendChild(C),null!=m&&(H.appendChild(FilenameDialog.createTypeHint(b,G,m)),null!=b.editor.diagramFileTypes&&(C=document.createElement("tr"),H=document.createElement("td"),H.style.textOverflow="ellipsis",H.style.textAlign="right",H.style.maxWidth="100px",H.style.fontSize="10pt",H.style.width="84px",mxUtils.write(H,mxResources.get("type")+
":"),C.appendChild(H),H=document.createElement("td"),H.style.whiteSpace="nowrap",C.appendChild(H),e=FilenameDialog.createFileTypes(b,G,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",H.appendChild(e),G.style.width=null!=q?q-40+"px":"190px",C.appendChild(H),F.appendChild(C)));null!=E&&(C=document.createElement("tr"),H=document.createElement("td"),H.colSpan=2,H.appendChild(E),C.appendChild(H),F.appendChild(C));C=document.createElement("tr");H=document.createElement("td");H.colSpan=
-2;H.style.paddingTop=null!=l?"12px":"20px";H.style.whiteSpace="nowrap";H.setAttribute("align","right");l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=g&&g()});l.className="geBtn";b.editor.cancelFirst&&H.appendChild(l);null!=d&&(q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),q.className="geBtn",H.appendChild(q));mxEvent.addListener(G,"keypress",function(da){13==da.keyCode&&aa.click()});H.appendChild(aa);b.editor.cancelFirst||H.appendChild(l);
+2;H.style.paddingTop=null!=m?"12px":"20px";H.style.whiteSpace="nowrap";H.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=g&&g()});m.className="geBtn";b.editor.cancelFirst&&H.appendChild(m);null!=d&&(q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),q.className="geBtn",H.appendChild(q));mxEvent.addListener(G,"keypress",function(da){13==da.keyCode&&aa.click()});H.appendChild(aa);b.editor.cancelFirst||H.appendChild(m);
C.appendChild(H);F.appendChild(C);y.appendChild(F);this.container=y};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createTypeHint=function(b,e,k){var n=document.createElement("img");n.style.backgroundPosition="center bottom";n.style.backgroundRepeat="no-repeat";n.style.margin="2px 0 0 4px";n.style.verticalAlign="top";n.style.cursor="pointer";n.style.height="16px";n.style.width="16px";mxUtils.setOpacity(n,70);var D=function(){n.setAttribute("src",Editor.helpImage);n.setAttribute("title",mxResources.get("help"));for(var t=0;t<k.length;t++)if(0<k[t].ext.length&&e.value.toLowerCase().substring(e.value.length-
k[t].ext.length-1)=="."+k[t].ext){n.setAttribute("title",mxResources.get(k[t].title));break}};mxEvent.addListener(e,"keyup",D);mxEvent.addListener(e,"change",D);mxEvent.addListener(n,"click",function(t){var E=n.getAttribute("title");n.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=E&&b.showError(null,E,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(t)});
@@ -2045,26 +2045,26 @@ document?(t=document.createEvent("HTMLEvents"),t.initEvent("change",!1,!0),e.dis
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph;if(null!=E.container&&!E.transparentBackground){if(E.pageVisible){var d=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var f=E.container.firstChild;null!=f&&f.nodeType!=mxConstants.NODETYPE_ELEMENT;)f=f.nextSibling;null!=f&&(this.backgroundPageShape=this.createBackgroundPageShape(d),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
this.backgroundPageShape.init(E.container),f.style.position="absolute",E.container.insertBefore(this.backgroundPageShape.node,f),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(g){E.dblClick(g)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(g){E.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(g))}),mxUtils.bind(this,function(g){null!=
E.tooltipHandler&&E.tooltipHandler.isHideOnHover()&&E.tooltipHandler.hide();E.isMouseDown&&!mxEvent.isConsumed(g)&&E.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(g))}),mxUtils.bind(this,function(g){E.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(g))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=d,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
-mxGraphView.prototype.validateBackgroundStyles=function(){var E=this.graph,d=null==E.background||E.background==mxConstants.NONE?E.defaultPageBackgroundColor:E.background,f=null!=d&&this.gridColor!=d.toLowerCase()?this.gridColor:"#ffffff",g="none",l="";if(E.isGridEnabled()||E.gridVisible){l=10;mxClient.IS_SVG?(g=unescape(encodeURIComponent(this.createSvgGrid(f))),g=window.btoa?btoa(g):Base64.encode(g,!0),g="url(data:image/svg+xml;base64,"+g+")",l=E.gridSize*this.scale*this.gridSteps):g="url("+this.gridImage+
-")";var q=f=0;null!=E.view.backgroundPageShape&&(q=this.getBackgroundPageBounds(),f=1+q.x,q=1+q.y);l=-Math.round(l-mxUtils.mod(this.translate.x*this.scale-f,l))+"px "+-Math.round(l-mxUtils.mod(this.translate.y*this.scale-q,l))+"px"}f=E.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);null!=E.view.backgroundPageShape?(E.view.backgroundPageShape.node.style.backgroundPosition=l,E.view.backgroundPageShape.node.style.backgroundImage=g,E.view.backgroundPageShape.node.style.backgroundColor=d,E.view.backgroundPageShape.node.style.borderColor=
-E.defaultPageBorderColor,E.container.className="geDiagramContainer geDiagramBackdrop",f.style.backgroundImage="none",f.style.backgroundColor=""):(E.container.className="geDiagramContainer",f.style.backgroundPosition=l,f.style.backgroundColor=d,f.style.backgroundImage=g)};mxGraphView.prototype.createSvgGrid=function(E){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var f=this.gridSteps*d,g=[],l=1;l<this.gridSteps;l++){var q=l*d;g.push("M 0 "+q+" L "+f+" "+q+" M "+q+" 0 L "+q+
+mxGraphView.prototype.validateBackgroundStyles=function(){var E=this.graph,d=null==E.background||E.background==mxConstants.NONE?E.defaultPageBackgroundColor:E.background,f=null!=d&&this.gridColor!=d.toLowerCase()?this.gridColor:"#ffffff",g="none",m="";if(E.isGridEnabled()||E.gridVisible){m=10;mxClient.IS_SVG?(g=unescape(encodeURIComponent(this.createSvgGrid(f))),g=window.btoa?btoa(g):Base64.encode(g,!0),g="url(data:image/svg+xml;base64,"+g+")",m=E.gridSize*this.scale*this.gridSteps):g="url("+this.gridImage+
+")";var q=f=0;null!=E.view.backgroundPageShape&&(q=this.getBackgroundPageBounds(),f=1+q.x,q=1+q.y);m=-Math.round(m-mxUtils.mod(this.translate.x*this.scale-f,m))+"px "+-Math.round(m-mxUtils.mod(this.translate.y*this.scale-q,m))+"px"}f=E.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);null!=E.view.backgroundPageShape?(E.view.backgroundPageShape.node.style.backgroundPosition=m,E.view.backgroundPageShape.node.style.backgroundImage=g,E.view.backgroundPageShape.node.style.backgroundColor=d,E.view.backgroundPageShape.node.style.borderColor=
+E.defaultPageBorderColor,E.container.className="geDiagramContainer geDiagramBackdrop",f.style.backgroundImage="none",f.style.backgroundColor=""):(E.container.className="geDiagramContainer",f.style.backgroundPosition=m,f.style.backgroundColor=d,f.style.backgroundImage=g)};mxGraphView.prototype.createSvgGrid=function(E){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var f=this.gridSteps*d,g=[],m=1;m<this.gridSteps;m++){var q=m*d;g.push("M 0 "+q+" L "+f+" "+q+" M "+q+" 0 L "+q+
" "+f)}return'<svg width="'+f+'" height="'+f+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+f+'" height="'+f+'" patternUnits="userSpaceOnUse"><path d="'+g.join(" ")+'" fill="none" stroke="'+E+'" opacity="0.2" stroke-width="1"/><path d="M '+f+" 0 L 0 0 0 "+f+'" fill="none" stroke="'+E+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,d){b.apply(this,arguments);
-if(null!=this.shiftPreview1){var f=this.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);var g=this.gridSize*this.view.scale*this.view.gridSteps;g=-Math.round(g-mxUtils.mod(this.view.translate.x*this.view.scale+E,g))+"px "+-Math.round(g-mxUtils.mod(this.view.translate.y*this.view.scale+d,g))+"px";f.style.backgroundPosition=g}};mxGraph.prototype.updatePageBreaks=function(E,d,f){var g=this.view.scale,l=this.view.translate,q=this.pageFormat,y=g*this.pageScale,F=this.view.getBackgroundPageBounds();
-d=F.width;f=F.height;var C=new mxRectangle(g*l.x,g*l.y,q.width*y,q.height*y),H=(E=E&&Math.min(C.width,C.height)>this.minPageBreakDist)?Math.ceil(f/C.height)-1:0,G=E?Math.ceil(d/C.width)-1:0,aa=F.x+d,da=F.y+f;null==this.horizontalPageBreaks&&0<H&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(ba){if(null!=ba){for(var Y=ba==this.horizontalPageBreaks?H:G,qa=0;qa<=Y;qa++){var O=ba==this.horizontalPageBreaks?[new mxPoint(Math.round(F.x),
+if(null!=this.shiftPreview1){var f=this.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);var g=this.gridSize*this.view.scale*this.view.gridSteps;g=-Math.round(g-mxUtils.mod(this.view.translate.x*this.view.scale+E,g))+"px "+-Math.round(g-mxUtils.mod(this.view.translate.y*this.view.scale+d,g))+"px";f.style.backgroundPosition=g}};mxGraph.prototype.updatePageBreaks=function(E,d,f){var g=this.view.scale,m=this.view.translate,q=this.pageFormat,y=g*this.pageScale,F=this.view.getBackgroundPageBounds();
+d=F.width;f=F.height;var C=new mxRectangle(g*m.x,g*m.y,q.width*y,q.height*y),H=(E=E&&Math.min(C.width,C.height)>this.minPageBreakDist)?Math.ceil(f/C.height)-1:0,G=E?Math.ceil(d/C.width)-1:0,aa=F.x+d,da=F.y+f;null==this.horizontalPageBreaks&&0<H&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(ba){if(null!=ba){for(var Y=ba==this.horizontalPageBreaks?H:G,qa=0;qa<=Y;qa++){var O=ba==this.horizontalPageBreaks?[new mxPoint(Math.round(F.x),
Math.round(F.y+(qa+1)*C.height)),new mxPoint(Math.round(aa),Math.round(F.y+(qa+1)*C.height))]:[new mxPoint(Math.round(F.x+(qa+1)*C.width),Math.round(F.y)),new mxPoint(Math.round(F.x+(qa+1)*C.width),Math.round(da))];null!=ba[qa]?(ba[qa].points=O,ba[qa].redraw()):(O=new mxPolyline(O,this.pageBreakColor),O.dialect=this.dialect,O.isDashed=this.pageBreakDashed,O.pointerEvents=!1,O.init(this.view.backgroundPane),O.redraw(),ba[qa]=O)}for(qa=Y;qa<ba.length;qa++)ba[qa].destroy();ba.splice(Y,ba.length-Y)}});
-E(this.horizontalPageBreaks);E(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,d,f){for(var g=0;g<d.length;g++){if(this.graph.isTableCell(d[g])||this.graph.isTableRow(d[g]))return!1;if(this.graph.getModel().isVertex(d[g])){var l=this.graph.getCellGeometry(d[g]);if(null!=l&&l.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
+E(this.horizontalPageBreaks);E(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,d,f){for(var g=0;g<d.length;g++){if(this.graph.isTableCell(d[g])||this.graph.isTableRow(d[g]))return!1;if(this.graph.getModel().isVertex(d[g])){var m=this.graph.getCellGeometry(d[g]);if(null!=m&&m.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
function(){var E=k.apply(this,arguments);E.intersects=mxUtils.bind(this,function(d,f){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),d=0<E.width?E.x/this.scale-this.translate.x:0,f=0<E.height?E.y/this.scale-this.translate.y:0,g=this.graph.pageFormat,
-l=this.graph.pageScale,q=g.width*l;g=g.height*l;l=Math.floor(Math.min(0,d)/q);var y=Math.floor(Math.min(0,f)/g);return new mxRectangle(this.scale*(this.translate.x+l*q),this.scale*(this.translate.y+y*g),this.scale*(Math.ceil(Math.max(1,d+E.width/this.scale)/q)-l)*q,this.scale*(Math.ceil(Math.max(1,f+E.height/this.scale)/g)-y)*g)};var n=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,d){n.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=E+"px",this.view.backgroundPageShape.node.style.marginTop=d+"px")};var D=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(E,d,f,g,l,q){var y=D.apply(this,arguments);null==q||q||mxEvent.addListener(y,"mousedown",function(F){mxEvent.consume(F)});return y};var t=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(E,d,f){var g=this.graph.model.getParent(E);if(d){var l=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);l=!this.graph.model.isEdge(g)&&!this.graph.isSiblingSelected(E)&&(null!=l&&l.relative||!this.graph.isContainer(g)||this.graph.isPart(E))}else if(l=t.apply(this,arguments),this.graph.isTableCell(E)||this.graph.isTableRow(E))l=g,this.graph.isTable(l)||(l=this.graph.model.getParent(l)),l=!this.graph.selectionCellsHandler.isHandled(l)||this.graph.isCellSelected(l)&&this.graph.isToggleEvent(f.getEvent())||
-this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(f.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(g);return l};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var d=this.graph.getModel(),f=d.getParent(E),g=this.graph.view.getState(f),l=this.graph.isCellSelected(E);null!=g&&(d.isVertex(f)||d.isEdge(f));){var q=this.graph.isCellSelected(f);l=l||q;if(q||!l&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=f;f=d.getParent(f)}return E}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var n=this.editor.graph;n.lightbox=k;var D=n.getGraphBounds;n.getGraphBounds=function(){var I=D.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var Q=this.view.translate,R=this.view.scale;I=mxRectangle.fromRectangle(I);I.add(new mxRectangle((Q.x+V.x)*R,(Q.y+V.y)*R,V.width*R,V.height*R))}return I};n.useCssTransforms&&(this.lazyZoomDelay=
+m=this.graph.pageScale,q=g.width*m;g=g.height*m;m=Math.floor(Math.min(0,d)/q);var y=Math.floor(Math.min(0,f)/g);return new mxRectangle(this.scale*(this.translate.x+m*q),this.scale*(this.translate.y+y*g),this.scale*(Math.ceil(Math.max(1,d+E.width/this.scale)/q)-m)*q,this.scale*(Math.ceil(Math.max(1,f+E.height/this.scale)/g)-y)*g)};var n=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,d){n.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=E+"px",this.view.backgroundPageShape.node.style.marginTop=d+"px")};var D=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(E,d,f,g,m,q){var y=D.apply(this,arguments);null==q||q||mxEvent.addListener(y,"mousedown",function(F){mxEvent.consume(F)});return y};var t=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
+function(E,d,f){var g=this.graph.model.getParent(E);if(d){var m=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);m=!this.graph.model.isEdge(g)&&!this.graph.isSiblingSelected(E)&&(null!=m&&m.relative||!this.graph.isContainer(g)||this.graph.isPart(E))}else if(m=t.apply(this,arguments),this.graph.isTableCell(E)||this.graph.isTableRow(E))m=g,this.graph.isTable(m)||(m=this.graph.model.getParent(m)),m=!this.graph.selectionCellsHandler.isHandled(m)||this.graph.isCellSelected(m)&&this.graph.isToggleEvent(f.getEvent())||
+this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(f.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(g);return m};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var d=this.graph.getModel(),f=d.getParent(E),g=this.graph.view.getState(f),m=this.graph.isCellSelected(E);null!=g&&(d.isVertex(f)||d.isEdge(f));){var q=this.graph.isCellSelected(f);m=m||q;if(q||!m&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=f;f=d.getParent(f)}return E}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var n=this.editor.graph;n.lightbox=k;var D=n.getGraphBounds;n.getGraphBounds=function(){var I=D.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var Q=this.view.translate,R=this.view.scale;I=mxRectangle.fromRectangle(I);I.add(new mxRectangle((Q.x+V.x)*R,(Q.y+V.y)*R,V.width*R,V.height*R))}return I};n.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.selectionStateListener=mxUtils.bind(this,function(I,V){this.clearSelectionState()});n.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
n.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);n.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);n.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);n.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,n.isEnabled=function(){return!1},n.panningHandler.isForcePanningEvent=function(I){return!mxEvent.isPopupTrigger(I.getEvent())});this.actions=new Actions(this);this.menus=
this.createMenus();if(!n.standalone){var t="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),E="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
d="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" ");this.setDefaultStyle=function(I){try{var V=n.getCellStyle(I,!1),Q=[],R=[],fa;for(fa in V)Q.push(V[fa]),R.push(fa);n.getModel().isEdge(I)?n.currentEdgeStyle={}:n.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",R,"values",Q,"cells",[I]))}catch(la){this.handleError(la)}};this.clearDefaultStyle=function(){n.currentEdgeStyle=mxUtils.clone(n.defaultEdgeStyle);
-n.currentVertexStyle=mxUtils.clone(n.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var f=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<f.length;e++)0>mxUtils.indexOf(t,f[e])&&t.push(f[e]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),l=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],
-["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<l.length;e++)for(k=0;k<l[e].length;k++)t.push(l[e][k]);for(e=0;e<E.length;e++)0>mxUtils.indexOf(t,E[e])&&t.push(E[e]);var q=function(I,V,Q,R,fa,la,ra){R=null!=R?R:n.currentVertexStyle;fa=null!=fa?fa:n.currentEdgeStyle;la=null!=la?la:!0;Q=null!=Q?Q:n.getModel();if(ra){ra=[];for(var u=0;u<I.length;u++)ra=ra.concat(Q.getDescendants(I[u]));I=ra}Q.beginUpdate();try{for(u=0;u<I.length;u++){var J=I[u];if(V)var N=["fontSize",
-"fontFamily","fontColor"];else{var W=Q.getStyle(J),S=null!=W?W.split(";"):[];N=t.slice();for(var P=0;P<S.length;P++){var Z=S[P],oa=Z.indexOf("=");if(0<=oa){var va=Z.substring(0,oa),Aa=mxUtils.indexOf(N,va);0<=Aa&&N.splice(Aa,1);for(ra=0;ra<l.length;ra++){var sa=l[ra];if(0<=mxUtils.indexOf(sa,va))for(var Ba=0;Ba<sa.length;Ba++){var ta=mxUtils.indexOf(N,sa[Ba]);0<=ta&&N.splice(ta,1)}}}}}var Na=Q.isEdge(J);ra=Na?fa:R;var Ca=Q.getStyle(J);for(P=0;P<N.length;P++){va=N[P];var Qa=ra[va];null!=Qa&&"edgeStyle"!=
+n.currentVertexStyle=mxUtils.clone(n.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var f=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<f.length;e++)0>mxUtils.indexOf(t,f[e])&&t.push(f[e]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),m=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],
+["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<m.length;e++)for(k=0;k<m[e].length;k++)t.push(m[e][k]);for(e=0;e<E.length;e++)0>mxUtils.indexOf(t,E[e])&&t.push(E[e]);var q=function(I,V,Q,R,fa,la,ra){R=null!=R?R:n.currentVertexStyle;fa=null!=fa?fa:n.currentEdgeStyle;la=null!=la?la:!0;Q=null!=Q?Q:n.getModel();if(ra){ra=[];for(var u=0;u<I.length;u++)ra=ra.concat(Q.getDescendants(I[u]));I=ra}Q.beginUpdate();try{for(u=0;u<I.length;u++){var J=I[u];if(V)var N=["fontSize",
+"fontFamily","fontColor"];else{var W=Q.getStyle(J),S=null!=W?W.split(";"):[];N=t.slice();for(var P=0;P<S.length;P++){var Z=S[P],oa=Z.indexOf("=");if(0<=oa){var va=Z.substring(0,oa),Aa=mxUtils.indexOf(N,va);0<=Aa&&N.splice(Aa,1);for(ra=0;ra<m.length;ra++){var sa=m[ra];if(0<=mxUtils.indexOf(sa,va))for(var Ba=0;Ba<sa.length;Ba++){var ta=mxUtils.indexOf(N,sa[Ba]);0<=ta&&N.splice(ta,1)}}}}}var Na=Q.isEdge(J);ra=Na?fa:R;var Ca=Q.getStyle(J);for(P=0;P<N.length;P++){va=N[P];var Qa=ra[va];null!=Qa&&"edgeStyle"!=
va&&("shape"!=va||Na)&&(!Na||la||0>mxUtils.indexOf(d,va))&&(Ca=mxUtils.setStyle(Ca,va,Qa))}Editor.simpleLabels&&(Ca=mxUtils.setStyle(mxUtils.setStyle(Ca,"html",null),"whiteSpace",null));Q.setStyle(J,Ca)}}finally{Q.endUpdate()}return I};n.addListener("cellsInserted",function(I,V){q(V.getProperty("cells"),null,null,null,null,!0,!0)});n.addListener("textInserted",function(I,V){q(V.getProperty("cells"),!0)});this.insertHandler=q;this.createDivs();this.createUi();this.refresh();var y=mxUtils.bind(this,
function(I){null==I&&(I=window.event);return n.isEditing()||null!=I&&this.isSelectionAllowed(I)});this.container==document.body&&(this.menubarContainer.onselectstart=y,this.menubarContainer.onmousedown=y,this.toolbarContainer.onselectstart=y,this.toolbarContainer.onmousedown=y,this.diagramContainer.onselectstart=y,this.diagramContainer.onmousedown=y,this.sidebarContainer.onselectstart=y,this.sidebarContainer.onmousedown=y,this.formatContainer.onselectstart=y,this.formatContainer.onmousedown=y,this.footerContainer.onselectstart=
y,this.footerContainer.onmousedown=y,null!=this.tabContainer&&(this.tabContainer.onselectstart=y));!this.editor.chromeless||this.editor.editable?(e=function(I){if(null!=I){var V=mxEvent.getSource(I);if("A"==V.nodeName)for(;null!=V;){if("geHint"==V.className)return!0;V=V.parentNode}}return y(I)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=e):n.panningHandler.usePopupTrigger=
@@ -2094,23 +2094,23 @@ EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"
arguments);k.updateActionStates()};b.editLink=k.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,e=b.getSelectionCells(),k=this.initSelectionState(),n=!0,D=0;D<e.length;D++){var t=b.getCurrentCellStyle(e[D]);"0"!=mxUtils.getValue(t,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(k,e[D],e,n),n=!1)}this.updateSelectionStateForTableCells(k);return k};
EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,rounded:!0,autoSize:!1,image:!0,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};
-EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,n=k.getParent(e[0]),D=k.getParent(n),t=n.getIndex(e[0]),E=D.getIndex(n),d=null,f=1,g=1,l=0,q=E<D.getChildCount()-1?k.getChildAt(k.getChildAt(D,E+1),t):null;l<e.length-1;){var y=e[++l];null==q||q!=y||null!=d&&f!=d||(d=f,f=0,g++,n=k.getParent(q),q=E+g<D.getChildCount()?k.getChildAt(k.getChildAt(D,E+g),t):null);var F=this.editor.graph.view.getState(y);
-if(y==k.getChildAt(n,t+f)&&null!=F&&1==mxUtils.getValue(F.style,"colspan",1)&&1==mxUtils.getValue(F.style,"rowspan",1))f++;else break}l==g*f-1&&(b.mergeCell=e[0],b.colspan=f,b.rowspan=g)}};
+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,n=k.getParent(e[0]),D=k.getParent(n),t=n.getIndex(e[0]),E=D.getIndex(n),d=null,f=1,g=1,m=0,q=E<D.getChildCount()-1?k.getChildAt(k.getChildAt(D,E+1),t):null;m<e.length-1;){var y=e[++m];null==q||q!=y||null!=d&&f!=d||(d=f,f=0,g++,n=k.getParent(q),q=E+g<D.getChildCount()?k.getChildAt(k.getChildAt(D,E+g),t):null);var F=this.editor.graph.view.getState(y);
+if(y==k.getChildAt(n,t+f)&&null!=F&&1==mxUtils.getValue(F.style,"colspan",1)&&1==mxUtils.getValue(F.style,"rowspan",1))f++;else break}m==g*f-1&&(b.mergeCell=e[0],b.colspan=f,b.rowspan=g)}};
EditorUi.prototype.updateSelectionStateForCell=function(b,e,k,n){k=this.editor.graph;b.cells.push(e);if(k.getModel().isVertex(e)){b.connections=0<k.model.getEdgeCount(e);b.unlocked=b.unlocked&&!k.isCellLocked(e);b.resizable=b.resizable&&k.isCellResizable(e);b.rotatable=b.rotatable&&k.isCellRotatable(e);b.movable=b.movable&&k.isCellMovable(e)&&!k.isTableRow(e)&&!k.isTableCell(e);b.swimlane=b.swimlane||k.isSwimlane(e);b.table=b.table||k.isTable(e);b.cell=b.cell||k.isTableCell(e);b.row=b.row||k.isTableRow(e);
b.vertices.push(e);var D=k.getCellGeometry(e);if(null!=D&&(0<D.width?null==b.width?b.width=D.width:b.width!=D.width&&(b.width=""):b.containsLabel=!0,0<D.height?null==b.height?b.height=D.height:b.height!=D.height&&(b.height=""):b.containsLabel=!0,!D.relative||null!=D.offset)){var t=D.relative?D.offset.x:D.x;D=D.relative?D.offset.y:D.y;null==b.x?b.x=t:b.x!=t&&(b.x="");null==b.y?b.y=D:b.y!=D&&(b.y="")}}else k.getModel().isEdge(e)&&(b.edges.push(e),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
!1);e=k.view.getState(e);null!=e&&(b.autoSize=b.autoSize||k.isAutoSizeState(e),b.glass=b.glass&&k.isGlassState(e),b.rounded=b.rounded&&k.isRoundedState(e),b.lineJumps=b.lineJumps&&k.isLineJumpState(e),b.image=b.image&&k.isImageState(e),b.shadow=b.shadow&&k.isShadowState(e),b.fill=b.fill&&k.isFillState(e),b.stroke=b.stroke&&k.isStrokeState(e),t=mxUtils.getValue(e.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==t,k.mergeStyle(e.style,b.style,n))};
EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(f,g){"mouseDown"==g.getProperty("eventName")&&e.hideShapePicker()}));var k=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",k);b.addListener(mxEvent.ESCAPE,k);b.view.addListener(mxEvent.SCALE,k);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,k);b.getSelectionModel().addListener(mxEvent.CHANGE,k);var n=b.popupMenuHandler.isMenuShowing;
-b.popupMenuHandler.isMenuShowing=function(){return n.apply(this,arguments)||null!=e.shapePicker};var D=b.dblClick;b.dblClick=function(f,g){if(this.isEnabled())if(null!=g||null==e.sidebar||mxEvent.isShiftDown(f)||b.isCellLocked(b.getDefaultParent()))D.apply(this,arguments);else{var l=mxUtils.convertPoint(this.container,mxEvent.getClientX(f),mxEvent.getClientY(f));mxEvent.consume(f);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(l.x,l.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-k);var t=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();t.apply(this,arguments)};var E=this.hoverIcons.execute;this.hoverIcons.execute=function(f,g,l){var q=l.getEvent();this.graph.isCloneEvent(q)||mxEvent.isShiftDown(q)?E.apply(this,arguments):this.graph.connectVertex(f.cell,g,this.graph.defaultEdgeLength,q,null,null,mxUtils.bind(this,function(y,F,C){var H=b.getCompositeParent(f.cell);y=b.getCellGeometry(H);for(l.consume();null!=H&&b.model.isVertex(H)&&null!=y&&y.relative;)cell=
-H,H=b.model.getParent(cell),y=b.getCellGeometry(H);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(l.getGraphX(),l.getGraphY(),H,mxUtils.bind(this,function(G){C(G);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(G))}),g)}),30)}),mxUtils.bind(this,function(y){this.graph.selectCellsForConnectVertex(y,q,this)}))};var d=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(f,g){null!=d&&window.clearTimeout(d);d=window.setTimeout(mxUtils.bind(this,function(){var l=
-g.getProperty("arrow"),q=g.getProperty("direction"),y=g.getProperty("event");l=l.getBoundingClientRect();var F=mxUtils.getOffset(b.container),C=b.container.scrollLeft+l.x-F.x;F=b.container.scrollTop+l.y-F.y;var H=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),G=e.showShapePicker(C,F,H,mxUtils.bind(this,function(aa){null!=aa&&b.connectVertex(H,q,b.defaultEdgeLength,y,!0,!0,function(da,ba,Y){Y(aa);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(aa))},
-function(da){b.selectCellsForConnectVertex(da)},y,this.hoverIcons)}),q,!0);this.centerShapePicker(G,l,C,F,q);mxUtils.setOpacity(G,30);mxEvent.addListener(G,"mouseenter",function(){mxUtils.setOpacity(G,100)});mxEvent.addListener(G,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(f,g){null!=d&&window.clearTimeout(d)}))}};
+b.popupMenuHandler.isMenuShowing=function(){return n.apply(this,arguments)||null!=e.shapePicker};var D=b.dblClick;b.dblClick=function(f,g){if(this.isEnabled())if(null!=g||null==e.sidebar||mxEvent.isShiftDown(f)||b.isCellLocked(b.getDefaultParent()))D.apply(this,arguments);else{var m=mxUtils.convertPoint(this.container,mxEvent.getClientX(f),mxEvent.getClientY(f));mxEvent.consume(f);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(m.x,m.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
+k);var t=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();t.apply(this,arguments)};var E=this.hoverIcons.execute;this.hoverIcons.execute=function(f,g,m){var q=m.getEvent();this.graph.isCloneEvent(q)||mxEvent.isShiftDown(q)?E.apply(this,arguments):this.graph.connectVertex(f.cell,g,this.graph.defaultEdgeLength,q,null,null,mxUtils.bind(this,function(y,F,C){var H=b.getCompositeParent(f.cell);y=b.getCellGeometry(H);for(m.consume();null!=H&&b.model.isVertex(H)&&null!=y&&y.relative;)cell=
+H,H=b.model.getParent(cell),y=b.getCellGeometry(H);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(m.getGraphX(),m.getGraphY(),H,mxUtils.bind(this,function(G){C(G);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(G))}),g)}),30)}),mxUtils.bind(this,function(y){this.graph.selectCellsForConnectVertex(y,q,this)}))};var d=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(f,g){null!=d&&window.clearTimeout(d);d=window.setTimeout(mxUtils.bind(this,function(){var m=
+g.getProperty("arrow"),q=g.getProperty("direction"),y=g.getProperty("event");m=m.getBoundingClientRect();var F=mxUtils.getOffset(b.container),C=b.container.scrollLeft+m.x-F.x;F=b.container.scrollTop+m.y-F.y;var H=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),G=e.showShapePicker(C,F,H,mxUtils.bind(this,function(aa){null!=aa&&b.connectVertex(H,q,b.defaultEdgeLength,y,!0,!0,function(da,ba,Y){Y(aa);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(aa))},
+function(da){b.selectCellsForConnectVertex(da)},y,this.hoverIcons)}),q,!0);this.centerShapePicker(G,m,C,F,q);mxUtils.setOpacity(G,30);mxEvent.addListener(G,"mouseenter",function(){mxUtils.setOpacity(G,100)});mxEvent.addListener(G,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(f,g){null!=d&&window.clearTimeout(d)}))}};
EditorUi.prototype.centerShapePicker=function(b,e,k,n,D){if(D==mxConstants.DIRECTION_EAST||D==mxConstants.DIRECTION_WEST)b.style.width="40px";var t=b.getBoundingClientRect();D==mxConstants.DIRECTION_NORTH?(k-=t.width/2-10,n-=t.height+6):D==mxConstants.DIRECTION_SOUTH?(k-=t.width/2-10,n+=e.height+6):D==mxConstants.DIRECTION_WEST?(k-=t.width+6,n-=t.height/2-10):D==mxConstants.DIRECTION_EAST&&(k+=e.width+6,n-=t.height/2-10);b.style.left=k+"px";b.style.top=n+"px"};
EditorUi.prototype.showShapePicker=function(b,e,k,n,D,t){b=this.createShapePicker(b,e,k,n,D,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(k,t),t);null!=b&&(null==this.hoverIcons||t||this.hoverIcons.reset(),t=this.editor.graph,t.popupMenuHandler.hideMenu(),t.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=n,this.shapePicker=b);return b};
-EditorUi.prototype.createShapePicker=function(b,e,k,n,D,t,E,d){var f=null;if(null!=E&&0<E.length){var g=this,l=this.editor.graph;f=document.createElement("div");D=l.view.getState(k);var q=null==k||null!=D&&l.isTransparentState(D)?null:l.copyStyle(k);k=6>E.length?35*E.length:140;f.className="geToolbarContainer geSidebarContainer";f.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
-mxPopupMenu.prototype.zIndex+1+";";d||mxUtils.setPrefixedStyle(f.style,"transform","translate(-22px,-22px)");null!=l.background&&l.background!=mxConstants.NONE&&(f.style.backgroundColor=l.background);l.container.appendChild(f);k=mxUtils.bind(this,function(y){var F=document.createElement("a");F.className="geItem";F.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";f.appendChild(F);null!=q&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(q,[y]):g.insertHandler([y],""!=y.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([y],25,25,F,null,!0,!1,y.geometry.width,y.geometry.height);mxEvent.addListener(F,"click",function(){var C=l.cloneCell(y);if(null!=n)n(C);else{C.geometry.x=l.snap(Math.round(b/l.view.scale)-l.view.translate.x-y.geometry.width/2);C.geometry.y=l.snap(Math.round(e/l.view.scale)-l.view.translate.y-y.geometry.height/2);l.model.beginUpdate();try{l.addCell(C)}finally{l.model.endUpdate()}l.setSelectionCell(C);
-l.scrollCellToVisible(C);l.startEditingAtCell(C);null!=g.hoverIcons&&g.hoverIcons.update(l.view.getState(C))}null!=t&&t()})});for(D=0;D<(d?Math.min(E.length,4):E.length);D++)k(E[D]);E=f.offsetTop+f.clientHeight-(l.container.scrollTop+l.container.offsetHeight);0<E&&(f.style.top=Math.max(l.container.scrollTop+22,e-E)+"px");E=f.offsetLeft+f.clientWidth-(l.container.scrollLeft+l.container.offsetWidth);0<E&&(f.style.left=Math.max(l.container.scrollLeft+22,b-E)+"px")}return f};
+EditorUi.prototype.createShapePicker=function(b,e,k,n,D,t,E,d){var f=null;if(null!=E&&0<E.length){var g=this,m=this.editor.graph;f=document.createElement("div");D=m.view.getState(k);var q=null==k||null!=D&&m.isTransparentState(D)?null:m.copyStyle(k);k=6>E.length?35*E.length:140;f.className="geToolbarContainer geSidebarContainer";f.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
+mxPopupMenu.prototype.zIndex+1+";";d||mxUtils.setPrefixedStyle(f.style,"transform","translate(-22px,-22px)");null!=m.background&&m.background!=mxConstants.NONE&&(f.style.backgroundColor=m.background);m.container.appendChild(f);k=mxUtils.bind(this,function(y){var F=document.createElement("a");F.className="geItem";F.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";f.appendChild(F);null!=q&&"1"!=urlParams.sketch?
+this.sidebar.graph.pasteStyle(q,[y]):g.insertHandler([y],""!=y.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([y],25,25,F,null,!0,!1,y.geometry.width,y.geometry.height);mxEvent.addListener(F,"click",function(){var C=m.cloneCell(y);if(null!=n)n(C);else{C.geometry.x=m.snap(Math.round(b/m.view.scale)-m.view.translate.x-y.geometry.width/2);C.geometry.y=m.snap(Math.round(e/m.view.scale)-m.view.translate.y-y.geometry.height/2);m.model.beginUpdate();try{m.addCell(C)}finally{m.model.endUpdate()}m.setSelectionCell(C);
+m.scrollCellToVisible(C);m.startEditingAtCell(C);null!=g.hoverIcons&&g.hoverIcons.update(m.view.getState(C))}null!=t&&t()})});for(D=0;D<(d?Math.min(E.length,4):E.length);D++)k(E[D]);E=f.offsetTop+f.clientHeight-(m.container.scrollTop+m.container.offsetHeight);0<E&&(f.style.top=Math.max(m.container.scrollTop+22,e-E)+"px");E=f.offsetLeft+f.clientWidth-(m.container.scrollLeft+m.container.offsetWidth);0<E&&(f.style.left=Math.max(m.container.scrollLeft+22,b-E)+"px")}return f};
EditorUi.prototype.getCellsForShapePicker=function(b,e){e=mxUtils.bind(this,function(k,n,D,t){return this.editor.graph.createVertex(null,null,t||"",0,0,n||120,D||60,k,!1)});return[null!=b?this.editor.graph.cloneCell(b):e("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),e("whiteSpace=wrap;html=1;"),e("ellipse;whiteSpace=wrap;html=1;"),e("rhombus;whiteSpace=wrap;html=1;",80,80),e("rounded=1;whiteSpace=wrap;html=1;"),e("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
e("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),e("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),e("triangle;whiteSpace=wrap;html=1;",60,80),e("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),e("shape=tape;whiteSpace=wrap;html=1;",120,100),e("ellipse;shape=cloud;whiteSpace=wrap;html=1;",
120,80),e("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),e("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};EditorUi.prototype.hideShapePicker=function(b){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,b||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};
@@ -2123,8 +2123,8 @@ EditorUi.prototype.getCssClassForMarker=function(b,e,k,n){return"flexArrow"==e?n
k==mxConstants.ARROW_DIAMOND_THIN?"1"==n?"geSprite geSprite-"+b+"thindiamond":"geSprite geSprite-"+b+"thindiamondtrans":"openAsync"==k?"geSprite geSprite-"+b+"openasync":"dash"==k?"geSprite geSprite-"+b+"dash":"cross"==k?"geSprite geSprite-"+b+"cross":"async"==k?"1"==n?"geSprite geSprite-"+b+"async":"geSprite geSprite-"+b+"asynctrans":"circle"==k||"circlePlus"==k?"1"==n||"circle"==k?"geSprite geSprite-"+b+"circle":"geSprite geSprite-"+b+"circleplus":"ERone"==k?"geSprite geSprite-"+b+"erone":"ERmandOne"==
k?"geSprite geSprite-"+b+"eronetoone":"ERmany"==k?"geSprite geSprite-"+b+"ermany":"ERoneToMany"==k?"geSprite geSprite-"+b+"eronetomany":"ERzeroToOne"==k?"geSprite geSprite-"+b+"eroneopt":"ERzeroToMany"==k?"geSprite geSprite-"+b+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,e=this.actions.get("paste"),k=this.actions.get("pasteHere");e.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));k.setEnabled(e.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(t){t.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(t){var E=null;if(t.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{E=E||t.getSelectionCells();E=t.getExportableCells(t.model.getTopmostCells(E));for(var d={},f=t.createCellLookup(E),g=t.cloneCells(E,null,d),l=new mxGraphModel,q=l.getChildAt(l.getRoot(),
-0),y=0;y<g.length;y++){l.add(q,g[y]);var F=t.view.getState(E[y]);if(null!=F){var C=t.getCellGeometry(g[y]);null!=C&&C.relative&&!l.isEdge(E[y])&&null==f[mxObjectIdentity.get(l.getParent(E[y]))]&&(C.offset=null,C.relative=!1,C.x=F.x/F.view.scale-F.view.translate.x,C.y=F.y/F.view.scale-F.view.translate.y)}}t.updateCustomLinks(t.createCellMapping(d,f),g);mxClipboard.insertCount=1;mxClipboard.setCells(g)}b.updatePasteActionStates();return E};var k=mxClipboard.paste;mxClipboard.paste=function(t){var E=
+EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(t){t.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(t){var E=null;if(t.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{E=E||t.getSelectionCells();E=t.getExportableCells(t.model.getTopmostCells(E));for(var d={},f=t.createCellLookup(E),g=t.cloneCells(E,null,d),m=new mxGraphModel,q=m.getChildAt(m.getRoot(),
+0),y=0;y<g.length;y++){m.add(q,g[y]);var F=t.view.getState(E[y]);if(null!=F){var C=t.getCellGeometry(g[y]);null!=C&&C.relative&&!m.isEdge(E[y])&&null==f[mxObjectIdentity.get(m.getParent(E[y]))]&&(C.offset=null,C.relative=!1,C.x=F.x/F.view.scale-F.view.translate.x,C.y=F.y/F.view.scale-F.view.translate.y)}}t.updateCustomLinks(t.createCellMapping(d,f),g);mxClipboard.insertCount=1;mxClipboard.setCells(g)}b.updatePasteActionStates();return E};var k=mxClipboard.paste;mxClipboard.paste=function(t){var E=
null;t.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):E=k.apply(this,arguments);b.updatePasteActionStates();return E};var n=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){n.apply(this,arguments);b.updatePasteActionStates()};var D=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(t,E){D.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var Q=this.graph.getPageLayout(),R=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+Q.x*R.width),this.scale*(this.translate.y+Q.y*R.height),this.scale*Q.width*R.width,
@@ -2136,8 +2136,8 @@ this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxS
"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var t=mxUtils.bind(this,function(){var Q=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=Q?parseInt(Q["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",t);t();var E=0;t=mxUtils.bind(this,function(Q,R,fa){E++;
var la=document.createElement("span");la.style.paddingLeft="8px";la.style.paddingRight="8px";la.style.cursor="pointer";mxEvent.addListener(la,"click",Q);null!=fa&&la.setAttribute("title",fa);Q=document.createElement("img");Q.setAttribute("border","0");Q.setAttribute("src",R);Q.style.width="36px";Q.style.filter="invert(100%)";la.appendChild(Q);this.chromelessToolbar.appendChild(la);return la});null!=D.backBtn&&t(mxUtils.bind(this,function(Q){window.location.href=D.backBtn.url;mxEvent.consume(Q)}),
Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var d=t(mxUtils.bind(this,function(Q){this.actions.get("previousPage").funct();mxEvent.consume(Q)}),Editor.previousImage,mxResources.get("previousPage")),f=document.createElement("div");f.style.fontFamily=Editor.defaultHtmlFont;f.style.display="inline-block";f.style.verticalAlign="top";f.style.fontWeight="bold";f.style.marginTop="8px";f.style.fontSize="14px";f.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";
-this.chromelessToolbar.appendChild(f);var g=t(mxUtils.bind(this,function(Q){this.actions.get("nextPage").funct();mxEvent.consume(Q)}),Editor.nextImage,mxResources.get("nextPage")),l=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerHTML="",mxUtils.write(f,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});d.style.paddingLeft="0px";d.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var q=mxUtils.bind(this,
-function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",d.style.display="",f.style.display="inline-block"):(g.style.display="none",d.style.display="none",f.style.display="none");l()});this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",l)}t(mxUtils.bind(this,function(Q){this.actions.get("zoomOut").funct();mxEvent.consume(Q)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(Q){this.actions.get("zoomIn").funct();
+this.chromelessToolbar.appendChild(f);var g=t(mxUtils.bind(this,function(Q){this.actions.get("nextPage").funct();mxEvent.consume(Q)}),Editor.nextImage,mxResources.get("nextPage")),m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerHTML="",mxUtils.write(f,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});d.style.paddingLeft="0px";d.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var q=mxUtils.bind(this,
+function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",d.style.display="",f.style.display="inline-block"):(g.style.display="none",d.style.display="none",f.style.display="none");m()});this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",m)}t(mxUtils.bind(this,function(Q){this.actions.get("zoomOut").funct();mxEvent.consume(Q)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(Q){this.actions.get("zoomIn").funct();
mxEvent.consume(Q)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(Q){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(Q)}),Editor.zoomFitImage,mxResources.get("fit"));var y=null,F=null,C=mxUtils.bind(this,function(Q){null!=y&&(window.clearTimeout(y),y=null);null!=F&&(window.clearTimeout(F),F=null);y=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,
0);y=null;F=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";F=null}),600)}),Q||200)}),H=mxUtils.bind(this,function(Q){null!=y&&(window.clearTimeout(y),y=null);null!=F&&(window.clearTimeout(F),F=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,Q||30)});if("1"==urlParams.layers){this.layersDialog=null;var G=t(mxUtils.bind(this,function(Q){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var R=G.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding=
@@ -2206,10 +2206,11 @@ this.container.appendChild(this.sidebarFooterContainer);this.container.appendChi
!0,0,mxUtils.bind(this,function(e){this.hsplitPosition=e;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerHTML="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b))};
EditorUi.prototype.createStatusDiv=function(b){var e=document.createElement("div");e.setAttribute("title",b);e.innerHTML=b;return e};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
EditorUi.prototype.createDiv=function(b){var e=document.createElement("div");e.className=b;return e};
-EditorUi.prototype.addSplitHandler=function(b,e,k,n){function D(q){if(null!=E){var y=new mxPoint(mxEvent.getClientX(q),mxEvent.getClientY(q));n(Math.max(0,d+(e?y.x-E.x:E.y-y.y)-k));mxEvent.consume(q);d!=l()&&(f=!0,g=null)}}function t(q){D(q);E=d=null}var E=null,d=null,f=!0,g=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var l=mxUtils.bind(this,function(){var q=parseInt(e?b.style.left:b.style.bottom);e||(q=q+k-this.footerHeight);return q});mxEvent.addGestureListeners(b,function(q){E=new mxPoint(mxEvent.getClientX(q),
-mxEvent.getClientY(q));d=l();f=!1;mxEvent.consume(q)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(q){if(!f&&this.hsplitClickEnabled){var y=null!=g?g-k:0;g=l();n(y);mxEvent.consume(q)}}));mxEvent.addGestureListeners(document,null,D,t);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,D,t)})};
+EditorUi.prototype.addSplitHandler=function(b,e,k,n){function D(q){if(null!=E){var y=new mxPoint(mxEvent.getClientX(q),mxEvent.getClientY(q));n(Math.max(0,d+(e?y.x-E.x:E.y-y.y)-k));mxEvent.consume(q);d!=m()&&(f=!0,g=null)}}function t(q){D(q);E=d=null}var E=null,d=null,f=!0,g=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var m=mxUtils.bind(this,function(){var q=parseInt(e?b.style.left:b.style.bottom);e||(q=q+k-this.footerHeight);return q});mxEvent.addGestureListeners(b,function(q){E=new mxPoint(mxEvent.getClientX(q),
+mxEvent.getClientY(q));d=m();f=!1;mxEvent.consume(q)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(q){if(!f&&this.hsplitClickEnabled){var y=null!=g?g-k:0;g=m();n(y);mxEvent.consume(q)}}));mxEvent.addGestureListeners(document,null,D,t);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,D,t)})};
+EditorUi.prototype.prompt=function(b,e,k){b=new FilenameDialog(this,e,mxResources.get("apply"),function(n){k(parseFloat(n))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
EditorUi.prototype.handleError=function(b,e,k,n,D){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=e){D=mxUtils.htmlEntities(mxResources.get("unknownError"));var t=mxResources.get("ok");e=null!=e?e:mxResources.get("error");null!=b&&null!=b.message&&(D=mxUtils.htmlEntities(b.message));this.showError(e,D,t,k,null,null,null,null,null,null,null,null,n?k:null)}else null!=k&&k()};
-EditorUi.prototype.showError=function(b,e,k,n,D,t,E,d,f,g,l,q,y){b=new ErrorDialog(this,b,e,k||mxResources.get("ok"),n,D,t,E,q,d,f);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,g||340,l||100+20*e,!0,!1,y);b.init()};EditorUi.prototype.showDialog=function(b,e,k,n,D,t,E,d,f,g){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,k,n,D,t,E,d,f,g);this.dialogs.push(this.dialog)};
+EditorUi.prototype.showError=function(b,e,k,n,D,t,E,d,f,g,m,q,y){b=new ErrorDialog(this,b,e,k||mxResources.get("ok"),n,D,t,E,q,d,f);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,g||340,m||100+20*e,!0,!1,y);b.init()};EditorUi.prototype.showDialog=function(b,e,k,n,D,t,E,d,f,g){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,k,n,D,t,E,d,f,g);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(b,e,k){null!=this.dialogs&&0<this.dialogs.length&&(null==k||k==this.dialog.container.firstChild)&&(k=this.dialogs.pop(),0==k.close(b,e)?this.dialogs.push(k):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),k=new mxDictionary,n=[],D=0;D<e.length;D++){var t=b.isTableCell(e[D])?b.model.getParent(e[D]):e[D];null==t||k.get(t)||(k.put(t,!0),n.push(t))}b.setSelectionCells(b.duplicateCells(n,!1))}catch(E){this.handleError(E)}};
EditorUi.prototype.pickColor=function(b,e){var k=this.editor.graph,n=k.cellEditor.saveSelection(),D=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,mxUtils.rgba2hex(b)||"none",function(t){k.cellEditor.restoreSelection(n);e(t)},function(){k.cellEditor.restoreSelection(n)});this.showDialog(b.container,230,D,!0,!1);b.init()};
@@ -2217,7 +2218,7 @@ EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind
EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=null;try{var k=b.indexOf("&lt;mxGraphModel ");if(0<=k){var n=b.lastIndexOf("&lt;/mxGraphModel&gt;");n>k&&(e=b.substring(k,n+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(D){}return e};
EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(e){null!=e?b(e):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(k){if(null!=k){var n=decodeURIComponent(k);this.isCompatibleString(n)&&(k=n)}b(k)}),"text")}),"html")};
EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(k){if(null!=k&&0<k.length&&"html"==e&&0<=mxUtils.indexOf(k[0].types,"text/html"))k[0].getType("text/html").then(mxUtils.bind(this,function(n){n.text().then(mxUtils.bind(this,function(D){try{var t=this.parseHtmlData(D),E="text/plain"!=t.getAttribute("data-type")?t.innerHTML:mxUtils.trim(null==t.innerText?mxUtils.getTextContent(t):t.innerText);try{var d=E.lastIndexOf("%3E");
-0<=d&&d<E.length-3&&(E=E.substring(0,d+3))}catch(l){}try{var f=t.getElementsByTagName("span"),g=null!=f&&0<f.length?mxUtils.trim(decodeURIComponent(f[0].textContent)):decodeURIComponent(E);this.isCompatibleString(g)&&(E=g)}catch(l){}}catch(l){}b(this.isCompatibleString(E)?E:null)}))["catch"](function(D){b(null)})}))["catch"](function(n){b(null)});else if(null!=k&&0<k.length&&"text"==e&&0<=mxUtils.indexOf(k[0].types,"text/plain"))k[0].getType("text/plain").then(function(n){n.text().then(function(D){b(D)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
+0<=d&&d<E.length-3&&(E=E.substring(0,d+3))}catch(m){}try{var f=t.getElementsByTagName("span"),g=null!=f&&0<f.length?mxUtils.trim(decodeURIComponent(f[0].textContent)):decodeURIComponent(E);this.isCompatibleString(g)&&(E=g)}catch(m){}}catch(m){}b(this.isCompatibleString(E)?E:null)}))["catch"](function(D){b(null)})}))["catch"](function(n){b(null)});else if(null!=k&&0<k.length&&"text"==e&&0<=mxUtils.indexOf(k[0].types,"text/plain"))k[0].getType("text/plain").then(function(n){n.text().then(function(D){b(D)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
else b(null)}))["catch"](function(k){b(null)})};
EditorUi.prototype.parseHtmlData=function(b){var e=null;if(null!=b&&0<b.length){var k="<meta "==b.substring(0,6);e=document.createElement("div");e.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=e.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=e.firstChild&&e.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=e.firstChild.nextSibling&&e.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
e.firstChild.nodeName&&"A"==e.firstChild.nextSibling.nodeName&&null==e.firstChild.nextSibling.nextSibling&&(b=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,b==e.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(e,b),asHtml=!1));k=k&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName?(b=k.getAttribute("src"),
@@ -2226,6 +2227,7 @@ EditorUi.prototype.extractGraphModelFromEvent=function(b){var e=null,k=null;null
(e=k);return e};EditorUi.prototype.isCompatibleString=function(b){return!1};EditorUi.prototype.saveFile=function(b){b||null==this.editor.filename?(b=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(e){this.save(e)}),null,mxUtils.bind(this,function(e){if(null!=e&&0<e.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(b.container,300,100,!0,!0),b.init()):this.save(this.editor.getOrCreateFilename())};
EditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var e=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(b)&&!mxUtils.confirm(mxResources.get("replaceIt",[b])))return;localStorage.setItem(b,e);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(e.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(e))).simulate(document,
"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(e);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(k){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
+EditorUi.prototype.executeLayouts=function(b,e){this.executeLayout(mxUtils.bind(this,function(){var k=new mxCompositeLayout(this.editor.graph,b),n=this.editor.graph.getSelectionCells();k.execute(this.editor.graph.getDefaultParent(),0==n.length?null:n)}),!0,e)};
EditorUi.prototype.executeLayout=function(b,e,k){var n=this.editor.graph;if(n.isEnabled()){n.getModel().beginUpdate();try{b()}catch(D){throw D;}finally{this.allowAnimation&&e&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(b=new mxMorphing(n),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){n.getModel().endUpdate();null!=k&&k()})),b.startAnimation()):(n.getModel().endUpdate(),null!=k&&k())}}};
EditorUi.prototype.showImageDialog=function(b,e,k,n){n=this.editor.graph.cellEditor;var D=n.saveSelection(),t=mxUtils.prompt(b,e);n.restoreSelection(D);if(null!=t&&0<t.length){var E=new Image;E.onload=function(){k(t,E.width,E.height)};E.onerror=function(){k(null);mxUtils.alert(mxResources.get("fileNotFound"))};E.src=t}else k(null)};EditorUi.prototype.showLinkDialog=function(b,e,k){b=new LinkDialog(this,b,e,k);this.showDialog(b.container,420,90,!0,!0);b.init()};
EditorUi.prototype.showDataDialog=function(b){null!=b&&(b=new EditDataDialog(this,b),this.showDialog(b.container,480,420,!0,!1,null,!1),b.init())};
@@ -2238,7 +2240,7 @@ G))}}finally{n.getModel().endUpdate()}}else{G=n.model.getParent(H);var aa=n.getV
90!=q.keyCode&&89!=q.keyCode&&188!=q.keyCode&&190!=q.keyCode&&85!=q.keyCode)&&(66!=q.keyCode&&73!=q.keyCode||!this.isControlDown(q)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&t.apply(this,arguments)};D.isEnabledForEvent=function(q){return!mxEvent.isConsumed(q)&&this.isGraphEvent(q)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};D.isControlDown=function(q){return mxEvent.isControlDown(q)||mxClient.IS_MAC&&q.metaKey};var E=null,d={37:mxConstants.DIRECTION_WEST,
38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},f=D.getFunction;mxKeyHandler.prototype.getFunction=function(q){if(n.isEnabled()){if(mxEvent.isShiftDown(q)&&mxEvent.isAltDown(q)){var y=k.actions.get(k.altShiftActions[q.keyCode]);if(null!=y)return y.funct}if(null!=d[q.keyCode]&&!n.isSelectionEmpty())if(!this.isControlDown(q)&&mxEvent.isShiftDown(q)&&mxEvent.isAltDown(q)){if(n.model.isVertex(n.getSelectionCell()))return function(){var F=n.connectVertex(n.getSelectionCell(),
d[q.keyCode],n.defaultEdgeLength,q,!0);null!=F&&0<F.length&&(1==F.length&&n.model.isEdge(F[0])?n.setSelectionCell(n.model.getTerminal(F[0],!1)):n.setSelectionCell(F[F.length-1]),n.scrollCellToVisible(n.getSelectionCell()),null!=k.hoverIcons&&k.hoverIcons.update(n.view.getState(n.getSelectionCell())))}}else return this.isControlDown(q)?function(){e(q.keyCode,mxEvent.isShiftDown(q)?n.gridSize:null,!0)}:function(){e(q.keyCode,mxEvent.isShiftDown(q)?n.gridSize:null)}}return f.apply(this,arguments)};D.bindAction=
-mxUtils.bind(this,function(q,y,F,C){var H=this.actions.get(F);null!=H&&(F=function(){H.isEnabled()&&H.funct()},y?C?D.bindControlShiftKey(q,F):D.bindControlKey(q,F):C?D.bindShiftKey(q,F):D.bindKey(q,F))});var g=this,l=D.escape;D.escape=function(q){l.apply(this,arguments)};D.enter=function(){};D.bindControlShiftKey(36,function(){n.exitGroup()});D.bindControlShiftKey(35,function(){n.enterGroup()});D.bindShiftKey(36,function(){n.home()});D.bindKey(35,function(){n.refresh()});D.bindAction(107,!0,"zoomIn");
+mxUtils.bind(this,function(q,y,F,C){var H=this.actions.get(F);null!=H&&(F=function(){H.isEnabled()&&H.funct()},y?C?D.bindControlShiftKey(q,F):D.bindControlKey(q,F):C?D.bindShiftKey(q,F):D.bindKey(q,F))});var g=this,m=D.escape;D.escape=function(q){m.apply(this,arguments)};D.enter=function(){};D.bindControlShiftKey(36,function(){n.exitGroup()});D.bindControlShiftKey(35,function(){n.enterGroup()});D.bindShiftKey(36,function(){n.home()});D.bindKey(35,function(){n.refresh()});D.bindAction(107,!0,"zoomIn");
D.bindAction(109,!0,"zoomOut");D.bindAction(80,!0,"print");D.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)D.bindControlKey(36,function(){n.isEnabled()&&n.foldCells(!0)}),D.bindControlKey(35,function(){n.isEnabled()&&n.foldCells(!1)}),D.bindControlKey(13,function(){g.ctrlEnter()}),D.bindAction(8,!1,"delete"),D.bindAction(8,!0,"deleteAll"),D.bindAction(8,!1,"deleteLabels",!0),D.bindAction(46,!1,"delete"),D.bindAction(46,!0,"deleteAll"),D.bindAction(46,!1,"deleteLabels",
!0),D.bindAction(36,!1,"resetView"),D.bindAction(72,!0,"fitWindow",!0),D.bindAction(74,!0,"fitPage"),D.bindAction(74,!0,"fitTwoPages",!0),D.bindAction(48,!0,"customZoom"),D.bindAction(82,!0,"turn"),D.bindAction(82,!0,"clearDefaultStyle",!0),D.bindAction(83,!0,"save"),D.bindAction(83,!0,"saveAs",!0),D.bindAction(65,!0,"selectAll"),D.bindAction(65,!0,"selectNone",!0),D.bindAction(73,!0,"selectVertices",!0),D.bindAction(69,!0,"selectEdges",!0),D.bindAction(69,!0,"editStyle"),D.bindAction(66,!0,"bold"),
D.bindAction(66,!0,"toBack",!0),D.bindAction(70,!0,"toFront",!0),D.bindAction(68,!0,"duplicate"),D.bindAction(68,!0,"setAsDefaultStyle",!0),D.bindAction(90,!0,"undo"),D.bindAction(89,!0,"autosize",!0),D.bindAction(88,!0,"cut"),D.bindAction(67,!0,"copy"),D.bindAction(86,!0,"paste"),D.bindAction(71,!0,"group"),D.bindAction(77,!0,"editData"),D.bindAction(71,!0,"grid",!0),D.bindAction(73,!0,"italic"),D.bindAction(76,!0,"lockUnlock"),D.bindAction(76,!0,"layers",!0),D.bindAction(80,!0,"formatPanel",!0),
@@ -2249,22 +2251,22 @@ this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.re
this.scrollHandler=null);if(null!=this.destroyFunctions){for(b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}var e=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog];for(b=0;b<e.length;b++)null!=e[b]&&null!=e[b].parentNode&&e[b].parentNode.removeChild(e[b])};(function(){var b=[["nbsp","160"],["shy","173"]],e=mxUtils.parseXml;mxUtils.parseXml=function(k){for(var n=0;n<b.length;n++)k=k.replace(new RegExp("&"+b[n][0]+";","g"),"&#"+b[n][1]+";");return e(k)}})();
Date.prototype.toISOString||function(){function b(e){e=String(e);1===e.length&&(e="0"+e);return e}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(n){return"function"===typeof n||"[object Function]"===b.call(n)},k=Math.pow(2,53)-1;return function(n){var D=Object(n);if(null==n)throw new TypeError("Array.from requires an array-like object - not null or undefined");var t=1<arguments.length?arguments[1]:void 0,E;if("undefined"!==typeof t){if(!e(t))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(E=
-arguments[2])}var d=Number(D.length);d=isNaN(d)?0:0!==d&&isFinite(d)?(0<d?1:-1)*Math.floor(Math.abs(d)):d;d=Math.min(Math.max(d,0),k);for(var f=e(this)?Object(new this(d)):Array(d),g=0,l;g<d;)l=D[g],f[g]=t?"undefined"===typeof E?t(l,g):t.call(E,l,g):l,g+=1;f.length=d;return f}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
+arguments[2])}var d=Number(D.length);d=isNaN(d)?0:0!==d&&isFinite(d)?(0<d?1:-1)*Math.floor(Math.abs(d)):d;d=Math.min(Math.max(d,0),k);for(var f=e(this)?Object(new this(d)):Array(d),g=0,m;g<d;)m=D[g],f[g]=t?"undefined"===typeof E?t(m,g):t.call(E,m,g):m,g+=1;f.length=d;return f}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(e){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;
mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,e,k){return null};
mxImageShape.prototype.getImageDataUri=function(){var b=this.image;if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b,!0),this.clippedImage=b;b=this.clippedSvg}return b};
Graph=function(b,e,k,n,D,t){mxGraph.call(this,b,e,k,n);this.themes=D||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=t?t:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(I){I=this.getCurrentCellStyle(I);
-return null!=I?"1"==I.html||"wrap"==I[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var E=null,d=null,f=null,g=null,l=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(I,V){if("mouseDown"==V.getProperty("eventName")&&this.isEnabled()){I=V.getProperty("event");var Q=I.getState();V=this.view.scale;if(!mxEvent.isAltDown(I.getEvent())&&null!=Q)if(this.model.isEdge(Q.cell))if(E=new mxPoint(I.getGraphX(),I.getGraphY()),l=this.isCellSelected(Q.cell),f=Q,d=I,null!=Q.text&&null!=
+return null!=I?"1"==I.html||"wrap"==I[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var E=null,d=null,f=null,g=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(I,V){if("mouseDown"==V.getProperty("eventName")&&this.isEnabled()){I=V.getProperty("event");var Q=I.getState();V=this.view.scale;if(!mxEvent.isAltDown(I.getEvent())&&null!=Q)if(this.model.isEdge(Q.cell))if(E=new mxPoint(I.getGraphX(),I.getGraphY()),m=this.isCellSelected(Q.cell),f=Q,d=I,null!=Q.text&&null!=
Q.text.boundingBox&&mxUtils.contains(Q.text.boundingBox,I.getGraphX(),I.getGraphY()))g=mxEvent.LABEL_HANDLE;else{var R=this.selectionCellsHandler.getHandler(Q.cell);null!=R&&null!=R.bends&&0<R.bends.length&&(g=R.getHandleForEvent(I))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(I.getEvent())&&(R=this.selectionCellsHandler.getHandler(Q.cell),null==R||null==R.getHandleForEvent(I))){var fa=new mxRectangle(I.getGraphX()-1,I.getGraphY()-1),la=mxEvent.isTouchEvent(I.getEvent())?mxShape.prototype.svgStrokeTolerance-
1:(mxShape.prototype.svgStrokeTolerance+2)/2;R=la+2;fa.grow(la);if(this.isTableCell(Q.cell)&&!this.isCellSelected(Q.cell)&&!(mxUtils.contains(Q,I.getGraphX()-R,I.getGraphY()-R)&&mxUtils.contains(Q,I.getGraphX()-R,I.getGraphY()+R)&&mxUtils.contains(Q,I.getGraphX()+R,I.getGraphY()+R)&&mxUtils.contains(Q,I.getGraphX()+R,I.getGraphY()-R))){var ra=this.model.getParent(Q.cell);R=this.model.getParent(ra);if(!this.isCellSelected(R)){la*=V;var u=2*la;if(this.model.getChildAt(R,0)!=ra&&mxUtils.intersects(fa,
new mxRectangle(Q.x,Q.y-la,Q.width,u))||this.model.getChildAt(ra,0)!=Q.cell&&mxUtils.intersects(fa,new mxRectangle(Q.x-la,Q.y,u,Q.height))||mxUtils.intersects(fa,new mxRectangle(Q.x,Q.y+Q.height-la,Q.width,u))||mxUtils.intersects(fa,new mxRectangle(Q.x+Q.width-la,Q.y,u,Q.height)))ra=this.selectionCellsHandler.isHandled(R),this.selectCellForEvent(R,I.getEvent()),R=this.selectionCellsHandler.getHandler(R),null!=R&&(la=R.getHandleForEvent(I),null!=la&&(R.start(I.getGraphX(),I.getGraphY(),la),R.blockDelayedSelection=
!ra,I.consume()))}}for(;!I.isConsumed()&&null!=Q&&(this.isTableCell(Q.cell)||this.isTableRow(Q.cell)||this.isTable(Q.cell));)this.isSwimlane(Q.cell)&&(R=this.getActualStartSize(Q.cell),(0<R.x||0<R.width)&&mxUtils.intersects(fa,new mxRectangle(Q.x+(R.x-R.width-1)*V+(0==R.x?Q.width:0),Q.y,1,Q.height))||(0<R.y||0<R.height)&&mxUtils.intersects(fa,new mxRectangle(Q.x,Q.y+(R.y-R.height-1)*V+(0==R.y?Q.height:0),Q.width,1)))&&(this.selectCellForEvent(Q.cell,I.getEvent()),R=this.selectionCellsHandler.getHandler(Q.cell),
null!=R&&(la=mxEvent.CUSTOM_HANDLE-R.customHandles.length+1,R.start(I.getGraphX(),I.getGraphY(),la),I.consume())),Q=this.view.getState(this.model.getParent(Q.cell))}}}));this.addMouseListener({mouseDown:function(I,V){},mouseMove:mxUtils.bind(this,function(I,V){I=this.selectionCellsHandler.handlers.map;for(var Q in I)if(null!=I[Q].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(V.getEvent())){var R=this.tolerance;if(null!=E&&null!=f&&null!=d){if(Q=f,Math.abs(E.x-
-V.getGraphX())>R||Math.abs(E.y-V.getGraphY())>R){var fa=this.selectionCellsHandler.getHandler(Q.cell);null==fa&&this.model.isEdge(Q.cell)&&(fa=this.createHandler(Q));if(null!=fa&&null!=fa.bends&&0<fa.bends.length){I=fa.getHandleForEvent(d);var la=this.view.getEdgeStyle(Q);R=la==mxEdgeStyle.EntityRelation;l||g!=mxEvent.LABEL_HANDLE||(I=g);if(R&&0!=I&&I!=fa.bends.length-1&&I!=mxEvent.LABEL_HANDLE)!R||null==Q.visibleSourceState&&null==Q.visibleTargetState||(this.graphHandler.reset(),V.consume());else if(I==
+V.getGraphX())>R||Math.abs(E.y-V.getGraphY())>R){var fa=this.selectionCellsHandler.getHandler(Q.cell);null==fa&&this.model.isEdge(Q.cell)&&(fa=this.createHandler(Q));if(null!=fa&&null!=fa.bends&&0<fa.bends.length){I=fa.getHandleForEvent(d);var la=this.view.getEdgeStyle(Q);R=la==mxEdgeStyle.EntityRelation;m||g!=mxEvent.LABEL_HANDLE||(I=g);if(R&&0!=I&&I!=fa.bends.length-1&&I!=mxEvent.LABEL_HANDLE)!R||null==Q.visibleSourceState&&null==Q.visibleTargetState||(this.graphHandler.reset(),V.consume());else if(I==
mxEvent.LABEL_HANDLE||0==I||null!=Q.visibleSourceState||I==fa.bends.length-1||null!=Q.visibleTargetState)R||I==mxEvent.LABEL_HANDLE||(R=Q.absolutePoints,null!=R&&(null==la&&null==I||la==mxEdgeStyle.OrthConnector)&&(I=g,null==I&&(I=new mxRectangle(E.x,E.y),I.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(I,R[0].x,R[0].y)?I=0:mxUtils.contains(I,R[R.length-1].x,R[R.length-1].y)?I=fa.bends.length-1:null!=la&&(2==R.length||3==R.length&&(0==Math.round(R[0].x-R[1].x)&&0==Math.round(R[1].x-
R[2].x)||0==Math.round(R[0].y-R[1].y)&&0==Math.round(R[1].y-R[2].y)))?I=2:(I=mxUtils.findNearestSegment(Q,E.x,E.y),I=null==la?mxEvent.VIRTUAL_HANDLE-I:I+1))),null==I&&(I=mxEvent.VIRTUAL_HANDLE)),fa.start(V.getGraphX(),V.getGraphX(),I),V.consume(),this.graphHandler.reset()}null!=fa&&(this.selectionCellsHandler.isHandlerActive(fa)?this.isCellSelected(Q.cell)||(this.selectionCellsHandler.handlers.put(Q.cell,fa),this.selectCellForEvent(Q.cell,V.getEvent())):this.isCellSelected(Q.cell)||fa.destroy());
-l=!1;E=d=f=g=null}}else if(Q=V.getState(),null!=Q&&this.isCellEditable(Q.cell)){fa=null;if(this.model.isEdge(Q.cell)){if(I=new mxRectangle(V.getGraphX(),V.getGraphY()),I.grow(mxEdgeHandler.prototype.handleImage.width/2),R=Q.absolutePoints,null!=R)if(null!=Q.text&&null!=Q.text.boundingBox&&mxUtils.contains(Q.text.boundingBox,V.getGraphX(),V.getGraphY()))fa="move";else if(mxUtils.contains(I,R[0].x,R[0].y)||mxUtils.contains(I,R[R.length-1].x,R[R.length-1].y))fa="pointer";else if(null!=Q.visibleSourceState||
+m=!1;E=d=f=g=null}}else if(Q=V.getState(),null!=Q&&this.isCellEditable(Q.cell)){fa=null;if(this.model.isEdge(Q.cell)){if(I=new mxRectangle(V.getGraphX(),V.getGraphY()),I.grow(mxEdgeHandler.prototype.handleImage.width/2),R=Q.absolutePoints,null!=R)if(null!=Q.text&&null!=Q.text.boundingBox&&mxUtils.contains(Q.text.boundingBox,V.getGraphX(),V.getGraphY()))fa="move";else if(mxUtils.contains(I,R[0].x,R[0].y)||mxUtils.contains(I,R[R.length-1].x,R[R.length-1].y))fa="pointer";else if(null!=Q.visibleSourceState||
null!=Q.visibleTargetState)I=this.view.getEdgeStyle(Q),fa="crosshair",I!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(Q)&&(V=mxUtils.findNearestSegment(Q,V.getGraphX(),V.getGraphY()),V<R.length-1&&0<=V&&(fa=0==Math.round(R[V].x-R[V+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(V.getEvent())){R=mxShape.prototype.svgStrokeTolerance/2;I=new mxRectangle(V.getGraphX(),V.getGraphY());I.grow(R);if(this.isTableCell(Q.cell)&&(V=this.model.getParent(Q.cell),R=this.model.getParent(V),!this.isCellSelected(R)))if(mxUtils.intersects(I,
new mxRectangle(Q.x,Q.y-2,Q.width,4))&&this.model.getChildAt(R,0)!=V||mxUtils.intersects(I,new mxRectangle(Q.x,Q.y+Q.height-2,Q.width,4)))fa="row-resize";else if(mxUtils.intersects(I,new mxRectangle(Q.x-2,Q.y,4,Q.height))&&this.model.getChildAt(V,0)!=Q.cell||mxUtils.intersects(I,new mxRectangle(Q.x+Q.width-2,Q.y,4,Q.height)))fa="col-resize";for(V=Q;null==fa&&null!=V&&(this.isTableCell(V.cell)||this.isTableRow(V.cell)||this.isTable(V.cell));)this.isSwimlane(V.cell)&&(R=this.getActualStartSize(V.cell),
la=this.view.scale,(0<R.x||0<R.width)&&mxUtils.intersects(I,new mxRectangle(V.x+(R.x-R.width-1)*la+(0==R.x?V.width*la:0),V.y,1,V.height))?fa="col-resize":(0<R.y||0<R.height)&&mxUtils.intersects(I,new mxRectangle(V.x,V.y+(R.y-R.height-1)*la+(0==R.y?V.height:0),V.width,1))&&(fa="row-resize")),V=this.view.getState(this.model.getParent(V.cell))}null!=fa&&Q.setCursor(fa)}}}),mouseUp:mxUtils.bind(this,function(I,V){g=E=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=
@@ -2285,6 +2287,7 @@ this.connectionHandler.selectCells=function(I,V){this.graph.setSelectionCell(V||
null,I.destroyIcons());I.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var U=this.updateMouseEvent;this.updateMouseEvent=function(I){I=U.apply(this,arguments);null!=I.state&&this.isCellLocked(I.getCell())&&(I.state=null);return I}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";
Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
+Graph.layoutNames="mxHierarchicalLayout mxCircleLayout mxCompactTreeLayout mxEdgeLabelLayout mxFastOrganicLayout mxParallelEdgeLayout mxPartitionLayout mxRadialTreeLayout mxStackLayout".split(" ");
Graph.createOffscreenGraph=function(b){var e=new Graph(document.createElement("div"));e.stylesheet.styles=mxUtils.clone(b.styles);e.resetViewOnRootChange=!1;e.setConnectable(!1);e.gridEnabled=!1;e.autoScroll=!1;e.setTooltips(!1);e.setEnabled(!1);e.container.style.visibility="hidden";e.container.style.position="absolute";e.container.style.overflow="hidden";e.container.style.height="1px";e.container.style.width="1px";return e};
Graph.createSvgImage=function(b,e,k,n,D){k=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+e+'px" '+(null!=n&&null!=D?'viewBox="0 0 '+n+" "+D+'" ':"")+'version="1.1">'+k+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0)),b,e)};
Graph.createSvgNode=function(b,e,k,n,D){var t=mxUtils.createXmlDocument(),E=null!=t.createElementNS?t.createElementNS(mxConstants.NS_SVG,"svg"):t.createElement("svg");null!=D&&(null!=E.style?E.style.backgroundColor=D:E.setAttribute("style","background-color:"+D));null==t.createElementNS?(E.setAttribute("xmlns",mxConstants.NS_SVG),E.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):E.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);E.setAttribute("version","1.1");
@@ -2296,36 +2299,36 @@ Graph.arrayBufferIndexOfString=function(b,e,k){var n=e.charCodeAt(0),D=1,t=-1;fo
Graph.decompress=function(b,e,k){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));e=decodeURIComponent(e?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return k?e:Graph.zapGremlins(e)};
Graph.fadeNodes=function(b,e,k,n,D){D=null!=D?D:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,e);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+D+"ms ease-in-out");Graph.setOpacityForNodes(b,k);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=n&&n()},D)},0)};Graph.removeKeys=function(b,e){for(var k in b)e(k)&&delete b[k]};
Graph.setTransitionForNodes=function(b,e){for(var k=0;k<b.length;k++)mxUtils.setPrefixedStyle(b[k].style,"transition",e)};Graph.setOpacityForNodes=function(b,e){for(var k=0;k<b.length;k++)b[k].style.opacity=e};Graph.removePasteFormatting=function(b){for(;null!=b;)null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild),b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.whiteSpace="","#000000"==b.style.color&&(b.style.color="")),b=b.nextSibling};
-Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){b.hasAttribute("xlink:href")&&!b.getAttribute("xlink:href").match(/^#/)&&b.remove()});
+Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&b.hasAttribute("xlink:href")&&!b.getAttribute("xlink:href").match(/^#/)&&b.remove()});
Graph.domPurify=function(b,e){window.DOM_PURIFY_CONFIG.IN_PLACE=e;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};
-Graph.clipSvgDataUri=function(b,e){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var k=document.createElement("div");k.style.position="absolute";k.style.visibility="hidden";var n=decodeURIComponent(escape(atob(b.substring(26)))),D=n.indexOf("<svg");if(0<=D){k.innerHTML=n.substring(D);Graph.sanitizeNode(k);var t=k.getElementsByTagName("svg");if(0<t.length){if(e||null!=t[0].getAttribute("preserveAspectRatio")){document.body.appendChild(k);try{n=
-e=1;var E=t[0].getAttribute("width"),d=t[0].getAttribute("height");E=null!=E&&"%"!=E.charAt(E.length-1)?parseFloat(E):NaN;d=null!=d&&"%"!=d.charAt(d.length-1)?parseFloat(d):NaN;var f=t[0].getAttribute("viewBox");if(null!=f&&!isNaN(E)&&!isNaN(d)){var g=f.split(" ");4<=f.length&&(e=parseFloat(g[2])/E,n=parseFloat(g[3])/d)}var l=t[0].getBBox();0<l.width&&0<l.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",l.x+" "+l.y+" "+l.width+" "+l.height),k.getElementsByTagName("svg")[0].setAttribute("width",
-l.width/e),k.getElementsByTagName("svg")[0].setAttribute("height",l.height/n))}catch(q){}finally{document.body.removeChild(k)}}b=Editor.createSvgDataUri(mxUtils.getXml(t[0]))}}}catch(q){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
+Graph.clipSvgDataUri=function(b,e){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var k=document.createElement("div");k.style.position="absolute";k.style.visibility="hidden";var n=decodeURIComponent(escape(atob(b.substring(26)))),D=n.indexOf("<svg");if(0<=D){k.innerHTML=Graph.sanitizeHtml(n.substring(D));var t=k.getElementsByTagName("svg");if(0<t.length){if(e||null!=t[0].getAttribute("preserveAspectRatio")){document.body.appendChild(k);try{n=e=
+1;var E=t[0].getAttribute("width"),d=t[0].getAttribute("height");E=null!=E&&"%"!=E.charAt(E.length-1)?parseFloat(E):NaN;d=null!=d&&"%"!=d.charAt(d.length-1)?parseFloat(d):NaN;var f=t[0].getAttribute("viewBox");if(null!=f&&!isNaN(E)&&!isNaN(d)){var g=f.split(" ");4<=f.length&&(e=parseFloat(g[2])/E,n=parseFloat(g[3])/d)}var m=t[0].getBBox();0<m.width&&0<m.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",m.x+" "+m.y+" "+m.width+" "+m.height),k.getElementsByTagName("svg")[0].setAttribute("width",
+m.width/e),k.getElementsByTagName("svg")[0].setAttribute("height",m.height/n))}catch(q){}finally{document.body.removeChild(k)}}b=Editor.createSvgDataUri(mxUtils.getXml(t[0]))}}}catch(q){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
Graph.createRemoveIcon=function(b,e){var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.clearImage);k.setAttribute("title",b);k.setAttribute("width","13");k.setAttribute("height","10");k.style.marginLeft="4px";k.style.marginBottom="-1px";k.style.cursor="pointer";mxEvent.addListener(k,"click",e);return k};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.isLink=function(b){return null!=b&&Graph.linkPattern.test(b)};
Graph.linkPattern=RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i");mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";
Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.shapeForegroundColor="#000000";Graph.prototype.shapeBackgroundColor="#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=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");
-Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,n){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var D=k.view.graph.tolerance,t=!0,E=null,d=mxUtils.bind(this,function(l){t=!0;E=new mxPoint(mxEvent.getClientX(l),mxEvent.getClientY(l))}),f=mxUtils.bind(this,function(l){t=t&&null!=E&&Math.abs(E.x-mxEvent.getClientX(l))<D&&Math.abs(E.y-mxEvent.getClientY(l))<D}),g=mxUtils.bind(this,function(l){if(t)for(var q=mxEvent.getSource(l);null!=
-q&&q!=n.node;){if("a"==q.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,q,l);break}q=q.parentNode}});mxEvent.addGestureListeners(n.node,d,f,g);mxEvent.addListener(n.node,"click",function(l){mxEvent.consume(l)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var n=mxEvent.getSource(k);"A"==n.nodeName&&(n=n.getAttribute("href"),null!=
+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,n){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var D=k.view.graph.tolerance,t=!0,E=null,d=mxUtils.bind(this,function(m){t=!0;E=new mxPoint(mxEvent.getClientX(m),mxEvent.getClientY(m))}),f=mxUtils.bind(this,function(m){t=t&&null!=E&&Math.abs(E.x-mxEvent.getClientX(m))<D&&Math.abs(E.y-mxEvent.getClientY(m))<D}),g=mxUtils.bind(this,function(m){if(t)for(var q=mxEvent.getSource(m);null!=
+q&&q!=n.node;){if("a"==q.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,q,m);break}q=q.parentNode}});mxEvent.addGestureListeners(n.node,d,f,g);mxEvent.addListener(n.node,"click",function(m){mxEvent.consume(m)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var n=mxEvent.getSource(k);"A"==n.nodeName&&(n=n.getAttribute("href"),null!=
n&&this.graph.isCustomLink(n)&&(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&this.graph.customLinkClicked(n)&&mxEvent.consume(k))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(k,n){null!=this.container&&this.flowAnimationStyle&&(k=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(k))}));this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(E){return!this.isSpecialColor(E.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(E.style,"lineShape",null)&&(this.model.isVertex(E.cell)||"arrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,
null))};Graph.prototype.isStrokeState=function(E){return!this.isSpecialColor(E.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(E){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],E)};Graph.prototype.isGlassState=function(E){E=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return"label"==E||"rectangle"==E||"internalStorage"==E||"ext"==E||"umlLifeline"==E||"swimlane"==E||"process"==E};Graph.prototype.isRoundedState=
function(E){return null!=E.shape?E.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(E){var d=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(E.style,mxConstants.STYLE_CURVED,!1)&&("connector"==d||"filledEdge"==d)};Graph.prototype.isAutoSizeState=function(E){return"1"==mxUtils.getValue(E.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(E){E=
mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return"label"==E||"image"==E};Graph.prototype.isShadowState=function(E){return"image"!=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(E,d){E=null!=E?E:!0;d=null!=d?d:!0;var f=this.model;return f.filterDescendants(function(g){return E&&f.isVertex(g)||d&&f.isEdge(g)},f.getRoot())};Graph.prototype.getCommonStyle=function(E){for(var d={},f=0;f<E.length;f++){var g=this.view.getState(E[f]);this.mergeStyle(g.style,
-d,0==f)}return d};Graph.prototype.mergeStyle=function(E,d,f){if(null!=E){var g={},l;for(l in E){var q=E[l];null!=q&&(g[l]=!0,null==d[l]&&f?d[l]=q:d[l]!=q&&delete d[l])}for(l in d)g[l]||delete d[l]}};Graph.prototype.getStartEditingCell=function(E,d){d=this.getCellStyle(E);d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0));this.isTable(E)&&(!this.isSwimlane(E)||0==d)&&""==this.getLabel(E)&&0<this.model.getChildCount(E)&&(E=this.model.getChildAt(E,0),d=this.getCellStyle(E),d=parseInt(mxUtils.getValue(d,
+d,0==f)}return d};Graph.prototype.mergeStyle=function(E,d,f){if(null!=E){var g={},m;for(m in E){var q=E[m];null!=q&&(g[m]=!0,null==d[m]&&f?d[m]=q:d[m]!=q&&delete d[m])}for(m in d)g[m]||delete d[m]}};Graph.prototype.getStartEditingCell=function(E,d){d=this.getCellStyle(E);d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0));this.isTable(E)&&(!this.isSwimlane(E)||0==d)&&""==this.getLabel(E)&&0<this.model.getChildCount(E)&&(E=this.model.getChildAt(E,0),d=this.getCellStyle(E),d=parseInt(mxUtils.getValue(d,
mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(E)&&(!this.isSwimlane(E)||0==d)&&""==this.getLabel(E)&&0<this.model.getChildCount(E))for(d=0;d<this.model.getChildCount(E);d++){var f=this.model.getChildAt(E,d);if(this.isCellEditable(f)){E=f;break}}return E};Graph.prototype.copyStyle=function(E){return this.getCellStyle(E,!1)};Graph.prototype.pasteStyle=function(E,d,f){f=null!=f?f:Graph.pasteStyles;Graph.removeKeys(E,function(g){return 0>mxUtils.indexOf(f,g)});this.updateCellStyles(E,d)};Graph.prototype.updateCellStyles=
-function(E,d){this.model.beginUpdate();try{for(var f=0;f<d.length;f++)if(this.model.isVertex(d[f])||this.model.isEdge(d[f])){var g=this.getCellStyle(d[f],!1),l;for(l in E){var q=E[l];g[l]!=q&&this.setCellStyles(l,q,[d[f]])}}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==
-mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(E,d,f,g,l,q){this.useCssTransforms&&(E=E/this.currentScale-this.currentTranslate.x,d=d/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(E,d,f,g,l,q){g=null!=g?g:!0;l=null!=l?l:!0;null==f&&(f=this.getCurrentRoot(),null==f&&(f=this.getModel().getRoot()));if(null!=f)for(var y=this.model.getChildCount(f)-1;0<=
-y;y--){var F=this.model.getChildAt(f,y),C=this.getScaledCellAt(E,d,F,g,l,q);if(null!=C)return C;if(this.isCellVisible(F)&&(l&&this.model.isEdge(F)||g&&this.model.isVertex(F))&&(C=this.view.getState(F),null!=C&&(null==q||!q(C,E,d))&&this.intersects(C,E,d)))return F}return null};Graph.prototype.isRecursiveVertexResize=function(E){return!this.isSwimlane(E.cell)&&0<this.model.getChildCount(E.cell)&&!this.isCellCollapsed(E.cell)&&"1"==mxUtils.getValue(E.style,"recursiveResize","1")&&null==mxUtils.getValue(E.style,
-"childLayout",null)};Graph.prototype.getAbsoluteParent=function(E){for(var d=this.getCellGeometry(E);null!=d&&d.relative;)E=this.getModel().getParent(E),d=this.getCellGeometry(E);return E};Graph.prototype.isPart=function(E){return"1"==mxUtils.getValue(this.getCurrentCellStyle(E),"part","0")||this.isTableCell(E)||this.isTableRow(E)};Graph.prototype.getCompositeParents=function(E){for(var d=new mxDictionary,f=[],g=0;g<E.length;g++){var l=this.getCompositeParent(E[g]);this.isTableCell(l)&&(l=this.graph.model.getParent(l));
-this.isTableRow(l)&&(l=this.graph.model.getParent(l));null==l||d.get(l)||(d.put(l,!0),f.push(l))}return f};Graph.prototype.getCompositeParent=function(E){for(;this.isPart(E);){var d=this.model.getParent(E);if(!this.model.isVertex(d))break;E=d}return E};Graph.prototype.filterSelectionCells=function(E){var d=this.getSelectionCells();if(null!=E){for(var f=[],g=0;g<d.length;g++)E(d[g])||f.push(d[g]);d=f}return d};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(E){if(this.useCssTransforms){var d=
+function(E,d){this.model.beginUpdate();try{for(var f=0;f<d.length;f++)if(this.model.isVertex(d[f])||this.model.isEdge(d[f])){var g=this.getCellStyle(d[f],!1),m;for(m in E){var q=E[m];g[m]!=q&&this.setCellStyles(m,q,[d[f]])}}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==
+mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(E,d,f,g,m,q){this.useCssTransforms&&(E=E/this.currentScale-this.currentTranslate.x,d=d/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(E,d,f,g,m,q){g=null!=g?g:!0;m=null!=m?m:!0;null==f&&(f=this.getCurrentRoot(),null==f&&(f=this.getModel().getRoot()));if(null!=f)for(var y=this.model.getChildCount(f)-1;0<=
+y;y--){var F=this.model.getChildAt(f,y),C=this.getScaledCellAt(E,d,F,g,m,q);if(null!=C)return C;if(this.isCellVisible(F)&&(m&&this.model.isEdge(F)||g&&this.model.isVertex(F))&&(C=this.view.getState(F),null!=C&&(null==q||!q(C,E,d))&&this.intersects(C,E,d)))return F}return null};Graph.prototype.isRecursiveVertexResize=function(E){return!this.isSwimlane(E.cell)&&0<this.model.getChildCount(E.cell)&&!this.isCellCollapsed(E.cell)&&"1"==mxUtils.getValue(E.style,"recursiveResize","1")&&null==mxUtils.getValue(E.style,
+"childLayout",null)};Graph.prototype.getAbsoluteParent=function(E){for(var d=this.getCellGeometry(E);null!=d&&d.relative;)E=this.getModel().getParent(E),d=this.getCellGeometry(E);return E};Graph.prototype.isPart=function(E){return"1"==mxUtils.getValue(this.getCurrentCellStyle(E),"part","0")||this.isTableCell(E)||this.isTableRow(E)};Graph.prototype.getCompositeParents=function(E){for(var d=new mxDictionary,f=[],g=0;g<E.length;g++){var m=this.getCompositeParent(E[g]);this.isTableCell(m)&&(m=this.graph.model.getParent(m));
+this.isTableRow(m)&&(m=this.graph.model.getParent(m));null==m||d.get(m)||(d.put(m,!0),f.push(m))}return f};Graph.prototype.getCompositeParent=function(E){for(;this.isPart(E);){var d=this.model.getParent(E);if(!this.model.isVertex(d))break;E=d}return E};Graph.prototype.filterSelectionCells=function(E){var d=this.getSelectionCells();if(null!=E){for(var f=[],g=0;g<d.length;g++)E(d[g])||f.push(d[g]);d=f}return d};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(E){if(this.useCssTransforms){var d=
this.currentScale,f=this.currentTranslate;E=new mxRectangle((E.x+2*f.x)*d-f.x,(E.y+2*f.y)*d-f.y,E.width*d,E.height*d)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(E){E=this.strokeWidth;this.graph.useCssTransforms&&(E/=this.graph.currentScale);return E};mxGraphView.prototype.getGraphBounds=function(){var E=this.graphBounds;if(this.graph.useCssTransforms){var d=this.graph.currentTranslate,f=this.graph.currentScale;E=new mxRectangle((E.x+d.x)*f,(E.y+d.y)*f,E.width*f,E.height*
f)}return E};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(E){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);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),
this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(E){E=k.apply(this,arguments);for(var d=[],f=0;f<E.length;f++)this.isTableRow(E[f])||this.isTableCell(E[f])||d.push(E[f]);return d};var n=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(E){E=n.apply(this,arguments);for(var d=[],f=0;f<E.length;f++)this.isTable(E[f])||
this.isTableRow(E[f])||this.isTableCell(E[f])||d.push(E[f]);return d};Graph.prototype.updateCssTransform=function(){var E=this.view.getDrawPane();if(null!=E)if(E=E.parentNode,this.useCssTransforms){var d=E.getAttribute("transform");E.setAttribute("transformOrigin","0 0");var f=Math.round(100*this.currentScale)/100;E.setAttribute("transform","scale("+f+","+f+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");d!=E.getAttribute("transform")&&
this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",E.getAttribute("transform"))}else E.removeAttribute("transformOrigin"),E.removeAttribute("transform")};var D=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph.useCssTransforms,d=this.scale,f=this.translate;E&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);D.apply(this,arguments);E&&(this.scale=d,this.translate=f)};var t=mxGraph.prototype.updatePageBreaks;
-mxGraph.prototype.updatePageBreaks=function(E,d,f){var g=this.useCssTransforms,l=this.view.scale,q=this.view.translate;g&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);t.apply(this,arguments);g&&(this.view.scale=l,this.view.translate=q,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
+mxGraph.prototype.updatePageBreaks=function(E,d,f){var g=this.useCssTransforms,m=this.view.scale,q=this.view.translate;g&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);t.apply(this,arguments);g&&(this.view.scale=m,this.view.translate=q,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
Graph.prototype.labelLinkClicked=function(b,e,k){e=e.getAttribute("href");if(null!=e&&!this.isCustomLink(e)&&(mxEvent.isLeftMouseButton(k)&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(e)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(e),b);mxEvent.consume(k)}};
Graph.prototype.openLink=function(b,e,k){var n=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==e&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==e&&window==window.top){var D=b.split("#")[1];window.location.hash=="#"+D&&(window.location.hash="");window.location.hash=D}else n=window.open(b,null!=e?e:"_blank"),null==n||k||(n.opener=null)}catch(t){}return n};
Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};
@@ -2334,11 +2337,12 @@ Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutMana
"1"),e.horizontal="1"==mxUtils.getValue(b,"horizontalStack","1"),e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),e.resizeLast="1"==mxUtils.getValue(b,"resizeLast","0"),e.spacing=b.stackSpacing||e.spacing,e.border=b.stackBorder||e.border,e.marginLeft=b.marginLeft||0,e.marginRight=b.marginRight||0,e.marginTop=b.marginTop||0,e.marginBottom=b.marginBottom||0,e.allowGaps=b.allowGaps||0,e.fill=!0,e.allowGaps&&(e.gridSize=parseFloat(mxUtils.getValue(b,"stackUnitSize",20))),e;if("treeLayout"==
b.childLayout)return e=new mxCompactTreeLayout(this.graph),e.horizontal="1"==mxUtils.getValue(b,"horizontalTree","1"),e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),e.groupPadding=mxUtils.getValue(b,"parentPadding",20),e.levelDistance=mxUtils.getValue(b,"treeLevelDistance",30),e.maintainParentLocation=!0,e.edgeRouting=!1,e.resetEdges=!1,e;if("flowLayout"==b.childLayout)return e=new mxHierarchicalLayout(this.graph,mxUtils.getValue(b,"flowOrientation",mxConstants.DIRECTION_EAST)),e.resizeParent=
"1"==mxUtils.getValue(b,"resizeParent","1"),e.parentBorder=mxUtils.getValue(b,"parentPadding",20),e.maintainParentLocation=!0,e.intraCellSpacing=mxUtils.getValue(b,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),e.interRankCellSpacing=mxUtils.getValue(b,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),e.interHierarchySpacing=mxUtils.getValue(b,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),e.parallelEdgeSpacing=mxUtils.getValue(b,
-"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),e;if("circleLayout"==b.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==b.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==b.childLayout)return new TableLayout(this.graph)}return null}};
+"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),e;if("circleLayout"==b.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==b.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==b.childLayout)return new TableLayout(this.graph);if(null!=b.childLayout&&"["==b.childLayout.charAt(0))try{return new mxCompositeLayout(this.graph,this.graph.createLayouts(JSON.parse(b.childLayout)))}catch(n){null!=window.console&&console.error(n)}}return null}};
+Graph.prototype.createLayouts=function(b){for(var e=[],k=0;k<b.length;k++)if(0<=mxUtils.indexOf(Graph.layoutNames,b[k].layout)){var n=new window[b[k].layout](this);if(null!=b[k].config)for(var D in b[k].config)n[D]=b[k].config[D];e.push(n)}else throw Error(mxResources.get("invalidCallFnNotFound",[b[k].layout]));return e};
Graph.prototype.getDataForCells=function(b){for(var e=[],k=0;k<b.length;k++){var n=null!=b[k].value?b[k].value.attributes:null,D={};D.id=b[k].id;if(null!=n)for(var t=0;t<n.length;t++)D[n[t].nodeName]=n[t].nodeValue;else D.label=this.convertValueToString(b[k]);e.push(D)}return e};
Graph.prototype.getNodesForCells=function(b){for(var e=[],k=0;k<b.length;k++){var n=this.view.getState(b[k]);if(null!=n){for(var D=this.cellRenderer.getShapesForState(n),t=0;t<D.length;t++)null!=D[t]&&null!=D[t].node&&e.push(D[t].node);null!=n.control&&null!=n.control.node&&e.push(n.control.node)}}return e};
Graph.prototype.createWipeAnimations=function(b,e){for(var k=[],n=0;n<b.length;n++){var D=this.view.getState(b[n]);null!=D&&null!=D.shape&&(this.model.isEdge(D.cell)&&null!=D.absolutePoints&&1<D.absolutePoints.length?k.push(this.createEdgeWipeAnimation(D,e)):this.model.isVertex(D.cell)&&null!=D.shape.bounds&&k.push(this.createVertexWipeAnimation(D,e)))}return k};
-Graph.prototype.createEdgeWipeAnimation=function(b,e){var k=b.absolutePoints.slice(),n=b.segments,D=b.length,t=k.length;return{execute:mxUtils.bind(this,function(E,d){if(null!=b.shape){var f=[k[0]];d=E/d;e||(d=1-d);for(var g=D*d,l=1;l<t;l++)if(g<=n[l-1]){f.push(new mxPoint(k[l-1].x+(k[l].x-k[l-1].x)*g/n[l-1],k[l-1].y+(k[l].y-k[l-1].y)*g/n[l-1]));break}else g-=n[l-1],f.push(k[l]);b.shape.points=f;b.shape.redraw();0==E&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
+Graph.prototype.createEdgeWipeAnimation=function(b,e){var k=b.absolutePoints.slice(),n=b.segments,D=b.length,t=k.length;return{execute:mxUtils.bind(this,function(E,d){if(null!=b.shape){var f=[k[0]];d=E/d;e||(d=1-d);for(var g=D*d,m=1;m<t;m++)if(g<=n[m-1]){f.push(new mxPoint(k[m-1].x+(k[m].x-k[m-1].x)*g/n[m-1],k[m-1].y+(k[m].y-k[m-1].y)*g/n[m-1]));break}else g-=n[m-1],f.push(k[m]);b.shape.points=f;b.shape.redraw();0==E&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
b.text.node&&(b.text.node.style.opacity=d)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};
Graph.prototype.createVertexWipeAnimation=function(b,e){var k=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(n,D){null!=b.shape&&(D=n/D,e||(D=1-D),b.shape.bounds=new mxRectangle(k.x,k.y,k.width*D,k.height),b.shape.redraw(),0==n&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=D))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,k,n){k=null!=k?k:30;n=null!=n?n:30;var D=null,t=0,E=mxUtils.bind(this,function(){if(t==k||this.stoppingCustomActions){window.clearInterval(D);for(var d=0;d<b.length;d++)b[d].stop();null!=e&&e()}else for(d=0;d<b.length;d++)b[d].execute(t,k);t++});D=window.setInterval(E,n);E()};
@@ -2352,11 +2356,11 @@ Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEve
Graph.prototype.getGlobalVariable=function(b){var e=null;"date"==b?e=(new Date).toLocaleDateString():"time"==b?e=(new Date).toLocaleTimeString():"timestamp"==b?e=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),e=this.formatDate(new Date,b));return e};
Graph.prototype.formatDate=function(b,e,k){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 n=this.dateFormatCache,D=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,t=/[^-+\dA-Z]/g,E=function(aa,da){aa=String(aa);for(da=da||2;aa.length<da;)aa="0"+aa;return aa};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
-/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(n.masks[e]||e||n.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var d=k?"getUTC":"get",f=b[d+"Date"](),g=b[d+"Day"](),l=b[d+"Month"](),q=b[d+"FullYear"](),y=b[d+"Hours"](),F=b[d+"Minutes"](),C=b[d+"Seconds"]();d=b[d+"Milliseconds"]();var H=k?0:b.getTimezoneOffset(),G={d:f,dd:E(f),ddd:n.i18n.dayNames[g],dddd:n.i18n.dayNames[g+7],m:l+1,mm:E(l+1),mmm:n.i18n.monthNames[l],mmmm:n.i18n.monthNames[l+
+/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(n.masks[e]||e||n.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var d=k?"getUTC":"get",f=b[d+"Date"](),g=b[d+"Day"](),m=b[d+"Month"](),q=b[d+"FullYear"](),y=b[d+"Hours"](),F=b[d+"Minutes"](),C=b[d+"Seconds"]();d=b[d+"Milliseconds"]();var H=k?0:b.getTimezoneOffset(),G={d:f,dd:E(f),ddd:n.i18n.dayNames[g],dddd:n.i18n.dayNames[g+7],m:m+1,mm:E(m+1),mmm:n.i18n.monthNames[m],mmmm:n.i18n.monthNames[m+
12],yy:String(q).slice(2),yyyy:q,h:y%12||12,hh:E(y%12||12),H:y,HH:E(y),M:F,MM:E(F),s:C,ss:E(C),l:E(d,3),L:E(99<d?Math.round(d/10):d),t:12>y?"a":"p",tt:12>y?"am":"pm",T:12>y?"A":"P",TT:12>y?"AM":"PM",Z:k?"UTC":(String(b).match(D)||[""]).pop().replace(t,""),o:(0<H?"-":"+")+E(100*Math.floor(Math.abs(H)/60)+Math.abs(H)%60,4),S:["th","st","nd","rd"][3<f%10?0:(10!=f%100-f%10)*f%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(aa){return aa in G?G[aa]:aa.slice(1,
aa.length-1)})};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){for(e=b[0];!this.model.isLayer(e);)e=this.model.getParent(e);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(e,b[k])){e=null;break}}return e};
-Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var n=this.getModel(),D=n.getChildCount(n.root),t=0;t<D;t++)mxUtils.bind(this,function(E){function d(){n.isVisible(E)?(l.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(g,75)):(l.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(g,25))}var f=this.convertValueToString(E)||mxResources.get("background")||"Background",g=document.createElement("div");g.style.overflow=
-"hidden";g.style.textOverflow="ellipsis";g.style.padding="2px";g.style.whiteSpace="nowrap";g.style.cursor="pointer";g.setAttribute("title",mxResources.get(n.isVisible(E)?"hideIt":"show",[f]));var l=document.createElement("img");l.setAttribute("draggable","false");l.setAttribute("align","absmiddle");l.setAttribute("border","0");l.style.position="relative";l.style.width="16px";l.style.padding="0px 6px 0 4px";e&&(l.style.filter="invert(100%)",l.style.top="-2px");g.appendChild(l);mxUtils.write(g,f);k.appendChild(g);
+Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var n=this.getModel(),D=n.getChildCount(n.root),t=0;t<D;t++)mxUtils.bind(this,function(E){function d(){n.isVisible(E)?(m.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(g,75)):(m.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(g,25))}var f=this.convertValueToString(E)||mxResources.get("background")||"Background",g=document.createElement("div");g.style.overflow=
+"hidden";g.style.textOverflow="ellipsis";g.style.padding="2px";g.style.whiteSpace="nowrap";g.style.cursor="pointer";g.setAttribute("title",mxResources.get(n.isVisible(E)?"hideIt":"show",[f]));var m=document.createElement("img");m.setAttribute("draggable","false");m.setAttribute("align","absmiddle");m.setAttribute("border","0");m.style.position="relative";m.style.width="16px";m.style.padding="0px 6px 0 4px";e&&(m.style.filter="invert(100%)",m.style.top="-2px");g.appendChild(m);mxUtils.write(g,f);k.appendChild(g);
mxEvent.addListener(g,"click",function(){n.setVisible(E,!n.isVisible(E));d();null!=b&&b(E)});d()})(n.getChildAt(n.root,t));return k};
Graph.prototype.replacePlaceholders=function(b,e,k,n){n=[];if(null!=e){for(var D=0;match=this.placeholderPattern.exec(e);){var t=match[0];if(2<t.length&&"%label%"!=t&&"%tooltip%"!=t){var E=null;if(match.index>D&&"%"==e.charAt(match.index-1))E=t.substring(1);else{var d=t.substring(1,t.length-1);if("id"==d)E=b.id;else if(0>d.indexOf("{"))for(var f=b;null==E&&null!=f;)null!=f.value&&"object"==typeof f.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(E=f.getAttribute(d+"_"+Graph.diagramLanguage)),
null==E&&(E=f.hasAttribute(d)?null!=f.getAttribute(d)?f.getAttribute(d):"":null)),f=this.model.getParent(f);null==E&&(E=this.getGlobalVariable(d));null==E&&null!=k&&(E=k[d])}n.push(e.substring(D,match.index)+(null!=E?E:t));D=match.index+t.length}}n.push(e.substring(D))}return n.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],k=0;k<b.length;k++){var n=this.model.getCell(b[k].id);null!=n&&e.push(n)}this.setSelectionCells(e)}else this.clearSelection()};
@@ -2366,13 +2370,13 @@ Graph.prototype.selectTableRange=function(b,e){var k=!1;if(this.isTableCell(b)&&
Graph.prototype.snapCellsToGrid=function(b,e){this.getModel().beginUpdate();try{for(var k=0;k<b.length;k++){var n=b[k],D=this.getCellGeometry(n);if(null!=D){D=D.clone();if(this.getModel().isVertex(n))D.x=Math.round(D.x/e)*e,D.y=Math.round(D.y/e)*e,D.width=Math.round(D.width/e)*e,D.height=Math.round(D.height/e)*e;else if(this.getModel().isEdge(n)&&null!=D.points)for(var t=0;t<D.points.length;t++)D.points[t].x=Math.round(D.points[t].x/e)*e,D.points[t].y=Math.round(D.points[t].y/e)*e;this.getModel().setGeometry(n,
D)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,e,k){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=k&&(mxEvent.isTouchEvent(e)?k.update(k.getState(this.view.getState(b[1]))):k.reset())):this.setSelectionCells(b)};
Graph.prototype.isCloneConnectSource=function(b){var e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=e&&e.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(b,e,k,n,D,t,E,d){t=t?t:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var f=this.isCloneConnectSource(b),g=f?b:this.getCompositeParent(b),l=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(g.geometry.x,g.geometry.y);e==mxConstants.DIRECTION_NORTH?(l.x+=g.geometry.width/2,l.y-=k):e==
-mxConstants.DIRECTION_SOUTH?(l.x+=g.geometry.width/2,l.y+=g.geometry.height+k):(l.x=e==mxConstants.DIRECTION_WEST?l.x-k:l.x+(g.geometry.width+k),l.y+=g.geometry.height/2);var q=this.view.getState(this.model.getParent(b));k=this.view.scale;var y=this.view.translate;g=y.x*k;y=y.y*k;null!=q&&this.model.isVertex(q.cell)&&(g=q.x,y=q.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(l.x+=b.parent.geometry.x,l.y+=b.parent.geometry.y);t=t?null:(new mxRectangle(g+l.x*k,y+l.y*k)).grow(40*k);t=null!=t?
+Graph.prototype.connectVertex=function(b,e,k,n,D,t,E,d){t=t?t:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var f=this.isCloneConnectSource(b),g=f?b:this.getCompositeParent(b),m=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(g.geometry.x,g.geometry.y);e==mxConstants.DIRECTION_NORTH?(m.x+=g.geometry.width/2,m.y-=k):e==
+mxConstants.DIRECTION_SOUTH?(m.x+=g.geometry.width/2,m.y+=g.geometry.height+k):(m.x=e==mxConstants.DIRECTION_WEST?m.x-k:m.x+(g.geometry.width+k),m.y+=g.geometry.height/2);var q=this.view.getState(this.model.getParent(b));k=this.view.scale;var y=this.view.translate;g=y.x*k;y=y.y*k;null!=q&&this.model.isVertex(q.cell)&&(g=q.x,y=q.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(m.x+=b.parent.geometry.x,m.y+=b.parent.geometry.y);t=t?null:(new mxRectangle(g+m.x*k,y+m.y*k)).grow(40*k);t=null!=t?
this.getCells(0,0,0,0,null,null,t,null,!0):null;q=this.view.getState(b);var F=null,C=null;if(null!=t){t=t.reverse();for(var H=0;H<t.length;H++)if(!this.isCellLocked(t[H])&&!this.model.isEdge(t[H])&&t[H]!=b)if(!this.model.isAncestor(b,t[H])&&this.isContainer(t[H])&&(null==F||t[H]==this.model.getParent(b)))F=t[H];else if(null==C&&this.isCellConnectable(t[H])&&!this.model.isAncestor(t[H],b)&&!this.isSwimlane(t[H])){var G=this.view.getState(t[H]);null==q||null==G||mxUtils.intersects(q,G)||(C=t[H])}}var aa=
-!mxEvent.isShiftDown(n)||mxEvent.isControlDown(n)||D;aa&&("1"!=urlParams.sketch||D)&&(e==mxConstants.DIRECTION_NORTH?l.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?l.y+=b.geometry.height/2:l.x=e==mxConstants.DIRECTION_WEST?l.x-b.geometry.width/2:l.x+b.geometry.width/2);var da=[],ba=C;C=F;D=mxUtils.bind(this,function(Y){if(null==E||null!=Y||null==C&&f){this.model.beginUpdate();try{if(null==ba&&aa){var qa=this.getAbsoluteParent(null!=Y?Y:b);qa=f?b:this.getCompositeParent(qa);ba=null!=Y?Y:this.duplicateCells([qa],
-!1)[0];null!=Y&&this.addCells([ba],this.model.getParent(b),null,null,null,!0);var O=this.getCellGeometry(ba);null!=O&&(null!=Y&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?l.y-=O.height/2:e==mxConstants.DIRECTION_SOUTH?l.y+=O.height/2:l.x=e==mxConstants.DIRECTION_WEST?l.x-O.width/2:l.x+O.width/2),O.x=l.x-O.width/2,O.y=l.y-O.height/2);null!=F?(this.addCells([ba],F,null,null,null,!0),C=null):aa&&!f&&this.addCells([ba],this.getDefaultParent(),null,null,null,!0)}var X=mxEvent.isControlDown(n)&&
+!mxEvent.isShiftDown(n)||mxEvent.isControlDown(n)||D;aa&&("1"!=urlParams.sketch||D)&&(e==mxConstants.DIRECTION_NORTH?m.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?m.y+=b.geometry.height/2:m.x=e==mxConstants.DIRECTION_WEST?m.x-b.geometry.width/2:m.x+b.geometry.width/2);var da=[],ba=C;C=F;D=mxUtils.bind(this,function(Y){if(null==E||null!=Y||null==C&&f){this.model.beginUpdate();try{if(null==ba&&aa){var qa=this.getAbsoluteParent(null!=Y?Y:b);qa=f?b:this.getCompositeParent(qa);ba=null!=Y?Y:this.duplicateCells([qa],
+!1)[0];null!=Y&&this.addCells([ba],this.model.getParent(b),null,null,null,!0);var O=this.getCellGeometry(ba);null!=O&&(null!=Y&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?m.y-=O.height/2:e==mxConstants.DIRECTION_SOUTH?m.y+=O.height/2:m.x=e==mxConstants.DIRECTION_WEST?m.x-O.width/2:m.x+O.width/2),O.x=m.x-O.width/2,O.y=m.y-O.height/2);null!=F?(this.addCells([ba],F,null,null,null,!0),C=null):aa&&!f&&this.addCells([ba],this.getDefaultParent(),null,null,null,!0)}var X=mxEvent.isControlDown(n)&&
mxEvent.isShiftDown(n)&&aa||null==C&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,ba,this.createCurrentEdgeStyle());if(null!=X&&this.connectionHandler.insertBeforeSource){var ea=null;for(Y=b;null!=Y.parent&&null!=Y.geometry&&Y.geometry.relative&&Y.parent!=X.parent;)Y=this.model.getParent(Y);null!=Y&&null!=Y.parent&&Y.parent==X.parent&&(ea=Y.parent.getIndex(Y),this.model.add(Y.parent,X,ea))}null==C&&null!=ba&&null!=b.parent&&f&&e==mxConstants.DIRECTION_WEST&&(ea=b.parent.getIndex(b),this.model.add(b.parent,
-ba,ea));null!=X&&da.push(X);null==C&&null!=ba&&da.push(ba);null==ba&&null!=X&&X.geometry.setTerminalPoint(l,!1);null!=X&&this.fireEvent(new mxEventObject("cellsInserted","cells",[X]))}finally{this.model.endUpdate()}}if(null!=d)d(da);else return da});if(null==E||null!=ba||!aa||null==C&&f)return D(ba);E(g+l.x*k,y+l.y*k,D)};
+ba,ea));null!=X&&da.push(X);null==C&&null!=ba&&da.push(ba);null==ba&&null!=X&&X.geometry.setTerminalPoint(m,!1);null!=X&&this.fireEvent(new mxEventObject("cellsInserted","cells",[X]))}finally{this.model.endUpdate()}}if(null!=d)d(da);else return da});if(null==E||null!=ba||!aa||null==C&&f)return D(ba);E(g+m.x*k,y+m.y*k,D)};
Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),k=[],n,D=0;D<b.length;D++)if(n=b[D],this.model.isVertex(n)||this.model.isEdge(n))this.isHtmlLabel(n)?(e.innerHTML=this.sanitizeHtml(this.getLabel(n)),n=mxUtils.extractTextWithWhitespace([e])):n=this.getLabel(n),n=mxUtils.trim(n.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<n.length&&k.push(n);return k.join(" ")};
Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var k=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var n=b;null==k&&null!=n;)null!=n.value&&"object"==typeof n.value&&(k=n.hasAttribute(e)?null!=n.getAttribute(e)?n.getAttribute(e):"":null),n=this.model.getParent(n)}else k=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=e.getAttribute("label_"+Graph.diagramLanguage)),
null==k&&(k=e.getAttribute("label")||"");return k||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null};
@@ -2381,8 +2385,8 @@ Graph.prototype.updateHorizontalStyle=function(b,e){if(null!=b&&null!=e&&null!=t
Graph.prototype.replaceDefaultColors=function(b,e){if(null!=e){b=mxUtils.hex2rgb(this.shapeBackgroundColor);var k=mxUtils.hex2rgb(this.shapeForegroundColor);this.replaceDefaultColor(e,mxConstants.STYLE_FONTCOLOR,k);this.replaceDefaultColor(e,mxConstants.STYLE_FILLCOLOR,b);this.replaceDefaultColor(e,mxConstants.STYLE_STROKECOLOR,k);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BORDER,k);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BACKGROUND,b);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BORDERCOLOR,
k);this.replaceDefaultColor(e,mxConstants.STYLE_SWIMLANE_FILLCOLOR,b);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,b)}return e};Graph.prototype.replaceDefaultColor=function(b,e,k){null!=b&&"default"==b[e]&&null!=k&&(b[e]=k)};
Graph.prototype.updateAlternateBounds=function(b,e,k){if(null!=b&&null!=e&&null!=this.layoutManager&&null!=e.alternateBounds){var n=this.layoutManager.getLayout(this.model.getParent(b));null!=n&&n.constructor==mxStackLayout&&(n.horizontal?e.alternateBounds.height=0:e.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,e){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(e.style,"moveCells","0")};
-Graph.prototype.foldCells=function(b,e,k,n,D){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var t=0;t<k.length;t++){var E=this.view.getState(k[t]),d=this.getCellGeometry(k[t]);if(null!=E&&null!=d){var f=Math.round(d.width-E.width/this.view.scale),g=Math.round(d.height-E.height/this.view.scale);if(0!=g||0!=f){var l=this.model.getParent(k[t]),q=this.layoutManager.getLayout(l);
-null==q?null!=D&&this.isMoveCellsEvent(D,E)&&this.moveSiblings(E,l,f,g):null!=D&&mxEvent.isAltDown(D)||q.constructor!=mxStackLayout||q.resizeLast||this.resizeParentStacks(l,q,f,g)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(k)}};
+Graph.prototype.foldCells=function(b,e,k,n,D){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var t=0;t<k.length;t++){var E=this.view.getState(k[t]),d=this.getCellGeometry(k[t]);if(null!=E&&null!=d){var f=Math.round(d.width-E.width/this.view.scale),g=Math.round(d.height-E.height/this.view.scale);if(0!=g||0!=f){var m=this.model.getParent(k[t]),q=this.layoutManager.getLayout(m);
+null==q?null!=D&&this.isMoveCellsEvent(D,E)&&this.moveSiblings(E,m,f,g):null!=D&&mxEvent.isAltDown(D)||q.constructor!=mxStackLayout||q.resizeLast||this.resizeParentStacks(m,q,f,g)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(k)}};
Graph.prototype.moveSiblings=function(b,e,k,n){this.model.beginUpdate();try{var D=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<D.length;e++)if(D[e]!=b.cell){var t=this.view.getState(D[e]),E=this.getCellGeometry(D[e]);null!=t&&null!=E&&(E=E.clone(),E.translate(Math.round(k*Math.max(0,Math.min(1,(t.x-b.x)/b.width))),Math.round(n*Math.max(0,Math.min(1,(t.y-b.y)/b.height)))),this.model.setGeometry(D[e],E))}}finally{this.model.endUpdate()}};
Graph.prototype.resizeParentStacks=function(b,e,k,n){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var D=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==D&&!e.resizeLast;){var t=this.getCellGeometry(b),E=this.view.getState(b);null!=E&&null!=t&&(t=t.clone(),e.horizontal?t.width+=k+Math.min(0,E.width/this.view.scale-t.width):t.height+=n+Math.min(0,E.height/this.view.scale-t.height),this.model.setGeometry(b,
t));b=this.model.getParent(b);e=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var e=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=e.container:"1"==e.container};Graph.prototype.isCellConnectable=function(b){var e=this.getCurrentCellStyle(b);return null!=e.connectable?"0"!=e.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
@@ -2419,7 +2423,7 @@ HoverIcons.prototype.click=function(b,e,k){var n=k.getEvent(),D=k.getGraphX(),t=
HoverIcons.prototype.execute=function(b,e,k){k=k.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,e,this.graph.defaultEdgeLength,k,this.graph.isCloneEvent(k),this.graph.isCloneEvent(k)),k,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing);
var e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(e=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var k=null;null!=e&&(b.x-=e.horizontalOffset/2,b.y-=e.verticalOffset/2,b.width+=e.horizontalOffset,b.height+=e.verticalOffset,null!=e.rotationShape&&null!=e.rotationShape.node&&"hidden"!=e.rotationShape.node.style.visibility&&"none"!=e.rotationShape.node.style.display&&null!=e.rotationShape.boundingBox&&
-(k=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(d,f,g){if(null!=k){var l=new mxRectangle(f,g,d.clientWidth,d.clientHeight);mxUtils.intersects(l,k)&&(d==this.arrowUp?g-=l.y+l.height-k.y:d==this.arrowRight?f+=k.x+k.width-l.x:d==this.arrowDown?g+=k.y+k.height-l.y:d==this.arrowLeft&&(f-=l.x+l.width-k.x))}d.style.left=f+"px";d.style.top=g+"px";mxUtils.setOpacity(d,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
+(k=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(d,f,g){if(null!=k){var m=new mxRectangle(f,g,d.clientWidth,d.clientHeight);mxUtils.intersects(m,k)&&(d==this.arrowUp?g-=m.y+m.height-k.y:d==this.arrowRight?f+=k.x+k.width-m.x:d==this.arrowDown?g+=k.y+k.height-m.y:d==this.arrowLeft&&(f-=m.x+m.width-k.x))}d.style.left=f+"px";d.style.top=g+"px";mxUtils.setOpacity(d,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
this.triangleUp.height-this.tolerance));e(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));e(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));e(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){e=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());
var n=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),D=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==n&&n==D&&D==b&&(b=D=n=e=null);var t=this.graph.getCellGeometry(this.currentState.cell),E=mxUtils.bind(this,function(d,f){var g=this.graph.model.isVertex(d)&&this.graph.getCellGeometry(d);null==d||this.graph.model.isAncestor(d,
this.currentState.cell)||this.graph.isSwimlane(d)||!(null==g||null==t||g.height<3*t.height&&g.width<3*t.width)?f.style.visibility="visible":f.style.visibility="hidden"});E(e,this.arrowRight);E(n,this.arrowLeft);E(D,this.arrowUp);E(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
@@ -2436,36 +2440,36 @@ Graph.prototype.setTableValues=function(b,e,k){for(var n=this.model.getChildCell
Graph.prototype.createCrossFunctionalSwimlane=function(b,e,k,n,D,t,E,d,f){k=null!=k?k:120;n=null!=n?n:120;E=null!=E?E:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";d=null!=d?d:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
f=null!=f?f:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";D=this.createVertex(null,null,null!=D?D:"",0,0,e*k,b*n,null!=t?t:"shape=table;childLayout=tableLayout;"+(null==D?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");t=mxUtils.getValue(this.getCellStyle(D),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);D.geometry.width+=t;D.geometry.height+=t;E=this.createVertex(null,
null,"",0,t,e*k+t,n,E);D.insert(this.createParent(E,this.createVertex(null,null,"",t,0,k,n,d),e,k,0));return 1<b?(E.geometry.y=n+t,this.createParent(D,this.createParent(E,this.createVertex(null,null,"",t,0,k,n,f),e,k,0),b-1,0,n)):D};
-Graph.prototype.visitTableCells=function(b,e){var k=null,n=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var D=0;D<n.length;D++){for(var t=this.getActualStartSize(n[D],!0),E=this.model.getChildCells(n[D],!0),d=this.getCellStyle(n[D],!0),f=null,g=[],l=0;l<E.length;l++){var q=this.getCellGeometry(E[l]),y={cell:E[l],rospan:1,colspan:1,row:D,col:l,geo:q};q=null!=q.alternateBounds?q.alternateBounds:q;y.point=new mxPoint(q.width+(null!=f?f.point.x:b.x+t.x),q.height+(null!=k&&null!=
-k[0]?k[0].point.y:b.y+t.y));y.actual=y;null!=k&&null!=k[l]&&1<k[l].rowspan?(y.rowspan=k[l].rowspan-1,y.colspan=k[l].colspan,y.actual=k[l].actual):null!=f&&1<f.colspan?(y.rowspan=f.rowspan,y.colspan=f.colspan-1,y.actual=f.actual):(f=this.getCurrentCellStyle(E[l],!0),null!=f&&(y.rowspan=parseInt(f.rowspan||1),y.colspan=parseInt(f.colspan||1)));f=1==mxUtils.getValue(d,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(d,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(y,E.length,
+Graph.prototype.visitTableCells=function(b,e){var k=null,n=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var D=0;D<n.length;D++){for(var t=this.getActualStartSize(n[D],!0),E=this.model.getChildCells(n[D],!0),d=this.getCellStyle(n[D],!0),f=null,g=[],m=0;m<E.length;m++){var q=this.getCellGeometry(E[m]),y={cell:E[m],rospan:1,colspan:1,row:D,col:m,geo:q};q=null!=q.alternateBounds?q.alternateBounds:q;y.point=new mxPoint(q.width+(null!=f?f.point.x:b.x+t.x),q.height+(null!=k&&null!=
+k[0]?k[0].point.y:b.y+t.y));y.actual=y;null!=k&&null!=k[m]&&1<k[m].rowspan?(y.rowspan=k[m].rowspan-1,y.colspan=k[m].colspan,y.actual=k[m].actual):null!=f&&1<f.colspan?(y.rowspan=f.rowspan,y.colspan=f.colspan-1,y.actual=f.actual):(f=this.getCurrentCellStyle(E[m],!0),null!=f&&(y.rowspan=parseInt(f.rowspan||1),y.colspan=parseInt(f.colspan||1)));f=1==mxUtils.getValue(d,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(d,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(y,E.length,
n.length,b.x+(f?t.x:0),b.y+(f?t.y:0));g.push(y);f=y}k=g}};Graph.prototype.getTableLines=function(b,e,k){var n=[],D=[];(e||k)&&this.visitTableCells(b,mxUtils.bind(this,function(t,E,d,f,g){e&&t.row<d-1&&(null==n[t.row]&&(n[t.row]=[new mxPoint(f,t.point.y)]),1<t.rowspan&&n[t.row].push(null),n[t.row].push(t.point));k&&t.col<E-1&&(null==D[t.col]&&(D[t.col]=[new mxPoint(t.point.x,g)]),1<t.colspan&&D[t.col].push(null),D[t.col].push(t.point))}));return n.concat(D)};
Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};
Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};
-Graph.prototype.setTableRowHeight=function(b,e,k){k=null!=k?k:!0;var n=this.getModel();n.beginUpdate();try{var D=this.getCellGeometry(b);if(null!=D){D=D.clone();D.height+=e;n.setGeometry(b,D);var t=n.getParent(b),E=n.getChildCells(t,!0);if(!k){var d=mxUtils.indexOf(E,b);if(d<E.length-1){var f=E[d+1],g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.y+=e,g.height-=e,n.setGeometry(f,g))}}var l=this.getCellGeometry(t);null!=l&&(k||(k=b==E[E.length-1]),k&&(l=l.clone(),l.height+=e,n.setGeometry(t,l)))}}finally{n.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,e,k){k=null!=k?k:!1;var n=this.getModel(),D=n.getParent(b),t=n.getParent(D),E=n.getChildCells(D,!0);b=mxUtils.indexOf(E,b);var d=b==E.length-1;n.beginUpdate();try{for(var f=n.getChildCells(t,!0),g=0;g<f.length;g++){D=f[g];E=n.getChildCells(D,!0);var l=E[b],q=this.getCellGeometry(l);null!=q&&(q=q.clone(),q.width+=e,null!=q.alternateBounds&&(q.alternateBounds.width+=e),n.setGeometry(l,q));b<E.length-1&&(l=E[b+1],q=this.getCellGeometry(l),null!=q&&(q=q.clone(),
-q.x+=e,k||(q.width-=e,null!=q.alternateBounds&&(q.alternateBounds.width-=e)),n.setGeometry(l,q)))}if(d||k){var y=this.getCellGeometry(t);null!=y&&(y=y.clone(),y.width+=e,n.setGeometry(t,y))}null!=this.layoutManager&&this.layoutManager.executeLayout(t)}finally{n.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+Graph.prototype.setTableRowHeight=function(b,e,k){k=null!=k?k:!0;var n=this.getModel();n.beginUpdate();try{var D=this.getCellGeometry(b);if(null!=D){D=D.clone();D.height+=e;n.setGeometry(b,D);var t=n.getParent(b),E=n.getChildCells(t,!0);if(!k){var d=mxUtils.indexOf(E,b);if(d<E.length-1){var f=E[d+1],g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.y+=e,g.height-=e,n.setGeometry(f,g))}}var m=this.getCellGeometry(t);null!=m&&(k||(k=b==E[E.length-1]),k&&(m=m.clone(),m.height+=e,n.setGeometry(t,m)))}}finally{n.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(b,e,k){k=null!=k?k:!1;var n=this.getModel(),D=n.getParent(b),t=n.getParent(D),E=n.getChildCells(D,!0);b=mxUtils.indexOf(E,b);var d=b==E.length-1;n.beginUpdate();try{for(var f=n.getChildCells(t,!0),g=0;g<f.length;g++){D=f[g];E=n.getChildCells(D,!0);var m=E[b],q=this.getCellGeometry(m);null!=q&&(q=q.clone(),q.width+=e,null!=q.alternateBounds&&(q.alternateBounds.width+=e),n.setGeometry(m,q));b<E.length-1&&(m=E[b+1],q=this.getCellGeometry(m),null!=q&&(q=q.clone(),
+q.x+=e,k||(q.width-=e,null!=q.alternateBounds&&(q.alternateBounds.width-=e)),n.setGeometry(m,q)))}if(d||k){var y=this.getCellGeometry(t);null!=y&&(y=y.clone(),y.width+=e,n.setGeometry(t,y))}null!=this.layoutManager&&this.layoutManager.executeLayout(t)}finally{n.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,e){for(var k=0,n=0;n<b.length;n++)if(!this.isVertexIgnored(b[n])){var D=this.graph.getCellGeometry(b[n]);null!=D&&(k+=e?D.width:D.height)}return k};
TableLayout.prototype.getRowLayout=function(b,e){var k=this.graph.model.getChildCells(b,!0),n=this.graph.getActualStartSize(b,!0);b=this.getSize(k,!0);e=e-n.x-n.width;var D=[];n=n.x;for(var t=0;t<k.length;t++){var E=this.graph.getCellGeometry(k[t]);null!=E&&(n+=(null!=E.alternateBounds?E.alternateBounds.width:E.width)*e/b,D.push(Math.round(n)))}return D};
TableLayout.prototype.layoutRow=function(b,e,k,n){var D=this.graph.getModel(),t=D.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var E=b.x,d=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var f=0;f<t.length;f++){var g=this.graph.getCellGeometry(t[f]);null!=g&&(g=g.clone(),g.y=b.y,g.height=k-b.y-b.height,null!=e?(g.x=e[f],g.width=e[f+1]-g.x,f==t.length-1&&f<e.length-2&&(g.width=n-g.x-b.x-b.width)):(g.x=E,E+=g.width,f==t.length-1?g.width=n-b.x-b.width-d:d+=g.width),g.alternateBounds=new mxRectangle(0,
0,g.width,g.height),D.setGeometry(t[f],g))}return d};
-TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),n=this.graph.getCellStyle(b),D="1"==mxUtils.getValue(n,"resizeLastRow","0"),t="1"==mxUtils.getValue(n,"resizeLast","0");n="1"==mxUtils.getValue(n,"fixedRows","0");var E=this.graph.getModel(),d=0;E.beginUpdate();try{for(var f=k.height-e.y-e.height,g=k.width-e.x-e.width,l=E.getChildCells(b,!0),q=0;q<l.length;q++)E.setVisible(l[q],!0);var y=this.getSize(l,!1);if(0<f&&0<g&&0<
-l.length&&0<y){if(D){var F=this.graph.getCellGeometry(l[l.length-1]);null!=F&&(F=F.clone(),F.height=f-y+F.height,E.setGeometry(l[l.length-1],F))}var C=t?null:this.getRowLayout(l[0],g),H=[],G=e.y;for(q=0;q<l.length;q++)F=this.graph.getCellGeometry(l[q]),null!=F&&(F=F.clone(),F.x=e.x,F.width=g,F.y=Math.round(G),G=D||n?G+F.height:G+F.height/y*f,F.height=Math.round(G)-F.y,E.setGeometry(l[q],F)),d=Math.max(d,this.layoutRow(l[q],C,F.height,g,H));n&&f<y&&(k=k.clone(),k.height=G+e.height,E.setGeometry(b,
+TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),n=this.graph.getCellStyle(b),D="1"==mxUtils.getValue(n,"resizeLastRow","0"),t="1"==mxUtils.getValue(n,"resizeLast","0");n="1"==mxUtils.getValue(n,"fixedRows","0");var E=this.graph.getModel(),d=0;E.beginUpdate();try{for(var f=k.height-e.y-e.height,g=k.width-e.x-e.width,m=E.getChildCells(b,!0),q=0;q<m.length;q++)E.setVisible(m[q],!0);var y=this.getSize(m,!1);if(0<f&&0<g&&0<
+m.length&&0<y){if(D){var F=this.graph.getCellGeometry(m[m.length-1]);null!=F&&(F=F.clone(),F.height=f-y+F.height,E.setGeometry(m[m.length-1],F))}var C=t?null:this.getRowLayout(m[0],g),H=[],G=e.y;for(q=0;q<m.length;q++)F=this.graph.getCellGeometry(m[q]),null!=F&&(F=F.clone(),F.x=e.x,F.width=g,F.y=Math.round(G),G=D||n?G+F.height:G+F.height/y*f,F.height=Math.round(G)-F.y,E.setGeometry(m[q],F)),d=Math.max(d,this.layoutRow(m[q],C,F.height,g,H));n&&f<y&&(k=k.clone(),k.height=G+e.height,E.setGeometry(b,
k));t&&g<d+Graph.minTableColumnWidth&&(k=k.clone(),k.width=d+e.width+e.x+Graph.minTableColumnWidth,E.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(aa){E.setVisible(aa.cell,aa.actual.cell==aa.cell);if(aa.actual.cell!=aa.cell){if(aa.actual.row==aa.row){var da=null!=aa.geo.alternateBounds?aa.geo.alternateBounds:aa.geo;aa.actual.geo.width+=da.width}aa.actual.col==aa.col&&(da=null!=aa.geo.alternateBounds?aa.geo.alternateBounds:aa.geo,aa.actual.geo.height+=da.height)}}))}else for(q=
-0;q<l.length;q++)E.setVisible(l[q],!1)}finally{E.endUpdate()}}};
-(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(l,q){q=null!=q?q:!0;var y=this.getState(l);null!=y&&q&&this.graph.model.isEdge(y.cell)&&null!=y.style&&1!=y.style[mxConstants.STYLE_CURVED]&&!y.invalid&&this.updateLineJumps(y)&&this.graph.cellRenderer.redraw(y,!1,this.isRendering());y=e.apply(this,
-arguments);null!=y&&q&&this.graph.model.isEdge(y.cell)&&null!=y.style&&1!=y.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(y);return y};var k=mxShape.prototype.paint;mxShape.prototype.paint=function(){k.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var l=this.node.getElementsByTagName("path");if(1<l.length){"1"!=mxUtils.getValue(this.state.style,
-mxConstants.STYLE_DASHED,"0")&&l[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var q=this.state.view.graph.getFlowAnimationStyle();null!=q&&l[1].setAttribute("class",q.getAttribute("id"))}}};var n=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(l,q){return n.apply(this,arguments)||null!=l.routedPoints&&null!=q.routedPoints&&!mxUtils.equalPoints(q.routedPoints,l.routedPoints)};var D=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
-function(l){D.apply(this,arguments);this.graph.model.isEdge(l.cell)&&1!=l.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(l)};mxGraphView.prototype.updateLineJumps=function(l){var q=l.absolutePoints;if(Graph.lineJumpsEnabled){var y=null!=l.routedPoints,F=null;if(null!=q&&null!=this.validEdges&&"none"!==mxUtils.getValue(l.style,"jumpStyle","none")){var C=function(ja,U,I){var V=new mxPoint(U,I);V.type=ja;F.push(V);V=null!=l.routedPoints?l.routedPoints[F.length-1]:null;return null==V||V.type!=
-ja||V.x!=U||V.y!=I},H=.5*this.scale;y=!1;F=[];for(var G=0;G<q.length-1;G++){for(var aa=q[G+1],da=q[G],ba=[],Y=q[G+2];G<q.length-2&&mxUtils.ptSegDistSq(da.x,da.y,Y.x,Y.y,aa.x,aa.y)<1*this.scale*this.scale;)aa=Y,G++,Y=q[G+2];y=C(0,da.x,da.y)||y;for(var qa=0;qa<this.validEdges.length;qa++){var O=this.validEdges[qa],X=O.absolutePoints;if(null!=X&&mxUtils.intersects(l,O)&&"1"!=O.style.noJump)for(O=0;O<X.length-1;O++){var ea=X[O+1],ka=X[O];for(Y=X[O+2];O<X.length-2&&mxUtils.ptSegDistSq(ka.x,ka.y,Y.x,Y.y,
+0;q<m.length;q++)E.setVisible(m[q],!1)}finally{E.endUpdate()}}};
+(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(m,q){q=null!=q?q:!0;var y=this.getState(m);null!=y&&q&&this.graph.model.isEdge(y.cell)&&null!=y.style&&1!=y.style[mxConstants.STYLE_CURVED]&&!y.invalid&&this.updateLineJumps(y)&&this.graph.cellRenderer.redraw(y,!1,this.isRendering());y=e.apply(this,
+arguments);null!=y&&q&&this.graph.model.isEdge(y.cell)&&null!=y.style&&1!=y.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(y);return y};var k=mxShape.prototype.paint;mxShape.prototype.paint=function(){k.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var m=this.node.getElementsByTagName("path");if(1<m.length){"1"!=mxUtils.getValue(this.state.style,
+mxConstants.STYLE_DASHED,"0")&&m[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var q=this.state.view.graph.getFlowAnimationStyle();null!=q&&m[1].setAttribute("class",q.getAttribute("id"))}}};var n=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(m,q){return n.apply(this,arguments)||null!=m.routedPoints&&null!=q.routedPoints&&!mxUtils.equalPoints(q.routedPoints,m.routedPoints)};var D=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
+function(m){D.apply(this,arguments);this.graph.model.isEdge(m.cell)&&1!=m.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(m)};mxGraphView.prototype.updateLineJumps=function(m){var q=m.absolutePoints;if(Graph.lineJumpsEnabled){var y=null!=m.routedPoints,F=null;if(null!=q&&null!=this.validEdges&&"none"!==mxUtils.getValue(m.style,"jumpStyle","none")){var C=function(ja,U,I){var V=new mxPoint(U,I);V.type=ja;F.push(V);V=null!=m.routedPoints?m.routedPoints[F.length-1]:null;return null==V||V.type!=
+ja||V.x!=U||V.y!=I},H=.5*this.scale;y=!1;F=[];for(var G=0;G<q.length-1;G++){for(var aa=q[G+1],da=q[G],ba=[],Y=q[G+2];G<q.length-2&&mxUtils.ptSegDistSq(da.x,da.y,Y.x,Y.y,aa.x,aa.y)<1*this.scale*this.scale;)aa=Y,G++,Y=q[G+2];y=C(0,da.x,da.y)||y;for(var qa=0;qa<this.validEdges.length;qa++){var O=this.validEdges[qa],X=O.absolutePoints;if(null!=X&&mxUtils.intersects(m,O)&&"1"!=O.style.noJump)for(O=0;O<X.length-1;O++){var ea=X[O+1],ka=X[O];for(Y=X[O+2];O<X.length-2&&mxUtils.ptSegDistSq(ka.x,ka.y,Y.x,Y.y,
ea.x,ea.y)<1*this.scale*this.scale;)ea=Y,O++,Y=X[O+2];Y=mxUtils.intersection(da.x,da.y,aa.x,aa.y,ka.x,ka.y,ea.x,ea.y);if(null!=Y&&(Math.abs(Y.x-da.x)>H||Math.abs(Y.y-da.y)>H)&&(Math.abs(Y.x-aa.x)>H||Math.abs(Y.y-aa.y)>H)&&(Math.abs(Y.x-ka.x)>H||Math.abs(Y.y-ka.y)>H)&&(Math.abs(Y.x-ea.x)>H||Math.abs(Y.y-ea.y)>H)){ea=Y.x-da.x;ka=Y.y-da.y;Y={distSq:ea*ea+ka*ka,x:Y.x,y:Y.y};for(ea=0;ea<ba.length;ea++)if(ba[ea].distSq>Y.distSq){ba.splice(ea,0,Y);Y=null;break}null==Y||0!=ba.length&&ba[ba.length-1].x===
-Y.x&&ba[ba.length-1].y===Y.y||ba.push(Y)}}}for(O=0;O<ba.length;O++)y=C(1,ba[O].x,ba[O].y)||y}Y=q[q.length-1];y=C(0,Y.x,Y.y)||y}l.routedPoints=F;return y}return!1};var t=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(l,q,y){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)t.apply(this,arguments);else{var F=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2,C=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,H=mxUtils.getValue(this.style,"jumpStyle","none"),G=!0,aa=null,da=null,ba=[],Y=null;l.begin();for(var qa=0;qa<this.state.routedPoints.length;qa++){var O=this.state.routedPoints[qa],X=new mxPoint(O.x/this.scale,O.y/this.scale);0==qa?X=q[0]:qa==this.state.routedPoints.length-1&&(X=q[q.length-1]);var ea=!1;if(null!=aa&&1==O.type){var ka=this.state.routedPoints[qa+1];O=ka.x/this.scale-
-X.x;ka=ka.y/this.scale-X.y;O=O*O+ka*ka;null==Y&&(Y=new mxPoint(X.x-aa.x,X.y-aa.y),da=Math.sqrt(Y.x*Y.x+Y.y*Y.y),0<da?(Y.x=Y.x*C/da,Y.y=Y.y*C/da):Y=null);O>C*C&&0<da&&(O=aa.x-X.x,ka=aa.y-X.y,O=O*O+ka*ka,O>C*C&&(ea=new mxPoint(X.x-Y.x,X.y-Y.y),O=new mxPoint(X.x+Y.x,X.y+Y.y),ba.push(ea),this.addPoints(l,ba,y,F,!1,null,G),ba=0>Math.round(Y.x)||0==Math.round(Y.x)&&0>=Math.round(Y.y)?1:-1,G=!1,"sharp"==H?(l.lineTo(ea.x-Y.y*ba,ea.y+Y.x*ba),l.lineTo(O.x-Y.y*ba,O.y+Y.x*ba),l.lineTo(O.x,O.y)):"line"==H?(l.moveTo(ea.x+
-Y.y*ba,ea.y-Y.x*ba),l.lineTo(ea.x-Y.y*ba,ea.y+Y.x*ba),l.moveTo(O.x-Y.y*ba,O.y+Y.x*ba),l.lineTo(O.x+Y.y*ba,O.y-Y.x*ba),l.moveTo(O.x,O.y)):"arc"==H?(ba*=1.3,l.curveTo(ea.x-Y.y*ba,ea.y+Y.x*ba,O.x-Y.y*ba,O.y+Y.x*ba,O.x,O.y)):(l.moveTo(O.x,O.y),G=!0),ba=[O],ea=!0))}else Y=null;ea||(ba.push(X),aa=X)}this.addPoints(l,ba,y,F,!1,null,G);l.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(l,q,y,F){return null!=q&&"centerPerimeter"==q.style[mxConstants.STYLE_PERIMETER]?
-new mxPoint(q.getCenterX(),q.getCenterY()):E.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(l,q,y,F){if(null==q||null==l||"1"!=q.style.snapToPoint&&"1"!=l.style.snapToPoint)d.apply(this,arguments);else{q=this.getTerminalPort(l,q,F);var C=this.getNextPoint(l,y,F),H=this.graph.isOrthogonal(l),G=mxUtils.toRadians(Number(q.style[mxConstants.STYLE_ROTATION]||"0")),aa=new mxPoint(q.getCenterX(),q.getCenterY());if(0!=
-G){var da=Math.cos(-G),ba=Math.sin(-G);C=mxUtils.getRotatedPoint(C,da,ba,aa)}da=parseFloat(l.style[mxConstants.STYLE_PERIMETER_SPACING]||0);da+=parseFloat(l.style[F?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);C=this.getPerimeterPoint(q,C,0==G&&H,da);0!=G&&(da=Math.cos(G),ba=Math.sin(G),C=mxUtils.getRotatedPoint(C,da,ba,aa));l.setAbsoluteTerminalPoint(this.snapToAnchorPoint(l,q,y,F,C),F)}};mxGraphView.prototype.snapToAnchorPoint=function(l,q,y,F,C){if(null!=
-q&&null!=l){l=this.graph.getAllConnectionConstraints(q);F=y=null;if(null!=l)for(var H=0;H<l.length;H++){var G=this.graph.getConnectionPoint(q,l[H]);if(null!=G){var aa=(G.x-C.x)*(G.x-C.x)+(G.y-C.y)*(G.y-C.y);if(null==F||aa<F)y=G,F=aa}}null!=y&&(C=y)}return C};var f=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(l,q,y){var F=f.apply(this,arguments);"1"==l.getAttribute("placeholders")&&null!=y.state&&(F=y.state.view.graph.replacePlaceholders(y.state.cell,
-F));return F};var g=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(l){if(null!=l.style&&"undefined"!==typeof pako){var q=mxUtils.getValue(l.style,mxConstants.STYLE_SHAPE,null);if(null!=q&&"string"===typeof q&&"stencil("==q.substring(0,8))try{var y=q.substring(8,q.length-1),F=mxUtils.parseXml(Graph.decompress(y));return new mxShape(new mxStencil(F.documentElement))}catch(C){null!=window.console&&console.log("Error in shape: "+C)}}return g.apply(this,arguments)}})();
+Y.x&&ba[ba.length-1].y===Y.y||ba.push(Y)}}}for(O=0;O<ba.length;O++)y=C(1,ba[O].x,ba[O].y)||y}Y=q[q.length-1];y=C(0,Y.x,Y.y)||y}m.routedPoints=F;return y}return!1};var t=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(m,q,y){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)t.apply(this,arguments);else{var F=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2,C=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,H=mxUtils.getValue(this.style,"jumpStyle","none"),G=!0,aa=null,da=null,ba=[],Y=null;m.begin();for(var qa=0;qa<this.state.routedPoints.length;qa++){var O=this.state.routedPoints[qa],X=new mxPoint(O.x/this.scale,O.y/this.scale);0==qa?X=q[0]:qa==this.state.routedPoints.length-1&&(X=q[q.length-1]);var ea=!1;if(null!=aa&&1==O.type){var ka=this.state.routedPoints[qa+1];O=ka.x/this.scale-
+X.x;ka=ka.y/this.scale-X.y;O=O*O+ka*ka;null==Y&&(Y=new mxPoint(X.x-aa.x,X.y-aa.y),da=Math.sqrt(Y.x*Y.x+Y.y*Y.y),0<da?(Y.x=Y.x*C/da,Y.y=Y.y*C/da):Y=null);O>C*C&&0<da&&(O=aa.x-X.x,ka=aa.y-X.y,O=O*O+ka*ka,O>C*C&&(ea=new mxPoint(X.x-Y.x,X.y-Y.y),O=new mxPoint(X.x+Y.x,X.y+Y.y),ba.push(ea),this.addPoints(m,ba,y,F,!1,null,G),ba=0>Math.round(Y.x)||0==Math.round(Y.x)&&0>=Math.round(Y.y)?1:-1,G=!1,"sharp"==H?(m.lineTo(ea.x-Y.y*ba,ea.y+Y.x*ba),m.lineTo(O.x-Y.y*ba,O.y+Y.x*ba),m.lineTo(O.x,O.y)):"line"==H?(m.moveTo(ea.x+
+Y.y*ba,ea.y-Y.x*ba),m.lineTo(ea.x-Y.y*ba,ea.y+Y.x*ba),m.moveTo(O.x-Y.y*ba,O.y+Y.x*ba),m.lineTo(O.x+Y.y*ba,O.y-Y.x*ba),m.moveTo(O.x,O.y)):"arc"==H?(ba*=1.3,m.curveTo(ea.x-Y.y*ba,ea.y+Y.x*ba,O.x-Y.y*ba,O.y+Y.x*ba,O.x,O.y)):(m.moveTo(O.x,O.y),G=!0),ba=[O],ea=!0))}else Y=null;ea||(ba.push(X),aa=X)}this.addPoints(m,ba,y,F,!1,null,G);m.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(m,q,y,F){return null!=q&&"centerPerimeter"==q.style[mxConstants.STYLE_PERIMETER]?
+new mxPoint(q.getCenterX(),q.getCenterY()):E.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(m,q,y,F){if(null==q||null==m||"1"!=q.style.snapToPoint&&"1"!=m.style.snapToPoint)d.apply(this,arguments);else{q=this.getTerminalPort(m,q,F);var C=this.getNextPoint(m,y,F),H=this.graph.isOrthogonal(m),G=mxUtils.toRadians(Number(q.style[mxConstants.STYLE_ROTATION]||"0")),aa=new mxPoint(q.getCenterX(),q.getCenterY());if(0!=
+G){var da=Math.cos(-G),ba=Math.sin(-G);C=mxUtils.getRotatedPoint(C,da,ba,aa)}da=parseFloat(m.style[mxConstants.STYLE_PERIMETER_SPACING]||0);da+=parseFloat(m.style[F?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);C=this.getPerimeterPoint(q,C,0==G&&H,da);0!=G&&(da=Math.cos(G),ba=Math.sin(G),C=mxUtils.getRotatedPoint(C,da,ba,aa));m.setAbsoluteTerminalPoint(this.snapToAnchorPoint(m,q,y,F,C),F)}};mxGraphView.prototype.snapToAnchorPoint=function(m,q,y,F,C){if(null!=
+q&&null!=m){m=this.graph.getAllConnectionConstraints(q);F=y=null;if(null!=m)for(var H=0;H<m.length;H++){var G=this.graph.getConnectionPoint(q,m[H]);if(null!=G){var aa=(G.x-C.x)*(G.x-C.x)+(G.y-C.y)*(G.y-C.y);if(null==F||aa<F)y=G,F=aa}}null!=y&&(C=y)}return C};var f=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(m,q,y){var F=f.apply(this,arguments);"1"==m.getAttribute("placeholders")&&null!=y.state&&(F=y.state.view.graph.replacePlaceholders(y.state.cell,
+F));return F};var g=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(m){if(null!=m.style&&"undefined"!==typeof pako){var q=mxUtils.getValue(m.style,mxConstants.STYLE_SHAPE,null);if(null!=q&&"string"===typeof q&&"stencil("==q.substring(0,8))try{var y=q.substring(8,q.length-1),F=mxUtils.parseXml(Graph.decompress(y));return new mxShape(new mxStencil(F.documentElement))}catch(C){null!=window.console&&console.log("Error in shape: "+C)}}return g.apply(this,arguments)}})();
mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};
mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var k=mxStencilRegistry.getBasenameForStencil(b);if(null!=k){e=mxStencilRegistry.libraries[k];if(null!=e){if(null==mxStencilRegistry.packages[k]){for(var n=0;n<e.length;n++){var D=e[n];if(!mxStencilRegistry.filesLoaded[D])if(mxStencilRegistry.filesLoaded[D]=!0,".xml"==D.toLowerCase().substring(D.length-4,D.length))mxStencilRegistry.loadStencilSet(D,
null);else if(".js"==D.toLowerCase().substring(D.length-3,D.length))try{if(mxStencilRegistry.allowEval){var t=mxUtils.load(D);null!=t&&200<=t.getStatus()&&299>=t.getStatus()&&eval.call(window,t.getText())}}catch(E){null!=window.console&&console.log("error in getStencil:",b,k,e,D,E)}}mxStencilRegistry.packages[k]=1}}else k=k.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+k+".xml",null);e=mxStencilRegistry.stencils[b]}}return e};
@@ -2492,9 +2496,9 @@ null,!0,!1));M=null;this.model.beginUpdate();try{M=f.apply(this,[z,L,M,T,ca,ia,m
mxConstants.NONE,[M]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[z]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[z]);var Ma=this.model.getTerminal(M,!1);if(null!=Ma){var Oa=this.getCurrentCellStyle(Ma);null!=Oa&&"1"==Oa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[M]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[M]))}}finally{this.model.endUpdate()}return M};
var g=Graph.prototype.selectCell;Graph.prototype.selectCell=function(z,L,M){if(L||M)g.apply(this,arguments);else{var T=this.getSelectionCell(),ca=null,ia=[],ma=mxUtils.bind(this,function(pa){if(null!=this.view.getState(pa)&&(this.model.isVertex(pa)||this.model.isEdge(pa)))if(ia.push(pa),pa==T)ca=ia.length-1;else if(z&&null==T&&0<ia.length||null!=ca&&z&&ia.length>ca||!z&&0<ca)return;for(var ua=0;ua<this.model.getChildCount(pa);ua++)ma(this.model.getChildAt(pa,ua))});ma(this.model.root);0<ia.length&&
(ca=null!=ca?mxUtils.mod(ca+(z?1:-1),ia.length):0,this.setSelectionCell(ia[ca]))}};Graph.prototype.swapShapes=function(z,L,M,T,ca,ia,ma){L=!1;if(!T&&null!=ca&&1==z.length&&(T=this.view.getState(ca),M=this.view.getState(z[0]),null!=T&&null!=M&&(null!=ia&&mxEvent.isShiftDown(ia)||"umlLifeline"==T.style.shape&&"umlLifeline"==M.style.shape)&&(T=this.getCellGeometry(ca),ia=this.getCellGeometry(z[0]),null!=T&&null!=ia))){L=T.clone();T=ia.clone();T.x=L.x;T.y=L.y;L.x=ia.x;L.y=ia.y;this.model.beginUpdate();
-try{this.model.setGeometry(ca,L),this.model.setGeometry(z[0],T)}finally{this.model.endUpdate()}L=!0}return L};var l=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,L,M,T,ca,ia,ma){if(this.swapShapes(z,L,M,T,ca,ia,ma))return z;ma=null!=ma?ma:{};if(this.isTable(ca)){for(var pa=[],ua=0;ua<z.length;ua++)this.isTable(z[ua])?pa=pa.concat(this.model.getChildCells(z[ua],!0).reverse()):pa.push(z[ua]);z=pa}this.model.beginUpdate();try{pa=[];for(ua=0;ua<z.length;ua++)if(null!=ca&&this.isTableRow(z[ua])){var ya=
+try{this.model.setGeometry(ca,L),this.model.setGeometry(z[0],T)}finally{this.model.endUpdate()}L=!0}return L};var m=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,L,M,T,ca,ia,ma){if(this.swapShapes(z,L,M,T,ca,ia,ma))return z;ma=null!=ma?ma:{};if(this.isTable(ca)){for(var pa=[],ua=0;ua<z.length;ua++)this.isTable(z[ua])?pa=pa.concat(this.model.getChildCells(z[ua],!0).reverse()):pa.push(z[ua]);z=pa}this.model.beginUpdate();try{pa=[];for(ua=0;ua<z.length;ua++)if(null!=ca&&this.isTableRow(z[ua])){var ya=
this.model.getParent(z[ua]),Fa=this.getCellGeometry(z[ua]);this.isTable(ya)&&pa.push(ya);if(null!=ya&&null!=Fa&&this.isTable(ya)&&this.isTable(ca)&&(T||ya!=ca)){if(!T){var Ma=this.getCellGeometry(ya);null!=Ma&&(Ma=Ma.clone(),Ma.height-=Fa.height,this.model.setGeometry(ya,Ma))}Ma=this.getCellGeometry(ca);null!=Ma&&(Ma=Ma.clone(),Ma.height+=Fa.height,this.model.setGeometry(ca,Ma));var Oa=this.model.getChildCells(ca,!0);if(0<Oa.length){z[ua]=T?this.cloneCell(z[ua]):z[ua];var Pa=this.model.getChildCells(z[ua],
-!0),Sa=this.model.getChildCells(Oa[0],!0),za=Sa.length-Pa.length;if(0<za)for(var wa=0;wa<za;wa++){var Da=this.cloneCell(Pa[Pa.length-1]);null!=Da&&(Da.value="",this.model.add(z[ua],Da))}else if(0>za)for(wa=0;wa>za;wa--)this.model.remove(Pa[Pa.length+wa-1]);Pa=this.model.getChildCells(z[ua],!0);for(wa=0;wa<Sa.length;wa++){var Ea=this.getCellGeometry(Sa[wa]),La=this.getCellGeometry(Pa[wa]);null!=Ea&&null!=La&&(La=La.clone(),La.width=Ea.width,this.model.setGeometry(Pa[wa],La))}}}}var Ta=l.apply(this,
+!0),Sa=this.model.getChildCells(Oa[0],!0),za=Sa.length-Pa.length;if(0<za)for(var wa=0;wa<za;wa++){var Da=this.cloneCell(Pa[Pa.length-1]);null!=Da&&(Da.value="",this.model.add(z[ua],Da))}else if(0>za)for(wa=0;wa>za;wa--)this.model.remove(Pa[Pa.length+wa-1]);Pa=this.model.getChildCells(z[ua],!0);for(wa=0;wa<Sa.length;wa++){var Ea=this.getCellGeometry(Sa[wa]),La=this.getCellGeometry(Pa[wa]);null!=Ea&&null!=La&&(La=La.clone(),La.width=Ea.width,this.model.setGeometry(Pa[wa],La))}}}}var Ta=m.apply(this,
arguments);for(ua=0;ua<pa.length;ua++)!T&&this.model.contains(pa[ua])&&0==this.model.getChildCount(pa[ua])&&this.model.remove(pa[ua]);T&&this.updateCustomLinks(this.createCellMapping(ma,this.createCellLookup(z)),Ta)}finally{this.model.endUpdate()}return Ta};var q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,L){var M=[];this.model.beginUpdate();try{for(var T=0;T<z.length;T++)if(this.isTableCell(z[T])){var ca=this.model.getParent(z[T]),ia=this.model.getParent(ca);1==this.model.getChildCount(ca)&&
1==this.model.getChildCount(ia)?0>mxUtils.indexOf(z,ia)&&0>mxUtils.indexOf(M,ia)&&M.push(ia):this.labelChanged(z[T],"")}else{if(this.isTableRow(z[T])&&(ia=this.model.getParent(z[T]),0>mxUtils.indexOf(z,ia)&&0>mxUtils.indexOf(M,ia))){for(var ma=this.model.getChildCells(ia,!0),pa=0,ua=0;ua<ma.length;ua++)0<=mxUtils.indexOf(z,ma[ua])&&pa++;pa==ma.length&&M.push(ia)}M.push(z[T])}M=q.apply(this,[M,L])}finally{this.model.endUpdate()}return M};Graph.prototype.updateCustomLinks=function(z,L,M){M=null!=M?
M:new Graph;for(var T=0;T<L.length;T++)null!=L[T]&&M.updateCustomLinksForCell(z,L[T],M)};Graph.prototype.updateCustomLinksForCell=function(z,L){this.doUpdateCustomLinksForCell(z,L);for(var M=this.model.getChildCount(L),T=0;T<M;T++)this.updateCustomLinksForCell(z,this.model.getChildAt(L,T))};Graph.prototype.doUpdateCustomLinksForCell=function(z,L){};Graph.prototype.getAllConnectionConstraints=function(z,L){if(null!=z){L=mxUtils.getValue(z.style,"points",null);if(null!=L){z=[];try{var M=JSON.parse(L);
@@ -2657,246 +2661,246 @@ var L=this.cornerHandles,M=L[0].bounds.height/2;L[0].bounds.x=this.state.x-L[0].
function(){Ka.apply(this,arguments);if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)null!=this.moveHandles[z]&&null!=this.moveHandles[z].parentNode&&this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}if(null!=this.cornerHandles){for(z=0;z<this.cornerHandles.length;z++)null!=this.cornerHandles[z]&&null!=this.cornerHandles[z].node&&null!=this.cornerHandles[z].node.parentNode&&this.cornerHandles[z].node.parentNode.removeChild(this.cornerHandles[z].node);
this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var bb=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=
function(){if(null!=this.marker&&(bb.apply(this),null!=this.state&&null!=this.linkHint)){var z=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(z=new mxRectangle(z.x,z.y,z.width,z.height),z.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(z.y+z.height+Editor.hintOffset)+"px"}};var Va=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Va.apply(this,arguments);
-null!=this.linkHint&&(this.linkHint.style.visibility="")};var $a=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){$a.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,m,x){mxShape.call(this);this.line=c;this.stroke=m;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function E(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function l(){mxShape.call(this)}function q(){mxShape.call(this)}
-function y(c,m,x,p){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=x;this.strokewidth=null!=p?p:1}function F(){mxActor.call(this)}function C(){mxCylinder.call(this)}function H(){mxCylinder.call(this)}function G(){mxActor.call(this)}function aa(){mxActor.call(this)}function da(){mxActor.call(this)}function ba(){mxActor.call(this)}function Y(){mxActor.call(this)}function qa(){mxActor.call(this)}function O(){mxActor.call(this)}function X(c,m){this.canvas=c;this.canvas.setLineJoin("round");
-this.canvas.setLineCap("round");this.defaultVariation=m;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,X.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,X.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,X.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,X.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
+null!=this.linkHint&&(this.linkHint.style.visibility="")};var $a=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){$a.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,l,x){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function E(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function m(){mxShape.call(this)}function q(){mxShape.call(this)}
+function y(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1}function F(){mxActor.call(this)}function C(){mxCylinder.call(this)}function H(){mxCylinder.call(this)}function G(){mxActor.call(this)}function aa(){mxActor.call(this)}function da(){mxActor.call(this)}function ba(){mxActor.call(this)}function Y(){mxActor.call(this)}function qa(){mxActor.call(this)}function O(){mxActor.call(this)}function X(c,l){this.canvas=c;this.canvas.setLineJoin("round");
+this.canvas.setLineCap("round");this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,X.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,X.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,X.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,X.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
X.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,X.prototype.arcTo)}function ea(){mxRectangleShape.call(this)}function ka(){mxRectangleShape.call(this)}function ja(){mxActor.call(this)}function U(){mxActor.call(this)}function I(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function Q(){mxRectangleShape.call(this)}function R(){mxCylinder.call(this)}function fa(){mxShape.call(this)}function la(){mxShape.call(this)}function ra(){mxEllipse.call(this)}
function u(){mxShape.call(this)}function J(){mxShape.call(this)}function N(){mxRectangleShape.call(this)}function W(){mxShape.call(this)}function S(){mxShape.call(this)}function P(){mxShape.call(this)}function Z(){mxShape.call(this)}function oa(){mxShape.call(this)}function va(){mxCylinder.call(this)}function Aa(){mxCylinder.call(this)}function sa(){mxRectangleShape.call(this)}function Ba(){mxDoubleEllipse.call(this)}function ta(){mxDoubleEllipse.call(this)}function Na(){mxArrowConnector.call(this);
this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Qa(){mxActor.call(this)}function Ua(){mxRectangleShape.call(this)}function Ka(){mxActor.call(this)}function bb(){mxActor.call(this)}function Va(){mxActor.call(this)}function $a(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function T(){mxActor.call(this)}function ca(){mxActor.call(this)}function ia(){mxActor.call(this)}function ma(){mxEllipse.call(this)}
-function pa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ya(){mxRhombus.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Pa(){mxEllipse.call(this)}function Sa(){mxActor.call(this)}function za(){mxActor.call(this)}function wa(){mxActor.call(this)}function Da(c,m,x,p){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
-!0;this.indent=2;this.rectOutline="single"}function Ea(){mxConnector.call(this)}function La(c,m,x,p,v,A,B,ha,K,xa){B+=K;var na=p.clone();p.x-=v*(2*B+K);p.y-=A*(2*B+K);v*=B+K;A*=B+K;return function(){c.ellipse(na.x-v-B,na.y-A-B,2*B,2*B);xa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var m=0;m<this.line.length;m++){var x=this.line[m];null!=x&&(x=new mxRectangle(x.x,x.y,this.strokewidth,this.strokewidth),null==
-c?c=x:c.add(x))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=function(c,m,x,p,v){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,m,x,p){if(null!=m){var v=null;c.begin();for(var A=0;A<m.length;A++){var B=m[A];null!=B&&(null==v?c.moveTo(B.x+x,B.y+p):null!=v&&c.lineTo(B.x+x,B.y+p));v=B}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var m=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var x=null,
-p=0;p<this.line.length&&!m;p++){var v=this.line[p];null!=v&&null!=x&&(m=mxUtils.rectangleIntersectsSegment(c,x,v));x=v}return m};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,m,x,p,v){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):
-!1,B=this.isHorizontal(),ha=this.getTitleSize();0==ha||this.outline?Oa.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-m,-x));A||this.outline||!(B&&ha<v||!B&&ha<p)||this.paintForeground(c,m,x,p,v)};e.prototype.paintForeground=function(c,m,x,p,v){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ha=A;A=B;B=ha}c.rotate(-this.getShapeRotation(),
-A,B,m+p/2,x+v/2);s=this.scale;m=this.bounds.x/s;x=this.bounds.y/s;p=this.bounds.width/s;v=this.bounds.height/s;this.paintTableForeground(c,m,x,p,v)}};e.prototype.paintTableForeground=function(c,m,x,p,v){p=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(v=0;v<p.length;v++)b.prototype.paintTableLine(c,p[v],m,x)};e.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?
-c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(n,mxCylinder);n.prototype.size=20;n.prototype.darkOpacity=0;n.prototype.darkOpacity2=0;n.prototype.paintVertexShape=function(c,m,x,p,v){var A=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,
-parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ha=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));c.translate(m,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(A,v);c.lineTo(0,v-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(p-A,0),c.lineTo(p,A),
+function pa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ya(){mxRhombus.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Pa(){mxEllipse.call(this)}function Sa(){mxActor.call(this)}function za(){mxActor.call(this)}function wa(){mxActor.call(this)}function Da(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
+!0;this.indent=2;this.rectOutline="single"}function Ea(){mxConnector.call(this)}function La(c,l,x,p,v,A,B,ha,K,xa){B+=K;var na=p.clone();p.x-=v*(2*B+K);p.y-=A*(2*B+K);v*=B+K;A*=B+K;return function(){c.ellipse(na.x-v-B,na.y-A-B,2*B,2*B);xa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var x=this.line[l];null!=x&&(x=new mxRectangle(x.x,x.y,this.strokewidth,this.strokewidth),null==
+c?c=x:c.add(x))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=function(c,l,x,p,v){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,l,x,p){if(null!=l){var v=null;c.begin();for(var A=0;A<l.length;A++){var B=l[A];null!=B&&(null==v?c.moveTo(B.x+x,B.y+p):null!=v&&c.lineTo(B.x+x,B.y+p));v=B}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var x=null,
+p=0;p<this.line.length&&!l;p++){var v=this.line[p];null!=v&&null!=x&&(l=mxUtils.rectangleIntersectsSegment(c,x,v));x=v}return l};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,l,x,p,v){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):
+!1,B=this.isHorizontal(),ha=this.getTitleSize();0==ha||this.outline?Oa.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-x));A||this.outline||!(B&&ha<v||!B&&ha<p)||this.paintForeground(c,l,x,p,v)};e.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ha=A;A=B;B=ha}c.rotate(-this.getShapeRotation(),
+A,B,l+p/2,x+v/2);s=this.scale;l=this.bounds.x/s;x=this.bounds.y/s;p=this.bounds.width/s;v=this.bounds.height/s;this.paintTableForeground(c,l,x,p,v)}};e.prototype.paintTableForeground=function(c,l,x,p,v){p=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(v=0;v<p.length;v++)b.prototype.paintTableLine(c,p[v],l,x)};e.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?
+c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(n,mxCylinder);n.prototype.size=20;n.prototype.darkOpacity=0;n.prototype.darkOpacity2=0;n.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,
+parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ha=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));c.translate(l,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(A,v);c.lineTo(0,v-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(p-A,0),c.lineTo(p,A),
c.lineTo(A,A),c.close(),c.fill()),0!=ha&&(c.setFillAlpha(Math.abs(ha)),c.setFillColor(0>ha?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A,A),c.lineTo(A,v),c.lineTo(0,v-A),c.close(),c.fill()),c.begin(),c.moveTo(A,v),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(p,A),c.end(),c.stroke())};n.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",
-n);var Ta=Math.tan(mxUtils.toRadians(30)),Wa=(.5-Ta)/2;mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(D,mxCylinder);D.prototype.size=6;D.prototype.paintVertexShape=function(c,m,x,p,v){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(m+.5*(p-A),x+.5*(v-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(m,x,p,v);c.fill()};mxCellRenderer.registerShape("waypoint",D);mxUtils.extend(t,mxActor);t.prototype.size=
-20;t.prototype.redrawPath=function(c,m,x,p,v){m=Math.min(p,v/Ta);c.translate((p-m)/2,(v-m)/2+m/4);c.moveTo(0,.25*m);c.lineTo(.5*m,m*Wa);c.lineTo(m,.25*m);c.lineTo(.5*m,(.5-Wa)*m);c.lineTo(0,.25*m);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,m,x,p,v,A){m=Math.min(p,v/(.5+Ta));A?(c.moveTo(0,.25*m),c.lineTo(.5*m,(.5-Wa)*m),c.lineTo(m,.25*m),c.moveTo(.5*m,(.5-Wa)*m),c.lineTo(.5*m,(1-Wa)*m)):(c.translate((p-
-m)/2,(v-m)/2),c.moveTo(0,.25*m),c.lineTo(.5*m,m*Wa),c.lineTo(m,.25*m),c.lineTo(m,.75*m),c.lineTo(.5*m,(1-Wa)*m),c.lineTo(0,.75*m),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(c,m,x,p,v,A){m=Math.min(v/2,Math.round(v/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,m),c.curveTo(0,2*m,p,2*m,p,m),A||(c.stroke(),c.begin()),c.translate(0,m/2),c.moveTo(0,m),c.curveTo(0,2*m,p,2*m,p,m),A||(c.stroke(),
-c.begin()),c.translate(0,m/2),c.moveTo(0,m),c.curveTo(0,2*m,p,2*m,p,m),A||(c.stroke(),c.begin()),c.translate(0,-m);A||(c.moveTo(0,m),c.curveTo(0,-m/3,p,-m/3,p,m),c.lineTo(p,v-m),c.curveTo(p,v+m/3,0,v+m/3,0,v-m),c.close())};d.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(f,mxCylinder);f.prototype.size=30;f.prototype.darkOpacity=0;f.prototype.paintVertexShape=
-function(c,m,x,p,v){var A=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(m,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(0,v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(p-A,0),c.lineTo(p-
-A,A),c.lineTo(p,A),c.close(),c.fill()),c.begin(),c.moveTo(p-A,0),c.lineTo(p-A,A),c.lineTo(p,A),c.end(),c.stroke())};mxCellRenderer.registerShape("note",f);mxUtils.extend(g,f);mxCellRenderer.registerShape("note2",g);g.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,0)}return null};mxUtils.extend(l,mxShape);l.prototype.isoAngle=15;l.prototype.paintVertexShape=
-function(c,m,x,p,v){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;A=Math.min(p*Math.tan(A),.5*v);c.translate(m,x);c.begin();c.moveTo(.5*p,0);c.lineTo(p,A);c.lineTo(p,v-A);c.lineTo(.5*p,v);c.lineTo(0,v-A);c.lineTo(0,A);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,A);c.lineTo(.5*p,2*A);c.lineTo(p,A);c.moveTo(.5*p,2*A);c.lineTo(.5*p,v);c.stroke()};mxCellRenderer.registerShape("isoCube2",l);mxUtils.extend(q,mxShape);
-q.prototype.size=15;q.prototype.paintVertexShape=function(c,m,x,p,v){var A=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(m,x);0==A?(c.rect(0,0,p,v),c.fillAndStroke()):(c.begin(),c.moveTo(0,A),c.arcTo(.5*p,A,0,0,1,.5*p,0),c.arcTo(.5*p,A,0,0,1,p,A),c.lineTo(p,v-A),c.arcTo(.5*p,A,0,0,1,.5*p,v),c.arcTo(.5*p,A,0,0,1,0,v-A),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(p,A),c.arcTo(.5*p,A,0,0,1,.5*p,2*A),c.arcTo(.5*p,A,0,0,1,0,A),c.stroke())};
-mxCellRenderer.registerShape("cylinder2",q);mxUtils.extend(y,mxCylinder);y.prototype.size=15;y.prototype.paintVertexShape=function(c,m,x,p,v){var A=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"lid",!0);c.translate(m,x);0==A?(c.rect(0,0,p,v),c.fillAndStroke()):(c.begin(),B?(c.moveTo(0,A),c.arcTo(.5*p,A,0,0,1,.5*p,0),c.arcTo(.5*p,A,0,0,1,p,A)):(c.moveTo(0,0),c.arcTo(.5*p,A,0,0,0,.5*p,A),c.arcTo(.5*p,A,0,0,0,p,0)),c.lineTo(p,v-A),
-c.arcTo(.5*p,A,0,0,1,.5*p,v),c.arcTo(.5*p,A,0,0,1,0,v-A),c.close(),c.fillAndStroke(),c.setShadow(!1),B&&(c.begin(),c.moveTo(p,A),c.arcTo(.5*p,A,0,0,1,.5*p,2*A),c.arcTo(.5*p,A,0,0,1,0,A),c.stroke()))};mxCellRenderer.registerShape("cylinder3",y);mxUtils.extend(F,mxActor);F.prototype.redrawPath=function(c,m,x,p,v){c.moveTo(0,0);c.quadTo(p/2,.5*v,p,0);c.quadTo(.5*p,v/2,p,v);c.quadTo(p/2,.5*v,0,v);c.quadTo(.5*p,v/2,0,0);c.end()};mxCellRenderer.registerShape("switch",F);mxUtils.extend(C,mxCylinder);C.prototype.tabWidth=
-60;C.prototype.tabHeight=20;C.prototype.tabPosition="right";C.prototype.arcSize=.1;C.prototype.paintVertexShape=function(c,m,x,p,v){c.translate(m,x);m=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),B=mxUtils.getValue(this.style,"rounded",!1),ha=mxUtils.getValue(this.style,"absoluteArcSize",!1),K=parseFloat(mxUtils.getValue(this.style,
-"arcSize",this.arcSize));ha||(K*=Math.min(p,v));K=Math.min(K,.5*p,.5*(v-x));m=Math.max(m,K);m=Math.min(p-K,m);B||(K=0);c.begin();"left"==A?(c.moveTo(Math.max(K,0),x),c.lineTo(Math.max(K,0),0),c.lineTo(m,0),c.lineTo(m,x)):(c.moveTo(p-m,x),c.lineTo(p-m,0),c.lineTo(p-Math.max(K,0),0),c.lineTo(p-Math.max(K,0),x));B?(c.moveTo(0,K+x),c.arcTo(K,K,0,0,1,K,x),c.lineTo(p-K,x),c.arcTo(K,K,0,0,1,p,K+x),c.lineTo(p,v-K),c.arcTo(K,K,0,0,1,p-K,v),c.lineTo(K,v),c.arcTo(K,K,0,0,1,0,v-K)):(c.moveTo(0,x),c.lineTo(p,
-x),c.lineTo(p,v),c.lineTo(0,v));c.close();c.fillAndStroke();c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(p-30,x+20),c.lineTo(p-20,x+10),c.lineTo(p-10,x+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",C);C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var x=mxUtils.getValue(this.style,
-"tabWidth",15)*this.scale;m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-m));p||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-x),Math.min(c.height,c.height-m)):new mxRectangle(Math.min(c.width,
-c.width-x),0,A,Math.min(c.height,c.height-m))}return new mxRectangle(0,Math.min(c.height,m),0,0)}return null};mxUtils.extend(H,mxCylinder);H.prototype.arcSize=.1;H.prototype.paintVertexShape=function(c,m,x,p,v){c.translate(m,x);var A=mxUtils.getValue(this.style,"rounded",!1),B=mxUtils.getValue(this.style,"absoluteArcSize",!1);m=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));x=mxUtils.getValue(this.style,"umlStateConnection",null);B||(m*=Math.min(p,v));m=Math.min(m,.5*p,.5*v);A||(m=
-0);A=0;null!=x&&(A=10);c.begin();c.moveTo(A,m);c.arcTo(m,m,0,0,1,A+m,0);c.lineTo(p-m,0);c.arcTo(m,m,0,0,1,p,m);c.lineTo(p,v-m);c.arcTo(m,m,0,0,1,p-m,v);c.lineTo(A+m,v);c.arcTo(m,m,0,0,1,A,v-m);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(p-40,v-20,10,10,3,3),c.stroke(),c.roundrect(p-20,v-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(p-30,v-15),c.lineTo(p-20,v-15),c.stroke());"connPointRefEntry"==x?(c.ellipse(0,.5*v-10,
+n);var Ta=Math.tan(mxUtils.toRadians(30)),Wa=(.5-Ta)/2;mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(D,mxCylinder);D.prototype.size=6;D.prototype.paintVertexShape=function(c,l,x,p,v){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(p-A),x+.5*(v-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,x,p,v);c.fill()};mxCellRenderer.registerShape("waypoint",D);mxUtils.extend(t,mxActor);t.prototype.size=
+20;t.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/Ta);c.translate((p-l)/2,(v-l)/2+l/4);c.moveTo(0,.25*l);c.lineTo(.5*l,l*Wa);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-Wa)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(p,v/(.5+Ta));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-Wa)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-Wa)*l),c.lineTo(.5*l,(1-Wa)*l)):(c.translate((p-
+l)/2,(v-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*Wa),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*l,(1-Wa)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(v/2,Math.round(v/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),
+c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,-l);A||(c.moveTo(0,l),c.curveTo(0,-l/3,p,-l/3,p,l),c.lineTo(p,v-l),c.curveTo(p,v+l/3,0,v+l/3,0,v-l),c.close())};d.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(f,mxCylinder);f.prototype.size=30;f.prototype.darkOpacity=0;f.prototype.paintVertexShape=
+function(c,l,x,p,v){var A=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(l,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(0,v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(p-A,0),c.lineTo(p-
+A,A),c.lineTo(p,A),c.close(),c.fill()),c.begin(),c.moveTo(p-A,0),c.lineTo(p-A,A),c.lineTo(p,A),c.end(),c.stroke())};mxCellRenderer.registerShape("note",f);mxUtils.extend(g,f);mxCellRenderer.registerShape("note2",g);g.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,0)}return null};mxUtils.extend(m,mxShape);m.prototype.isoAngle=15;m.prototype.paintVertexShape=
+function(c,l,x,p,v){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;A=Math.min(p*Math.tan(A),.5*v);c.translate(l,x);c.begin();c.moveTo(.5*p,0);c.lineTo(p,A);c.lineTo(p,v-A);c.lineTo(.5*p,v);c.lineTo(0,v-A);c.lineTo(0,A);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,A);c.lineTo(.5*p,2*A);c.lineTo(p,A);c.moveTo(.5*p,2*A);c.lineTo(.5*p,v);c.stroke()};mxCellRenderer.registerShape("isoCube2",m);mxUtils.extend(q,mxShape);
+q.prototype.size=15;q.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(l,x);0==A?(c.rect(0,0,p,v),c.fillAndStroke()):(c.begin(),c.moveTo(0,A),c.arcTo(.5*p,A,0,0,1,.5*p,0),c.arcTo(.5*p,A,0,0,1,p,A),c.lineTo(p,v-A),c.arcTo(.5*p,A,0,0,1,.5*p,v),c.arcTo(.5*p,A,0,0,1,0,v-A),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(p,A),c.arcTo(.5*p,A,0,0,1,.5*p,2*A),c.arcTo(.5*p,A,0,0,1,0,A),c.stroke())};
+mxCellRenderer.registerShape("cylinder2",q);mxUtils.extend(y,mxCylinder);y.prototype.size=15;y.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"lid",!0);c.translate(l,x);0==A?(c.rect(0,0,p,v),c.fillAndStroke()):(c.begin(),B?(c.moveTo(0,A),c.arcTo(.5*p,A,0,0,1,.5*p,0),c.arcTo(.5*p,A,0,0,1,p,A)):(c.moveTo(0,0),c.arcTo(.5*p,A,0,0,0,.5*p,A),c.arcTo(.5*p,A,0,0,0,p,0)),c.lineTo(p,v-A),
+c.arcTo(.5*p,A,0,0,1,.5*p,v),c.arcTo(.5*p,A,0,0,1,0,v-A),c.close(),c.fillAndStroke(),c.setShadow(!1),B&&(c.begin(),c.moveTo(p,A),c.arcTo(.5*p,A,0,0,1,.5*p,2*A),c.arcTo(.5*p,A,0,0,1,0,A),c.stroke()))};mxCellRenderer.registerShape("cylinder3",y);mxUtils.extend(F,mxActor);F.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.quadTo(p/2,.5*v,p,0);c.quadTo(.5*p,v/2,p,v);c.quadTo(p/2,.5*v,0,v);c.quadTo(.5*p,v/2,0,0);c.end()};mxCellRenderer.registerShape("switch",F);mxUtils.extend(C,mxCylinder);C.prototype.tabWidth=
+60;C.prototype.tabHeight=20;C.prototype.tabPosition="right";C.prototype.arcSize=.1;C.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),B=mxUtils.getValue(this.style,"rounded",!1),ha=mxUtils.getValue(this.style,"absoluteArcSize",!1),K=parseFloat(mxUtils.getValue(this.style,
+"arcSize",this.arcSize));ha||(K*=Math.min(p,v));K=Math.min(K,.5*p,.5*(v-x));l=Math.max(l,K);l=Math.min(p-K,l);B||(K=0);c.begin();"left"==A?(c.moveTo(Math.max(K,0),x),c.lineTo(Math.max(K,0),0),c.lineTo(l,0),c.lineTo(l,x)):(c.moveTo(p-l,x),c.lineTo(p-l,0),c.lineTo(p-Math.max(K,0),0),c.lineTo(p-Math.max(K,0),x));B?(c.moveTo(0,K+x),c.arcTo(K,K,0,0,1,K,x),c.lineTo(p-K,x),c.arcTo(K,K,0,0,1,p,K+x),c.lineTo(p,v-K),c.arcTo(K,K,0,0,1,p-K,v),c.lineTo(K,v),c.arcTo(K,K,0,0,1,0,v-K)):(c.moveTo(0,x),c.lineTo(p,
+x),c.lineTo(p,v),c.lineTo(0,v));c.close();c.fillAndStroke();c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(p-30,x+20),c.lineTo(p-20,x+10),c.lineTo(p-10,x+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",C);C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var x=mxUtils.getValue(this.style,
+"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));p||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-x),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,
+c.width-x),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(H,mxCylinder);H.prototype.arcSize=.1;H.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);var A=mxUtils.getValue(this.style,"rounded",!1),B=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));x=mxUtils.getValue(this.style,"umlStateConnection",null);B||(l*=Math.min(p,v));l=Math.min(l,.5*p,.5*v);A||(l=
+0);A=0;null!=x&&(A=10);c.begin();c.moveTo(A,l);c.arcTo(l,l,0,0,1,A+l,0);c.lineTo(p-l,0);c.arcTo(l,l,0,0,1,p,l);c.lineTo(p,v-l);c.arcTo(l,l,0,0,1,p-l,v);c.lineTo(A+l,v);c.arcTo(l,l,0,0,1,A,v-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(p-40,v-20,10,10,3,3),c.stroke(),c.roundrect(p-20,v-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(p-30,v-15),c.lineTo(p-20,v-15),c.stroke());"connPointRefEntry"==x?(c.ellipse(0,.5*v-10,
20,20),c.fillAndStroke()):"connPointRefExit"==x&&(c.ellipse(0,.5*v-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*v-5),c.lineTo(15,.5*v+5),c.moveTo(15,.5*v-5),c.lineTo(5,.5*v+5),c.stroke())};H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",H);mxUtils.extend(G,mxActor);G.prototype.size=30;G.prototype.isRoundable=
-function(){return!0};G.prototype.redrawPath=function(c,m,x,p,v){m=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,0),new mxPoint(p,0),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,m)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("card",G);mxUtils.extend(aa,mxActor);aa.prototype.size=.4;aa.prototype.redrawPath=function(c,m,
-x,p,v){m=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,m/2);c.quadTo(p/4,1.4*m,p/2,m/2);c.quadTo(3*p/4,m*(1-1.4),p,m/2);c.lineTo(p,v-m/2);c.quadTo(3*p/4,v-1.4*m,p/2,v-m/2);c.quadTo(p/4,v-m*(1-1.4),0,v-m/2);c.lineTo(0,m/2);c.close();c.end()};aa.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",this.size),x=c.width,p=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||
-this.direction==mxConstants.DIRECTION_WEST)return m*=p,new mxRectangle(c.x,c.y+m,x,p-2*m);m*=x;return new mxRectangle(c.x+m,c.y,x-2*m,p)}return c};mxCellRenderer.registerShape("tape",aa);mxUtils.extend(da,mxActor);da.prototype.size=.3;da.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};da.prototype.redrawPath=function(c,m,x,p,v){m=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));c.moveTo(0,0);c.lineTo(p,0);c.lineTo(p,v-m/2);c.quadTo(3*p/4,v-1.4*m,p/2,v-m/2);c.quadTo(p/4,v-m*(1-1.4),0,v-m/2);c.lineTo(0,m/2);c.close();c.end()};mxCellRenderer.registerShape("document",da);var fb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,m,x,p){var v=mxUtils.getValue(this.style,"size");return null!=v?p*Math.max(0,Math.min(1,v)):fb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
-"boundedLbl",!1)){var m=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*m),0,0)}return null};y.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(m/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*m*this.scale),0,Math.max(0,.3*m*this.scale))}return null};C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
-"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var x=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-m));p||(A=0);return"left"==
-mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-x),Math.min(c.height,c.height-m)):new mxRectangle(Math.min(c.width,c.width-x),0,A,Math.min(c.height,c.height-m))}return new mxRectangle(0,Math.min(c.height,m),0,0)}return null};H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};g.prototype.getLabelMargins=
-function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,Math.max(0,m*this.scale))}return null};mxUtils.extend(ba,mxActor);ba.prototype.size=.2;ba.prototype.fixedSize=20;ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(c,m,x,p,v){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):
-p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(m,0),new mxPoint(p,0),new mxPoint(p-m,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("parallelogram",ba);mxUtils.extend(Y,mxActor);Y.prototype.size=.2;Y.prototype.fixedSize=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(c,m,x,p,v){m="0"!=
-mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(m,0),new mxPoint(p-m,0),new mxPoint(p,v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("trapezoid",Y);mxUtils.extend(qa,mxActor);qa.prototype.size=
-.5;qa.prototype.redrawPath=function(c,m,x,p,v){c.setFillColor(null);m=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(p,0),new mxPoint(m,0),new mxPoint(m,v/2),new mxPoint(0,v/2),new mxPoint(m,v/2),new mxPoint(m,v),new mxPoint(p,v)],this.isRounded,x,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",qa);mxUtils.extend(O,mxActor);O.prototype.redrawPath=
-function(c,m,x,p,v){c.setStrokeWidth(1);c.setFillColor(this.stroke);m=p/5;c.rect(0,0,m,v);c.fillAndStroke();c.rect(2*m,0,m,v);c.fillAndStroke();c.rect(4*m,0,m,v);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",O);X.prototype.moveTo=function(c,m){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=m;this.firstX=c;this.firstY=m};X.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)};X.prototype.quadTo=function(c,m,x,p){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=x;this.lastY=p};X.prototype.curveTo=function(c,m,x,p,v,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=A};X.prototype.arcTo=function(c,m,x,p,v,A,B){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=B};X.prototype.lineTo=function(c,m){if(null!=this.lastX&&null!=this.lastY){var x=function(na){return"number"===
-typeof na?na?0>na?-1:1:na===na?0:NaN:NaN},p=Math.abs(c-this.lastX),v=Math.abs(m-this.lastY),A=Math.sqrt(p*p+v*v);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=m;return}var B=Math.round(A/10),ha=this.defaultVariation;5>B&&(B=5,ha/=3);var K=x(c-this.lastX)*p/B;x=x(m-this.lastY)*v/B;p/=A;v/=A;for(A=0;A<B;A++){var xa=(Math.random()-.5)*ha;this.originalLineTo.call(this.canvas,K*A+this.lastX-xa*v,x*A+this.lastY-xa*p)}this.originalLineTo.call(this.canvas,c,m)}else this.originalLineTo.apply(this.canvas,
-arguments);this.lastX=c;this.lastY=m};X.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var gb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){gb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};
+function(){return!0};G.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(p,0),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("card",G);mxUtils.extend(aa,mxActor);aa.prototype.size=.4;aa.prototype.redrawPath=function(c,l,
+x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,l/2);c.quadTo(p/4,1.4*l,p/2,l/2);c.quadTo(3*p/4,l*(1-1.4),p,l/2);c.lineTo(p,v-l/2);c.quadTo(3*p/4,v-1.4*l,p/2,v-l/2);c.quadTo(p/4,v-l*(1-1.4),0,v-l/2);c.lineTo(0,l/2);c.close();c.end()};aa.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",this.size),x=c.width,p=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||
+this.direction==mxConstants.DIRECTION_WEST)return l*=p,new mxRectangle(c.x,c.y+l,x,p-2*l);l*=x;return new mxRectangle(c.x+l,c.y,x-2*l,p)}return c};mxCellRenderer.registerShape("tape",aa);mxUtils.extend(da,mxActor);da.prototype.size=.3;da.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};da.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));c.moveTo(0,0);c.lineTo(p,0);c.lineTo(p,v-l/2);c.quadTo(3*p/4,v-1.4*l,p/2,v-l/2);c.quadTo(p/4,v-l*(1-1.4),0,v-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",da);var fb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,x,p){var v=mxUtils.getValue(this.style,"size");return null!=v?p*Math.max(0,Math.min(1,v)):fb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
+"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*l),0,0)}return null};y.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(l/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*l*this.scale),0,Math.max(0,.3*l*this.scale))}return null};C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
+"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var x=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));p||(A=0);return"left"==
+mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-x),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-x),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};g.prototype.getLabelMargins=
+function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(ba,mxActor);ba.prototype.size=.2;ba.prototype.fixedSize=20;ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):
+p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(l,0),new mxPoint(p,0),new mxPoint(p-l,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("parallelogram",ba);mxUtils.extend(Y,mxActor);Y.prototype.size=.2;Y.prototype.fixedSize=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(c,l,x,p,v){l="0"!=
+mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(l,0),new mxPoint(p-l,0),new mxPoint(p,v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("trapezoid",Y);mxUtils.extend(qa,mxActor);qa.prototype.size=
+.5;qa.prototype.redrawPath=function(c,l,x,p,v){c.setFillColor(null);l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(p,0),new mxPoint(l,0),new mxPoint(l,v/2),new mxPoint(0,v/2),new mxPoint(l,v/2),new mxPoint(l,v),new mxPoint(p,v)],this.isRounded,x,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",qa);mxUtils.extend(O,mxActor);O.prototype.redrawPath=
+function(c,l,x,p,v){c.setStrokeWidth(1);c.setFillColor(this.stroke);l=p/5;c.rect(0,0,l,v);c.fillAndStroke();c.rect(2*l,0,l,v);c.fillAndStroke();c.rect(4*l,0,l,v);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",O);X.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};X.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)};X.prototype.quadTo=function(c,l,x,p){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=x;this.lastY=p};X.prototype.curveTo=function(c,l,x,p,v,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=A};X.prototype.arcTo=function(c,l,x,p,v,A,B){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=B};X.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var x=function(na){return"number"===
+typeof na?na?0>na?-1:1:na===na?0:NaN:NaN},p=Math.abs(c-this.lastX),v=Math.abs(l-this.lastY),A=Math.sqrt(p*p+v*v);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var B=Math.round(A/10),ha=this.defaultVariation;5>B&&(B=5,ha/=3);var K=x(c-this.lastX)*p/B;x=x(l-this.lastY)*v/B;p/=A;v/=A;for(A=0;A<B;A++){var xa=(Math.random()-.5)*ha;this.originalLineTo.call(this.canvas,K*A+this.lastX-xa*v,x*A+this.lastY-xa*p)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,
+arguments);this.lastX=c;this.lastY=l};X.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var gb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){gb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};
var ib=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(c){ib.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new X(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var tb=mxRectangleShape.prototype.isHtmlAllowed;
-mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&tb.apply(this,arguments)};var qb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,m,x,p,v){if(null==c.handJiggle||c.handJiggle.constructor!=X)qb.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
+mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&tb.apply(this,arguments)};var qb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,x,p,v){if(null==c.handJiggle||c.handJiggle.constructor!=X)qb.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
"1"));if(A||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)A||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?A=Math.min(p/2,Math.min(v/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,A=Math.min(p*
-A,v*A)),c.moveTo(m+A,x),c.lineTo(m+p-A,x),c.quadTo(m+p,x,m+p,x+A),c.lineTo(m+p,x+v-A),c.quadTo(m+p,x+v,m+p-A,x+v),c.lineTo(m+A,x+v),c.quadTo(m,x+v,m,x+v-A),c.lineTo(m,x+A),c.quadTo(m,x,m+A,x)):(c.moveTo(m,x),c.lineTo(m+p,x),c.lineTo(m+p,x+v),c.lineTo(m,x+v),c.lineTo(m,x)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(ea,mxRectangleShape);ea.prototype.size=.1;ea.prototype.fixedSize=!1;ea.prototype.isHtmlAllowed=function(){return!1};ea.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
-mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var m=c.width,x=c.height;c=new mxRectangle(c.x,c.y,m,x);var p=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;p=Math.max(p,Math.min(m*v,x*v))}c.x+=Math.round(p);c.width-=Math.round(2*p);return c}return c};
-ea.prototype.paintForeground=function(c,m,x,p,v){var A=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),B=parseFloat(mxUtils.getValue(this.style,"size",this.size));B=A?Math.max(0,Math.min(p,B)):p*Math.max(0,Math.min(1,B));this.isRounded&&(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,B=Math.max(B,Math.min(p*A,v*A)));B=Math.round(B);c.begin();c.moveTo(m+B,x);c.lineTo(m+B,x+v);c.moveTo(m+p-B,x);c.lineTo(m+p-B,x+v);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("process",ea);mxCellRenderer.registerShape("process2",ea);mxUtils.extend(ka,mxRectangleShape);ka.prototype.paintBackground=function(c,m,x,p,v){c.setFillColor(mxConstants.NONE);c.rect(m,x,p,v);c.fill()};ka.prototype.paintForeground=function(c,m,x,p,v){};mxCellRenderer.registerShape("transparent",ka);mxUtils.extend(ja,mxHexagon);ja.prototype.size=30;ja.prototype.position=.5;ja.prototype.position2=.5;ja.prototype.base=20;ja.prototype.getLabelMargins=function(){return new mxRectangle(0,
-0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ja.prototype.isRoundable=function(){return!0};ja.prototype.redrawPath=function(c,m,x,p,v){m=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
-this.position2)))),ha=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,v-x),new mxPoint(Math.min(p,A+ha),v-x),new mxPoint(B,v),new mxPoint(Math.max(0,A),v-x),new mxPoint(0,v-x)],this.isRounded,m,!0,[4])};mxCellRenderer.registerShape("callout",ja);mxUtils.extend(U,mxActor);U.prototype.size=.2;U.prototype.fixedSize=20;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(c,m,x,p,
-v){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p-m,0),new mxPoint(p,v/2),new mxPoint(p-m,v),new mxPoint(0,v),new mxPoint(m,v/2)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("step",
-U);mxUtils.extend(I,mxHexagon);I.prototype.size=.25;I.prototype.fixedSize=20;I.prototype.isRoundable=function(){return!0};I.prototype.redrawPath=function(c,m,x,p,v){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,
-0),new mxPoint(p-m,0),new mxPoint(p,.5*v),new mxPoint(p-m,v),new mxPoint(m,v),new mxPoint(0,.5*v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("hexagon",I);mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.paintForeground=function(c,m,x,p,v){var A=Math.min(p/5,v/5)+1;c.begin();c.moveTo(m+p/2,x+A);c.lineTo(m+p/2,x+v-A);c.moveTo(m+A,x+v/2);c.lineTo(m+p-A,x+v/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",
-V);var cb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var m=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+m,c.y+m,c.width-2*m,c.height-2*m)}return c};mxRhombus.prototype.paintVertexShape=function(c,m,x,p,v){cb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);m+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&(c.setShadow(!1),cb.apply(this,[c,m,x,p,v]))}};mxUtils.extend(Q,mxRectangleShape);Q.prototype.isHtmlAllowed=function(){return!1};Q.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var m=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+m,c.y+m,c.width-2*m,c.height-2*m)}return c};Q.prototype.paintForeground=function(c,m,x,p,v){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
-Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);m+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var ha=this.style["symbol"+A+"Align"],K=this.style["symbol"+A+"VerticalAlign"],xa=this.style["symbol"+A+"Width"],na=this.style["symbol"+A+"Height"],ab=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
-ab,db=this.style["symbol"+A+"ArcSpacing"];null!=db&&(db*=this.getArcSize(p+this.strokewidth,v+this.strokewidth),ab+=db,jb+=db);db=m;var Ga=x;db=ha==mxConstants.ALIGN_CENTER?db+(p-xa)/2:ha==mxConstants.ALIGN_RIGHT?db+(p-xa-ab):db+ab;Ga=K==mxConstants.ALIGN_MIDDLE?Ga+(v-na)/2:K==mxConstants.ALIGN_BOTTOM?Ga+(v-na-jb):Ga+jb;c.save();ha=new B;ha.style=this.style;B.prototype.paintVertexShape.call(ha,c,db,Ga,xa,na);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.registerShape("ext",Q);mxUtils.extend(R,mxCylinder);R.prototype.redrawPath=function(c,m,x,p,v,A){A?(c.moveTo(0,0),c.lineTo(p/2,v/2),c.lineTo(p,0),c.end()):(c.moveTo(0,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(0,v),c.close())};mxCellRenderer.registerShape("message",R);mxUtils.extend(fa,mxShape);fa.prototype.paintBackground=function(c,m,x,p,v){c.translate(m,x);c.ellipse(p/4,0,p/2,v/4);c.fillAndStroke();c.begin();c.moveTo(p/2,v/4);c.lineTo(p/2,2*v/3);c.moveTo(p/2,v/3);c.lineTo(0,v/3);c.moveTo(p/
-2,v/3);c.lineTo(p,v/3);c.moveTo(p/2,2*v/3);c.lineTo(0,v);c.moveTo(p/2,2*v/3);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",fa);mxUtils.extend(la,mxShape);la.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};la.prototype.paintBackground=function(c,m,x,p,v){c.translate(m,x);c.begin();c.moveTo(0,v/4);c.lineTo(0,3*v/4);c.end();c.stroke();c.begin();c.moveTo(0,v/2);c.lineTo(p/6,v/2);c.end();c.stroke();c.ellipse(p/6,0,5*p/6,v);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
-la);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(c,m,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(m+p/8,x+v);c.lineTo(m+7*p/8,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",ra);mxUtils.extend(u,mxShape);u.prototype.paintVertexShape=function(c,m,x,p,v){c.translate(m,x);c.begin();c.moveTo(p,0);c.lineTo(0,v);c.moveTo(0,0);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",u);mxUtils.extend(J,mxShape);
-J.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};J.prototype.paintBackground=function(c,m,x,p,v){c.translate(m,x);c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,0);c.end();c.stroke();c.ellipse(0,v/8,p,7*v/8);c.fillAndStroke()};J.prototype.paintForeground=function(c,m,x,p,v){c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,v/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",J);mxUtils.extend(N,mxRectangleShape);N.prototype.size=
-40;N.prototype.isHtmlAllowed=function(){return!1};N.prototype.getLabelBounds=function(c){var m=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,m)};N.prototype.paintBackground=function(c,m,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"participant");null==B||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,c,m,
-x,p,A):(B=this.state.view.graph.cellRenderer.getShape(B),null!=B&&B!=N&&(B=new B,B.apply(this.state),c.save(),B.paintVertexShape(c,m,x,p,A),c.restore()));A<v&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(m+p/2,x+A),c.lineTo(m+p/2,x+v),c.end(),c.stroke())};N.prototype.paintForeground=function(c,m,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,m,x,p,Math.min(v,
-A))};mxCellRenderer.registerShape("umlLifeline",N);mxUtils.extend(W,mxShape);W.prototype.width=60;W.prototype.height=30;W.prototype.corner=10;W.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};W.prototype.paintBackground=function(c,m,x,p,v){var A=this.corner,B=Math.min(p,Math.max(A,parseFloat(mxUtils.getValue(this.style,
-"width",this.width)))),ha=Math.min(v,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),K=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);K!=mxConstants.NONE&&(c.setFillColor(K),c.rect(m,x,p,v),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,m,x,p,v),c.setGradient(this.fill,this.gradient,m,x,p,v,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
-c.moveTo(m,x);c.lineTo(m+B,x);c.lineTo(m+B,x+Math.max(0,ha-1.5*A));c.lineTo(m+Math.max(0,B-A),x+ha);c.lineTo(m,x+ha);c.close();c.fillAndStroke();c.begin();c.moveTo(m+B,x);c.lineTo(m+p,x);c.lineTo(m+p,x+v);c.lineTo(m,x+v);c.lineTo(m,x+ha);c.stroke()};mxCellRenderer.registerShape("umlFrame",W);mxPerimeter.CenterPerimeter=function(c,m,x,p){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
-m,x,p){p=N.prototype.size;null!=m&&(p=mxUtils.getValue(m.style,"size",p)*m.view.scale);m=parseFloat(m.style[mxConstants.STYLE_STROKEWIDTH]||1)*m.view.scale/2-1;x.x<c.getCenterX()&&(m=-1*(m+1));return new mxPoint(c.getCenterX()+m,Math.min(c.y+c.height,Math.max(c.y+p,x.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,m,x,p){p=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
-mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,m,x,p){p=parseFloat(m.style[mxConstants.STYLE_STROKEWIDTH]||1)*m.view.scale/2-1;null!=m.style.backboneSize&&(p+=parseFloat(m.style.backboneSize)*m.view.scale/2-1);if("south"==m.style[mxConstants.STYLE_DIRECTION]||"north"==m.style[mxConstants.STYLE_DIRECTION])return x.x<c.getCenterX()&&(p=-1*(p+1)),new mxPoint(c.getCenterX()+p,Math.min(c.y+c.height,Math.max(c.y,x.y)));x.y<c.getCenterY()&&(p=-1*(p+1));return new mxPoint(Math.min(c.x+
-c.width,Math.max(c.x,x.x)),c.getCenterY()+p)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,m,x,p){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(m.style,"size",ja.prototype.size))*m.view.scale))),m.style),m,x,p)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
-m,x,p){var v="0"!=mxUtils.getValue(m.style,"fixedSize","0"),A=v?ba.prototype.fixedSize:ba.prototype.size;null!=m&&(A=mxUtils.getValue(m.style,"size",A));v&&(A*=m.view.scale);var B=c.x,ha=c.y,K=c.width,xa=c.height;m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_NORTH||m==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+K,ha+v),new mxPoint(B+
-K,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha)]):(v=v?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K,ha),new mxPoint(B+K-v,ha+xa),new mxPoint(B,ha+xa),new mxPoint(B+v,ha)]);xa=c.getCenterX();c=c.getCenterY();c=new mxPoint(xa,c);p&&(x.x<B||x.x>B+K?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ha,c,x)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,m,x,p){var v="0"!=
-mxUtils.getValue(m.style,"fixedSize","0"),A=v?Y.prototype.fixedSize:Y.prototype.size;null!=m&&(A=mxUtils.getValue(m.style,"size",A));v&&(A*=m.view.scale);var B=c.x,ha=c.y,K=c.width,xa=c.height;m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K-v,ha),new mxPoint(B+K,ha+xa),new mxPoint(B,ha+xa),new mxPoint(B+
-v,ha)]):m==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+K,ha),new mxPoint(B+K-v,ha+xa),new mxPoint(B+v,ha+xa),new mxPoint(B,ha)]):m==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha+v),new mxPoint(B+K,ha),new mxPoint(B+K,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha+v)]):(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+
-K,ha+v),new mxPoint(B+K,ha+xa-v),new mxPoint(B,ha+xa),new mxPoint(B,ha)]);xa=c.getCenterX();c=c.getCenterY();c=new mxPoint(xa,c);p&&(x.x<B||x.x>B+K?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ha,c,x)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,m,x,p){var v="0"!=mxUtils.getValue(m.style,"fixedSize","0"),A=v?U.prototype.fixedSize:U.prototype.size;null!=m&&(A=mxUtils.getValue(m.style,"size",A));v&&(A*=m.view.scale);var B=c.x,
-ha=c.y,K=c.width,xa=c.height,na=c.getCenterX();c=c.getCenterY();m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+K-v,ha),new mxPoint(B+K,c),new mxPoint(B+K-v,ha+xa),new mxPoint(B,ha+xa),new mxPoint(B+v,c),new mxPoint(B,ha)]):m==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,
-A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K,ha),new mxPoint(B+K-v,c),new mxPoint(B+K,ha+xa),new mxPoint(B+v,ha+xa),new mxPoint(B,c),new mxPoint(B+v,ha)]):m==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha+v),new mxPoint(na,ha),new mxPoint(B+K,ha+v),new mxPoint(B+K,ha+xa),new mxPoint(na,ha+xa-v),new mxPoint(B,ha+xa),new mxPoint(B,ha+v)]):(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(na,ha+
-v),new mxPoint(B+K,ha),new mxPoint(B+K,ha+xa-v),new mxPoint(na,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha)]);na=new mxPoint(na,c);p&&(x.x<B||x.x>B+K?na.y=x.y:na.x=x.x);return mxUtils.getPerimeterPoint(ha,na,x)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,m,x,p){var v="0"!=mxUtils.getValue(m.style,"fixedSize","0"),A=v?I.prototype.fixedSize:I.prototype.size;null!=m&&(A=mxUtils.getValue(m.style,"size",A));v&&(A*=m.view.scale);var B=
-c.x,ha=c.y,K=c.width,xa=c.height,na=c.getCenterX();c=c.getCenterY();m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_NORTH||m==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(na,ha),new mxPoint(B+K,ha+v),new mxPoint(B+K,ha+xa-v),new mxPoint(na,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha+v),new mxPoint(na,ha)]):(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,
-Math.min(1,A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K-v,ha),new mxPoint(B+K,c),new mxPoint(B+K-v,ha+xa),new mxPoint(B+v,ha+xa),new mxPoint(B,c),new mxPoint(B+v,ha)]);na=new mxPoint(na,c);p&&(x.x<B||x.x>B+K?na.y=x.y:na.x=x.x);return mxUtils.getPerimeterPoint(ha,na,x)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(S,mxShape);S.prototype.size=10;S.prototype.paintBackground=function(c,m,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
-c.translate(m,x);c.ellipse((p-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(p/2,A);c.lineTo(p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",S);mxUtils.extend(P,mxShape);P.prototype.size=10;P.prototype.inset=2;P.prototype.paintBackground=function(c,m,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(m,x);c.begin();c.moveTo(p/2,A+B);c.lineTo(p/2,v);c.end();c.stroke();
-c.begin();c.moveTo((p-A)/2-B,A/2);c.quadTo((p-A)/2-B,A+B,p/2,A+B);c.quadTo((p+A)/2+B,A+B,(p+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",P);mxUtils.extend(Z,mxShape);Z.prototype.paintBackground=function(c,m,x,p,v){c.translate(m,x);c.begin();c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Z);mxUtils.extend(oa,mxShape);oa.prototype.inset=2;oa.prototype.paintBackground=function(c,m,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,
-"inset",this.inset))+this.strokewidth;c.translate(m,x);c.ellipse(0,A,p-2*A,v-2*A);c.fillAndStroke();c.begin();c.moveTo(p/2,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",oa);mxUtils.extend(va,mxCylinder);va.prototype.jettyWidth=20;va.prototype.jettyHeight=10;va.prototype.redrawPath=function(c,m,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));m=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
-this.jettyHeight));x=B/2;B=x+B/2;var ha=Math.min(m,v-m),K=Math.min(ha+2*m,v-m);A?(c.moveTo(x,ha),c.lineTo(B,ha),c.lineTo(B,ha+m),c.lineTo(x,ha+m),c.moveTo(x,K),c.lineTo(B,K),c.lineTo(B,K+m),c.lineTo(x,K+m)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,K+m),c.lineTo(0,K+m),c.lineTo(0,K),c.lineTo(x,K),c.lineTo(x,ha+m),c.lineTo(0,ha+m),c.lineTo(0,ha),c.lineTo(x,ha),c.close());c.end()};mxCellRenderer.registerShape("module",va);mxUtils.extend(Aa,mxCylinder);Aa.prototype.jettyWidth=
-32;Aa.prototype.jettyHeight=12;Aa.prototype.redrawPath=function(c,m,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));m=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));x=B/2;B=x+B/2;var ha=.3*v-m/2,K=.7*v-m/2;A?(c.moveTo(x,ha),c.lineTo(B,ha),c.lineTo(B,ha+m),c.lineTo(x,ha+m),c.moveTo(x,K),c.lineTo(B,K),c.lineTo(B,K+m),c.lineTo(x,K+m)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,K+m),c.lineTo(0,K+m),c.lineTo(0,K),c.lineTo(x,
-K),c.lineTo(x,ha+m),c.lineTo(0,ha+m),c.lineTo(0,ha),c.lineTo(x,ha),c.close());c.end()};mxCellRenderer.registerShape("component",Aa);mxUtils.extend(sa,mxRectangleShape);sa.prototype.paintForeground=function(c,m,x,p,v){var A=p/2,B=v/2,ha=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(m+A,x),new mxPoint(m+p,x+B),new mxPoint(m+A,x+v),new mxPoint(m,x+B)],this.isRounded,ha,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("associativeEntity",sa);mxUtils.extend(Ba,mxDoubleEllipse);Ba.prototype.outerStroke=!0;Ba.prototype.paintVertexShape=function(c,m,x,p,v){var A=Math.min(4,Math.min(p/5,v/5));0<p&&0<v&&(c.ellipse(m+A,x+A,p-2*A,v-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(m,x,p,v),c.stroke())};mxCellRenderer.registerShape("endState",Ba);mxUtils.extend(ta,Ba);ta.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ta);mxUtils.extend(Na,mxArrowConnector);
+A,v*A)),c.moveTo(l+A,x),c.lineTo(l+p-A,x),c.quadTo(l+p,x,l+p,x+A),c.lineTo(l+p,x+v-A),c.quadTo(l+p,x+v,l+p-A,x+v),c.lineTo(l+A,x+v),c.quadTo(l,x+v,l,x+v-A),c.lineTo(l,x+A),c.quadTo(l,x,l+A,x)):(c.moveTo(l,x),c.lineTo(l+p,x),c.lineTo(l+p,x+v),c.lineTo(l,x+v),c.lineTo(l,x)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(ea,mxRectangleShape);ea.prototype.size=.1;ea.prototype.fixedSize=!1;ea.prototype.isHtmlAllowed=function(){return!1};ea.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
+mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var l=c.width,x=c.height;c=new mxRectangle(c.x,c.y,l,x);var p=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;p=Math.max(p,Math.min(l*v,x*v))}c.x+=Math.round(p);c.width-=Math.round(2*p);return c}return c};
+ea.prototype.paintForeground=function(c,l,x,p,v){var A=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),B=parseFloat(mxUtils.getValue(this.style,"size",this.size));B=A?Math.max(0,Math.min(p,B)):p*Math.max(0,Math.min(1,B));this.isRounded&&(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,B=Math.max(B,Math.min(p*A,v*A)));B=Math.round(B);c.begin();c.moveTo(l+B,x);c.lineTo(l+B,x+v);c.moveTo(l+p-B,x);c.lineTo(l+p-B,x+v);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("process",ea);mxCellRenderer.registerShape("process2",ea);mxUtils.extend(ka,mxRectangleShape);ka.prototype.paintBackground=function(c,l,x,p,v){c.setFillColor(mxConstants.NONE);c.rect(l,x,p,v);c.fill()};ka.prototype.paintForeground=function(c,l,x,p,v){};mxCellRenderer.registerShape("transparent",ka);mxUtils.extend(ja,mxHexagon);ja.prototype.size=30;ja.prototype.position=.5;ja.prototype.position2=.5;ja.prototype.base=20;ja.prototype.getLabelMargins=function(){return new mxRectangle(0,
+0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ja.prototype.isRoundable=function(){return!0};ja.prototype.redrawPath=function(c,l,x,p,v){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
+this.position2)))),ha=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,v-x),new mxPoint(Math.min(p,A+ha),v-x),new mxPoint(B,v),new mxPoint(Math.max(0,A),v-x),new mxPoint(0,v-x)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",ja);mxUtils.extend(U,mxActor);U.prototype.size=.2;U.prototype.fixedSize=20;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(c,l,x,p,
+v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-l,v),new mxPoint(0,v),new mxPoint(l,v/2)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("step",
+U);mxUtils.extend(I,mxHexagon);I.prototype.size=.25;I.prototype.fixedSize=20;I.prototype.isRoundable=function(){return!0};I.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,
+0),new mxPoint(p-l,0),new mxPoint(p,.5*v),new mxPoint(p-l,v),new mxPoint(l,v),new mxPoint(0,.5*v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("hexagon",I);mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.paintForeground=function(c,l,x,p,v){var A=Math.min(p/5,v/5)+1;c.begin();c.moveTo(l+p/2,x+A);c.lineTo(l+p/2,x+v-A);c.moveTo(l+A,x+v/2);c.lineTo(l+p-A,x+v/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",
+V);var cb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,x,p,v){cb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&(c.setShadow(!1),cb.apply(this,[c,l,x,p,v]))}};mxUtils.extend(Q,mxRectangleShape);Q.prototype.isHtmlAllowed=function(){return!1};Q.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};Q.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var ha=this.style["symbol"+A+"Align"],K=this.style["symbol"+A+"VerticalAlign"],xa=this.style["symbol"+A+"Width"],na=this.style["symbol"+A+"Height"],ab=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
+ab,db=this.style["symbol"+A+"ArcSpacing"];null!=db&&(db*=this.getArcSize(p+this.strokewidth,v+this.strokewidth),ab+=db,jb+=db);db=l;var Ga=x;db=ha==mxConstants.ALIGN_CENTER?db+(p-xa)/2:ha==mxConstants.ALIGN_RIGHT?db+(p-xa-ab):db+ab;Ga=K==mxConstants.ALIGN_MIDDLE?Ga+(v-na)/2:K==mxConstants.ALIGN_BOTTOM?Ga+(v-na-jb):Ga+jb;c.save();ha=new B;ha.style=this.style;B.prototype.paintVertexShape.call(ha,c,db,Ga,xa,na);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
+mxCellRenderer.registerShape("ext",Q);mxUtils.extend(R,mxCylinder);R.prototype.redrawPath=function(c,l,x,p,v,A){A?(c.moveTo(0,0),c.lineTo(p/2,v/2),c.lineTo(p,0),c.end()):(c.moveTo(0,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(0,v),c.close())};mxCellRenderer.registerShape("message",R);mxUtils.extend(fa,mxShape);fa.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.ellipse(p/4,0,p/2,v/4);c.fillAndStroke();c.begin();c.moveTo(p/2,v/4);c.lineTo(p/2,2*v/3);c.moveTo(p/2,v/3);c.lineTo(0,v/3);c.moveTo(p/
+2,v/3);c.lineTo(p,v/3);c.moveTo(p/2,2*v/3);c.lineTo(0,v);c.moveTo(p/2,2*v/3);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",fa);mxUtils.extend(la,mxShape);la.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};la.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(0,v/4);c.lineTo(0,3*v/4);c.end();c.stroke();c.begin();c.moveTo(0,v/2);c.lineTo(p/6,v/2);c.end();c.stroke();c.ellipse(p/6,0,5*p/6,v);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
+la);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+p/8,x+v);c.lineTo(l+7*p/8,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",ra);mxUtils.extend(u,mxShape);u.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(p,0);c.lineTo(0,v);c.moveTo(0,0);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",u);mxUtils.extend(J,mxShape);
+J.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};J.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,0);c.end();c.stroke();c.ellipse(0,v/8,p,7*v/8);c.fillAndStroke()};J.prototype.paintForeground=function(c,l,x,p,v){c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,v/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",J);mxUtils.extend(N,mxRectangleShape);N.prototype.size=
+40;N.prototype.isHtmlAllowed=function(){return!1};N.prototype.getLabelBounds=function(c){var l=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,l)};N.prototype.paintBackground=function(c,l,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"participant");null==B||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,c,l,
+x,p,A):(B=this.state.view.graph.cellRenderer.getShape(B),null!=B&&B!=N&&(B=new B,B.apply(this.state),c.save(),B.paintVertexShape(c,l,x,p,A),c.restore()));A<v&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+p/2,x+A),c.lineTo(l+p/2,x+v),c.end(),c.stroke())};N.prototype.paintForeground=function(c,l,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,x,p,Math.min(v,
+A))};mxCellRenderer.registerShape("umlLifeline",N);mxUtils.extend(W,mxShape);W.prototype.width=60;W.prototype.height=30;W.prototype.corner=10;W.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};W.prototype.paintBackground=function(c,l,x,p,v){var A=this.corner,B=Math.min(p,Math.max(A,parseFloat(mxUtils.getValue(this.style,
+"width",this.width)))),ha=Math.min(v,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),K=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);K!=mxConstants.NONE&&(c.setFillColor(K),c.rect(l,x,p,v),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,x,p,v),c.setGradient(this.fill,this.gradient,l,x,p,v,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
+c.moveTo(l,x);c.lineTo(l+B,x);c.lineTo(l+B,x+Math.max(0,ha-1.5*A));c.lineTo(l+Math.max(0,B-A),x+ha);c.lineTo(l,x+ha);c.close();c.fillAndStroke();c.begin();c.moveTo(l+B,x);c.lineTo(l+p,x);c.lineTo(l+p,x+v);c.lineTo(l,x+v);c.lineTo(l,x+ha);c.stroke()};mxCellRenderer.registerShape("umlFrame",W);mxPerimeter.CenterPerimeter=function(c,l,x,p){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
+l,x,p){p=N.prototype.size;null!=l&&(p=mxUtils.getValue(l.style,"size",p)*l.view.scale);l=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;x.x<c.getCenterX()&&(l=-1*(l+1));return new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y+p,x.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,l,x,p){p=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
+mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,l,x,p){p=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;null!=l.style.backboneSize&&(p+=parseFloat(l.style.backboneSize)*l.view.scale/2-1);if("south"==l.style[mxConstants.STYLE_DIRECTION]||"north"==l.style[mxConstants.STYLE_DIRECTION])return x.x<c.getCenterX()&&(p=-1*(p+1)),new mxPoint(c.getCenterX()+p,Math.min(c.y+c.height,Math.max(c.y,x.y)));x.y<c.getCenterY()&&(p=-1*(p+1));return new mxPoint(Math.min(c.x+
+c.width,Math.max(c.x,x.x)),c.getCenterY()+p)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,x,p){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",ja.prototype.size))*l.view.scale))),l.style),l,x,p)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
+l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?ba.prototype.fixedSize:ba.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,ha=c.y,K=c.width,xa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+K,ha+v),new mxPoint(B+
+K,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha)]):(v=v?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K,ha),new mxPoint(B+K-v,ha+xa),new mxPoint(B,ha+xa),new mxPoint(B+v,ha)]);xa=c.getCenterX();c=c.getCenterY();c=new mxPoint(xa,c);p&&(x.x<B||x.x>B+K?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ha,c,x)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,x,p){var v="0"!=
+mxUtils.getValue(l.style,"fixedSize","0"),A=v?Y.prototype.fixedSize:Y.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,ha=c.y,K=c.width,xa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K-v,ha),new mxPoint(B+K,ha+xa),new mxPoint(B,ha+xa),new mxPoint(B+
+v,ha)]):l==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+K,ha),new mxPoint(B+K-v,ha+xa),new mxPoint(B+v,ha+xa),new mxPoint(B,ha)]):l==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha+v),new mxPoint(B+K,ha),new mxPoint(B+K,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha+v)]):(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+
+K,ha+v),new mxPoint(B+K,ha+xa-v),new mxPoint(B,ha+xa),new mxPoint(B,ha)]);xa=c.getCenterX();c=c.getCenterY();c=new mxPoint(xa,c);p&&(x.x<B||x.x>B+K?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ha,c,x)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?U.prototype.fixedSize:U.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,
+ha=c.y,K=c.width,xa=c.height,na=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+K-v,ha),new mxPoint(B+K,c),new mxPoint(B+K-v,ha+xa),new mxPoint(B,ha+xa),new mxPoint(B+v,c),new mxPoint(B,ha)]):l==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,
+A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K,ha),new mxPoint(B+K-v,c),new mxPoint(B+K,ha+xa),new mxPoint(B+v,ha+xa),new mxPoint(B,c),new mxPoint(B+v,ha)]):l==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha+v),new mxPoint(na,ha),new mxPoint(B+K,ha+v),new mxPoint(B+K,ha+xa),new mxPoint(na,ha+xa-v),new mxPoint(B,ha+xa),new mxPoint(B,ha+v)]):(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(na,ha+
+v),new mxPoint(B+K,ha),new mxPoint(B+K,ha+xa-v),new mxPoint(na,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha)]);na=new mxPoint(na,c);p&&(x.x<B||x.x>B+K?na.y=x.y:na.x=x.x);return mxUtils.getPerimeterPoint(ha,na,x)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?I.prototype.fixedSize:I.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=
+c.x,ha=c.y,K=c.width,xa=c.height,na=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(na,ha),new mxPoint(B+K,ha+v),new mxPoint(B+K,ha+xa-v),new mxPoint(na,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha+v),new mxPoint(na,ha)]):(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,
+Math.min(1,A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K-v,ha),new mxPoint(B+K,c),new mxPoint(B+K-v,ha+xa),new mxPoint(B+v,ha+xa),new mxPoint(B,c),new mxPoint(B+v,ha)]);na=new mxPoint(na,c);p&&(x.x<B||x.x>B+K?na.y=x.y:na.x=x.x);return mxUtils.getPerimeterPoint(ha,na,x)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(S,mxShape);S.prototype.size=10;S.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
+c.translate(l,x);c.ellipse((p-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(p/2,A);c.lineTo(p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",S);mxUtils.extend(P,mxShape);P.prototype.size=10;P.prototype.inset=2;P.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,x);c.begin();c.moveTo(p/2,A+B);c.lineTo(p/2,v);c.end();c.stroke();
+c.begin();c.moveTo((p-A)/2-B,A/2);c.quadTo((p-A)/2-B,A+B,p/2,A+B);c.quadTo((p+A)/2+B,A+B,(p+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",P);mxUtils.extend(Z,mxShape);Z.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Z);mxUtils.extend(oa,mxShape);oa.prototype.inset=2;oa.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,
+"inset",this.inset))+this.strokewidth;c.translate(l,x);c.ellipse(0,A,p-2*A,v-2*A);c.fillAndStroke();c.begin();c.moveTo(p/2,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",oa);mxUtils.extend(va,mxCylinder);va.prototype.jettyWidth=20;va.prototype.jettyHeight=10;va.prototype.redrawPath=function(c,l,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
+this.jettyHeight));x=B/2;B=x+B/2;var ha=Math.min(l,v-l),K=Math.min(ha+2*l,v-l);A?(c.moveTo(x,ha),c.lineTo(B,ha),c.lineTo(B,ha+l),c.lineTo(x,ha+l),c.moveTo(x,K),c.lineTo(B,K),c.lineTo(B,K+l),c.lineTo(x,K+l)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,K+l),c.lineTo(0,K+l),c.lineTo(0,K),c.lineTo(x,K),c.lineTo(x,ha+l),c.lineTo(0,ha+l),c.lineTo(0,ha),c.lineTo(x,ha),c.close());c.end()};mxCellRenderer.registerShape("module",va);mxUtils.extend(Aa,mxCylinder);Aa.prototype.jettyWidth=
+32;Aa.prototype.jettyHeight=12;Aa.prototype.redrawPath=function(c,l,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));x=B/2;B=x+B/2;var ha=.3*v-l/2,K=.7*v-l/2;A?(c.moveTo(x,ha),c.lineTo(B,ha),c.lineTo(B,ha+l),c.lineTo(x,ha+l),c.moveTo(x,K),c.lineTo(B,K),c.lineTo(B,K+l),c.lineTo(x,K+l)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,K+l),c.lineTo(0,K+l),c.lineTo(0,K),c.lineTo(x,
+K),c.lineTo(x,ha+l),c.lineTo(0,ha+l),c.lineTo(0,ha),c.lineTo(x,ha),c.close());c.end()};mxCellRenderer.registerShape("component",Aa);mxUtils.extend(sa,mxRectangleShape);sa.prototype.paintForeground=function(c,l,x,p,v){var A=p/2,B=v/2,ha=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+A,x),new mxPoint(l+p,x+B),new mxPoint(l+A,x+v),new mxPoint(l,x+B)],this.isRounded,ha,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("associativeEntity",sa);mxUtils.extend(Ba,mxDoubleEllipse);Ba.prototype.outerStroke=!0;Ba.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.min(4,Math.min(p/5,v/5));0<p&&0<v&&(c.ellipse(l+A,x+A,p-2*A,v-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,x,p,v),c.stroke())};mxCellRenderer.registerShape("endState",Ba);mxUtils.extend(ta,Ba);ta.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ta);mxUtils.extend(Na,mxArrowConnector);
Na.prototype.defaultWidth=4;Na.prototype.isOpenEnded=function(){return!0};Na.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Na.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Na);mxUtils.extend(Ca,mxArrowConnector);Ca.prototype.defaultWidth=10;Ca.prototype.defaultArrowWidth=20;Ca.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
-"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(Qa,mxActor);Qa.prototype.size=30;Qa.prototype.isRoundable=function(){return!0};Qa.prototype.redrawPath=function(c,m,x,p,v){m=Math.min(v,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(0,m),new mxPoint(p,0),new mxPoint(p,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("manualInput",Qa);mxUtils.extend(Ua,mxRectangleShape);Ua.prototype.dx=20;Ua.prototype.dy=20;Ua.prototype.isHtmlAllowed=function(){return!1};Ua.prototype.paintForeground=function(c,m,x,p,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
-var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(p*B,v*B))}B=Math.max(A,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(m,x+A);c.lineTo(m+p,x+A);c.end();c.stroke();c.begin();c.moveTo(m+B,x);c.lineTo(m+B,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Ua);
-mxUtils.extend(Ka,mxActor);Ka.prototype.dx=20;Ka.prototype.dy=20;Ka.prototype.redrawPath=function(c,m,x,p,v){m=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint(m,x),
-new mxPoint(m,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Ka);mxUtils.extend(bb,mxActor);bb.prototype.redrawPath=function(c,m,x,p,v){c.moveTo(0,0);c.lineTo(0,v);c.end();c.moveTo(p,0);c.lineTo(p,v);c.end();c.moveTo(0,v/2);c.lineTo(p,v/2);c.end()};mxCellRenderer.registerShape("crossbar",bb);mxUtils.extend(Va,mxActor);Va.prototype.dx=20;Va.prototype.dy=20;Va.prototype.redrawPath=function(c,m,x,p,v){m=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
-"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint((p+m)/2,x),new mxPoint((p+m)/2,v),new mxPoint((p-m)/2,v),new mxPoint((p-m)/2,x),new mxPoint(0,x)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",Va);mxUtils.extend($a,
-mxActor);$a.prototype.arrowWidth=.3;$a.prototype.arrowSize=.2;$a.prototype.redrawPath=function(c,m,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));m=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,x),new mxPoint(p-m,x),new mxPoint(p-m,0),new mxPoint(p,v/2),new mxPoint(p-
-m,v),new mxPoint(p-m,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",$a);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,m,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",$a.prototype.arrowWidth))));m=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",$a.prototype.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(c,[new mxPoint(0,v/2),new mxPoint(m,0),new mxPoint(m,x),new mxPoint(p-m,x),new mxPoint(p-m,0),new mxPoint(p,v/2),new mxPoint(p-m,v),new mxPoint(p-m,A),new mxPoint(m,A),new mxPoint(m,v)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",z);mxUtils.extend(L,mxActor);L.prototype.size=.1;L.prototype.fixedSize=20;L.prototype.redrawPath=function(c,m,x,p,v){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(m,0);c.lineTo(p,0);c.quadTo(p-2*m,v/2,p,v);c.lineTo(m,v);c.quadTo(m-2*m,v/2,m,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",L);mxUtils.extend(M,mxActor);M.prototype.redrawPath=function(c,m,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.close();c.end()};mxCellRenderer.registerShape("or",M);mxUtils.extend(T,mxActor);T.prototype.redrawPath=function(c,
-m,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.quadTo(p/2,v/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",T);mxUtils.extend(ca,mxActor);ca.prototype.size=20;ca.prototype.isRoundable=function(){return!0};ca.prototype.redrawPath=function(c,m,x,p,v){m=Math.min(p/2,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,0),new mxPoint(p-m,0),
-new mxPoint(p,.8*m),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,.8*m)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("loopLimit",ca);mxUtils.extend(ia,mxActor);ia.prototype.size=.375;ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(c,m,x,p,v){m=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,
-0),new mxPoint(p,v-m),new mxPoint(p/2,v),new mxPoint(0,v-m)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",ia);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(c,m,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(m+p/2,x+v);c.lineTo(m+p,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",ma);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(c,m,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);c.setShadow(!1);c.begin();c.moveTo(m,x+v/2);c.lineTo(m+p,x+v/2);c.end();c.stroke();c.begin();c.moveTo(m+p/2,x);c.lineTo(m+p/2,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",pa);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(c,m,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(m+.145*p,x+.145*v);c.lineTo(m+.855*p,x+.855*v);c.end();c.stroke();c.begin();c.moveTo(m+.855*p,x+.145*v);c.lineTo(m+.145*p,
-x+.855*v);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",ua);mxUtils.extend(ya,mxRhombus);ya.prototype.paintVertexShape=function(c,m,x,p,v){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(m,x+v/2);c.lineTo(m+p,x+v/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ya);mxUtils.extend(Fa,mxEllipse);Fa.prototype.paintVertexShape=function(c,m,x,p,v){c.begin();c.moveTo(m,x);c.lineTo(m+p,x);c.lineTo(m+p/2,x+v/2);c.close();c.fillAndStroke();
-c.begin();c.moveTo(m,x+v);c.lineTo(m+p,x+v);c.lineTo(m+p/2,x+v/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",Fa);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,m,x,p,v){var A=c.state.strokeWidth/2,B=10+2*A,ha=x+v-B/2;c.begin();c.moveTo(m,x);c.lineTo(m,x+v);c.moveTo(m+A,ha);c.lineTo(m+A+B,ha-B/2);c.moveTo(m+A,ha);c.lineTo(m+A+B,ha+B/2);c.moveTo(m+A,ha);c.lineTo(m+p-A,ha);c.moveTo(m+p,x);c.lineTo(m+p,x+v);c.moveTo(m+p-A,ha);c.lineTo(m+p-B-A,ha-B/2);c.moveTo(m+
-p-A,ha);c.lineTo(m+p-B-A,ha+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Ma);mxUtils.extend(Oa,mxEllipse);Oa.prototype.drawHidden=!0;Oa.prototype.paintVertexShape=function(c,m,x,p,v){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var ha="1"==mxUtils.getValue(this.style,"top","1"),K="1"==mxUtils.getValue(this.style,
-"left","1"),xa="1"==mxUtils.getValue(this.style,"right","1"),na="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||ha||xa||na||K?(c.rect(m,x,p,v),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(m,x),this.outline||ha?c.lineTo(m+p,x):c.moveTo(m+p,x),this.outline||xa?c.lineTo(m+p,x+v):c.moveTo(m+p,x+v),this.outline||na?c.lineTo(m,x+v):c.moveTo(m,x+v),(this.outline||K)&&c.lineTo(m,x),c.end(),c.stroke(),c.setLineCap("flat")):
-c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Oa);mxUtils.extend(Pa,mxEllipse);Pa.prototype.paintVertexShape=function(c,m,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(m+p/2,x),c.lineTo(m+p/2,x+v)):(c.moveTo(m,x+v/2),c.lineTo(m+p,x+v/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Pa);mxUtils.extend(Sa,mxActor);Sa.prototype.redrawPath=function(c,
-m,x,p,v){m=Math.min(p,v/2);c.moveTo(0,0);c.lineTo(p-m,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-m,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("delay",Sa);mxUtils.extend(za,mxActor);za.prototype.size=.2;za.prototype.redrawPath=function(c,m,x,p,v){m=Math.min(v,p);var A=Math.max(0,Math.min(m,m*parseFloat(mxUtils.getValue(this.style,"size",this.size))));m=(v-A)/2;x=m+A;var B=(p-A)/2;A=B+A;c.moveTo(0,m);c.lineTo(B,m);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,m);c.lineTo(p,m);c.lineTo(p,x);
-c.lineTo(A,x);c.lineTo(A,v);c.lineTo(B,v);c.lineTo(B,x);c.lineTo(0,x);c.close();c.end()};mxCellRenderer.registerShape("cross",za);mxUtils.extend(wa,mxActor);wa.prototype.size=.25;wa.prototype.redrawPath=function(c,m,x,p,v){m=Math.min(p,v/2);x=Math.min(p-m,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);c.moveTo(0,v/2);c.lineTo(x,0);c.lineTo(p-m,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-m,v);c.lineTo(x,v);c.close();c.end()};mxCellRenderer.registerShape("display",wa);mxUtils.extend(Da,
+"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(Qa,mxActor);Qa.prototype.size=30;Qa.prototype.isRoundable=function(){return!0};Qa.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(0,l),new mxPoint(p,0),new mxPoint(p,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("manualInput",Qa);mxUtils.extend(Ua,mxRectangleShape);Ua.prototype.dx=20;Ua.prototype.dy=20;Ua.prototype.isHtmlAllowed=function(){return!1};Ua.prototype.paintForeground=function(c,l,x,p,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
+var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(p*B,v*B))}B=Math.max(A,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,x+A);c.lineTo(l+p,x+A);c.end();c.stroke();c.begin();c.moveTo(l+B,x);c.lineTo(l+B,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Ua);
+mxUtils.extend(Ka,mxActor);Ka.prototype.dx=20;Ka.prototype.dy=20;Ka.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint(l,x),
+new mxPoint(l,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Ka);mxUtils.extend(bb,mxActor);bb.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.lineTo(0,v);c.end();c.moveTo(p,0);c.lineTo(p,v);c.end();c.moveTo(0,v/2);c.lineTo(p,v/2);c.end()};mxCellRenderer.registerShape("crossbar",bb);mxUtils.extend(Va,mxActor);Va.prototype.dx=20;Va.prototype.dy=20;Va.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint((p+l)/2,x),new mxPoint((p+l)/2,v),new mxPoint((p-l)/2,v),new mxPoint((p-l)/2,x),new mxPoint(0,x)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",Va);mxUtils.extend($a,
+mxActor);$a.prototype.arrowWidth=.3;$a.prototype.arrowSize=.2;$a.prototype.redrawPath=function(c,l,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,x),new mxPoint(p-l,x),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-
+l,v),new mxPoint(p-l,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",$a);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,l,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",$a.prototype.arrowWidth))));l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",$a.prototype.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;this.addPoints(c,[new mxPoint(0,v/2),new mxPoint(l,0),new mxPoint(l,x),new mxPoint(p-l,x),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-l,v),new mxPoint(p-l,A),new mxPoint(l,A),new mxPoint(l,v)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",z);mxUtils.extend(L,mxActor);L.prototype.size=.1;L.prototype.fixedSize=20;L.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
+"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(l,0);c.lineTo(p,0);c.quadTo(p-2*l,v/2,p,v);c.lineTo(l,v);c.quadTo(l-2*l,v/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",L);mxUtils.extend(M,mxActor);M.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.close();c.end()};mxCellRenderer.registerShape("or",M);mxUtils.extend(T,mxActor);T.prototype.redrawPath=function(c,
+l,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.quadTo(p/2,v/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",T);mxUtils.extend(ca,mxActor);ca.prototype.size=20;ca.prototype.isRoundable=function(){return!0};ca.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p/2,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(p-l,0),
+new mxPoint(p,.8*l),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,.8*l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("loopLimit",ca);mxUtils.extend(ia,mxActor);ia.prototype.size=.375;ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,
+0),new mxPoint(p,v-l),new mxPoint(p/2,v),new mxPoint(0,v-l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",ia);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+p/2,x+v);c.lineTo(l+p,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",ma);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);c.setShadow(!1);c.begin();c.moveTo(l,x+v/2);c.lineTo(l+p,x+v/2);c.end();c.stroke();c.begin();c.moveTo(l+p/2,x);c.lineTo(l+p/2,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",pa);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*p,x+.145*v);c.lineTo(l+.855*p,x+.855*v);c.end();c.stroke();c.begin();c.moveTo(l+.855*p,x+.145*v);c.lineTo(l+.145*p,
+x+.855*v);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",ua);mxUtils.extend(ya,mxRhombus);ya.prototype.paintVertexShape=function(c,l,x,p,v){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,x+v/2);c.lineTo(l+p,x+v/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ya);mxUtils.extend(Fa,mxEllipse);Fa.prototype.paintVertexShape=function(c,l,x,p,v){c.begin();c.moveTo(l,x);c.lineTo(l+p,x);c.lineTo(l+p/2,x+v/2);c.close();c.fillAndStroke();
+c.begin();c.moveTo(l,x+v);c.lineTo(l+p,x+v);c.lineTo(l+p/2,x+v/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",Fa);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,l,x,p,v){var A=c.state.strokeWidth/2,B=10+2*A,ha=x+v-B/2;c.begin();c.moveTo(l,x);c.lineTo(l,x+v);c.moveTo(l+A,ha);c.lineTo(l+A+B,ha-B/2);c.moveTo(l+A,ha);c.lineTo(l+A+B,ha+B/2);c.moveTo(l+A,ha);c.lineTo(l+p-A,ha);c.moveTo(l+p,x);c.lineTo(l+p,x+v);c.moveTo(l+p-A,ha);c.lineTo(l+p-B-A,ha-B/2);c.moveTo(l+
+p-A,ha);c.lineTo(l+p-B-A,ha+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Ma);mxUtils.extend(Oa,mxEllipse);Oa.prototype.drawHidden=!0;Oa.prototype.paintVertexShape=function(c,l,x,p,v){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var ha="1"==mxUtils.getValue(this.style,"top","1"),K="1"==mxUtils.getValue(this.style,
+"left","1"),xa="1"==mxUtils.getValue(this.style,"right","1"),na="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||ha||xa||na||K?(c.rect(l,x,p,v),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,x),this.outline||ha?c.lineTo(l+p,x):c.moveTo(l+p,x),this.outline||xa?c.lineTo(l+p,x+v):c.moveTo(l+p,x+v),this.outline||na?c.lineTo(l,x+v):c.moveTo(l,x+v),(this.outline||K)&&c.lineTo(l,x),c.end(),c.stroke(),c.setLineCap("flat")):
+c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Oa);mxUtils.extend(Pa,mxEllipse);Pa.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+p/2,x),c.lineTo(l+p/2,x+v)):(c.moveTo(l,x+v/2),c.lineTo(l+p,x+v/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Pa);mxUtils.extend(Sa,mxActor);Sa.prototype.redrawPath=function(c,
+l,x,p,v){l=Math.min(p,v/2);c.moveTo(0,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("delay",Sa);mxUtils.extend(za,mxActor);za.prototype.size=.2;za.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,p);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(v-A)/2;x=l+A;var B=(p-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(p,l);c.lineTo(p,x);
+c.lineTo(A,x);c.lineTo(A,v);c.lineTo(B,v);c.lineTo(B,x);c.lineTo(0,x);c.close();c.end()};mxCellRenderer.registerShape("cross",za);mxUtils.extend(wa,mxActor);wa.prototype.size=.25;wa.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/2);x=Math.min(p-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);c.moveTo(0,v/2);c.lineTo(x,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(x,v);c.close();c.end()};mxCellRenderer.registerShape("display",wa);mxUtils.extend(Da,
mxActor);Da.prototype.cst={RECT2:"mxgraph.basic.rect"};Da.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",
defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},
{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},
{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",
-dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Da.prototype.paintVertexShape=function(c,m,x,p,v){c.translate(m,
-x);this.strictDrawShape(c,0,0,p,v)};Da.prototype.strictDrawShape=function(c,m,x,p,v,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ha=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),K=A&&A.size?A.size:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),xa=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),na=A&&A.indent?
+dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Da.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,
+x);this.strictDrawShape(c,0,0,p,v)};Da.prototype.strictDrawShape=function(c,l,x,p,v,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ha=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),K=A&&A.size?A.size:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),xa=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),na=A&&A.indent?
A.indent:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),ab=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),db=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,na)),Ga=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),Ja=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ia=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ha=A&&A.left?A.left:
mxUtils.getValue(this.style,"left",!0),Ra=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Xa=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ya=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Za=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Eb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
A&&A.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Fb=A&&A.strokeWidth?A.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Cb=A&&A.fillColor2?A.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Db=A&&A.gradientColor2?A.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Gb=A&&A.gradientDirection2?A.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Hb=A&&A.opacity?A.opacity:mxUtils.getValue(this.style,"opacity","100"),
-Ib=Math.max(0,Math.min(50,K));A=Da.prototype;c.setDashed(ab);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Fb);K=Math.min(.5*v,.5*p,K);ha||(K=Ib*Math.min(p,v)/100);K=Math.min(K,.5*Math.min(p,v));ha||(na=Math.min(db*Math.min(p,v)/100));na=Math.min(na,.5*Math.min(p,v)-K);(Ga||Ja||Ia||Ha)&&"frame"!=xa&&(c.begin(),Ga?A.moveNW(c,m,x,p,v,B,Ra,K,Ha):c.moveTo(0,0),Ga&&A.paintNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),Ja&&A.paintNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),Ia&&
-A.paintSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),Ha&&A.paintSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Cb),ab=ha=Hb,"none"==Cb&&(ha=0),"none"==Db&&(ab=0),c.setGradient(Cb,Db,0,0,p,v,Gb,ha,ab),c.begin(),Ga?A.moveNWInner(c,m,x,p,v,B,Ra,K,na,Ga,Ha):c.moveTo(na,0),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),Ha&&Ia&&A.paintSWInner(c,m,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),Ia&&Ja&&A.paintSEInner(c,
-m,x,p,v,B,Ya,K,na),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),Ja&&Ga&&A.paintNEInner(c,m,x,p,v,B,Xa,K,na),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),Ga&&Ha&&A.paintNWInner(c,m,x,p,v,B,Ra,K,na),c.fill(),"none"==Eb&&(c.begin(),A.paintFolds(c,m,x,p,v,B,Ra,Xa,Ya,Za,K,Ga,Ja,Ia,Ha),c.stroke()));Ga||Ja||Ia||!Ha?Ga||Ja||!Ia||Ha?!Ga&&!Ja&&Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.paintSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),"double"==
-xa&&(A.moveNWInner(c,m,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),A.paintSWInner(c,m,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.paintSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),A.lineNWInner(c,m,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),A.paintSWInner(c,m,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),c.close(),
-c.fillAndStroke()):Ga||!Ja||Ia||Ha?!Ga&&Ja&&!Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSW(c,m,x,p,v,B,Ra,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),"double"==xa&&(A.moveNWInner(c,m,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha)),c.stroke(),c.begin(),A.moveNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),"double"==xa&&(A.moveSEInner(c,m,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja)),c.stroke()):(c.begin(),A.moveSW(c,m,x,p,v,B,Ra,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,
-K,Ga),A.lineNWInner(c,m,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.lineSEInner(c,m,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):!Ga&&Ja&&Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.paintSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),"double"==xa&&(A.moveSWInner(c,
-m,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,m,x,p,v,B,Ya,K,na),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja)),c.stroke()):(c.begin(),A.moveNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.paintSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.lineSWInner(c,m,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,m,x,p,v,B,Ya,K,na),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):!Ga&&
-Ja&&Ia&&Ha?"frame"!=xa?(c.begin(),A.moveNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.paintSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.paintSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),"double"==xa&&(A.moveNWInner(c,m,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),A.paintSWInner(c,m,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,m,x,p,v,B,Ya,K,na),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja)),c.stroke()):
-(c.begin(),A.moveNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.paintSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.paintSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),A.lineNWInner(c,m,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),A.paintSWInner(c,m,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,m,x,p,v,B,Ya,K,na),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):!Ga||Ja||Ia||Ha?
-Ga&&!Ja&&!Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),A.paintNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),"double"==xa&&(A.moveNEInner(c,m,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,m,x,p,v,B,Ra,K,na),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),A.paintNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.lineNEInner(c,
-m,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,m,x,p,v,B,Ra,K,na),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),c.close(),c.fillAndStroke()):Ga&&!Ja&&Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),"double"==xa&&(A.moveNEInner(c,m,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga)),c.stroke(),c.begin(),A.moveSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),"double"==xa&&(A.moveSWInner(c,m,x,p,v,B,Za,
-K,na,Ha),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.lineNEInner(c,m,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.lineSWInner(c,m,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),c.close(),c.fillAndStroke()):Ga&&!Ja&&Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSE(c,m,x,p,v,B,Ya,
-K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.paintSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),A.paintNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),"double"==xa&&(A.moveNEInner(c,m,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,m,x,p,v,B,Ra,K,na),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),A.paintSWInner(c,m,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,
-x,p,v,B,Za,K,Ha),A.paintSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),A.paintNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.lineNEInner(c,m,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,m,x,p,v,B,Ra,K,na),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),A.paintSWInner(c,m,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),c.close(),c.fillAndStroke()):Ga&&Ja&&!Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,
-m,x,p,v,B,Xa,K,Ja),A.paintNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),"double"==xa&&(A.moveSEInner(c,m,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,m,x,p,v,B,Xa,K,na),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.paintNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.lineSEInner(c,m,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,
-m,x,p,v,B,Xa,K,na),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),c.close(),c.fillAndStroke()):Ga&&Ja&&!Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),A.paintNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.paintNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),"double"==xa&&(A.moveSEInner(c,m,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,m,x,p,v,B,Xa,K,na),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,
-m,x,p,v,B,Ra,K,na),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),A.paintNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.paintNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.lineSEInner(c,m,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,m,x,p,v,B,Xa,K,na),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,m,x,p,v,B,Ra,K,na),A.paintLeftInner(c,m,x,p,
-v,B,Za,K,na,Ia,Ha),c.close(),c.fillAndStroke()):Ga&&Ja&&Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.paintNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.paintSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),"double"==xa&&(A.moveSWInner(c,m,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,m,x,p,v,B,Ya,K,na),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,m,x,p,v,B,Xa,K,na),A.paintTopInner(c,
-m,x,p,v,B,Ra,K,na,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.paintNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.paintSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.lineSWInner(c,m,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,m,x,p,v,B,Ya,K,na),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,m,x,p,v,B,Xa,K,na),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),c.close(),c.fillAndStroke()):
-Ga&&Ja&&Ia&&Ha&&("frame"!=xa?(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.paintNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.paintSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.paintSW(c,m,x,p,v,B,Za,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),c.close(),"double"==xa&&(A.moveSWInner(c,m,x,p,v,B,Za,K,na,Ha),A.paintSWInner(c,m,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,m,x,p,v,
-B,Ya,K,na),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,m,x,p,v,B,Xa,K,na),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,m,x,p,v,B,Ra,K,na),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),c.close()),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.paintNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.paintSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.paintSW(c,m,x,p,v,B,Za,K,Ia),
-A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),c.close(),A.moveSWInner(c,m,x,p,v,B,Za,K,na,Ha),A.paintSWInner(c,m,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,m,x,p,v,B,Ya,K,na),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,m,x,p,v,B,Xa,K,na),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,m,x,p,v,B,Ra,K,na),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),c.close(),c.fillAndStroke())):"frame"!=xa?(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,
-m,x,p,v,B,Xa,K,Ja),"double"==xa&&(A.moveNEInner(c,m,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ha),A.paintTop(c,m,x,p,v,B,Xa,K,Ja),A.lineNEInner(c,m,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,na,Ha,Ga),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),"double"==xa&&(A.moveSEInner(c,m,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja)),c.stroke()):
-(c.begin(),A.moveNE(c,m,x,p,v,B,Xa,K,Ga),A.paintRight(c,m,x,p,v,B,Ya,K,Ia),A.lineSEInner(c,m,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,m,x,p,v,B,Xa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),"double"==xa&&(A.moveSWInner(c,m,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,m,x,p,v,B,Ya,K,Ja),A.paintBottom(c,m,x,p,v,B,Za,K,Ha),A.lineSWInner(c,m,x,p,v,B,Za,K,na,Ha),
-A.paintBottomInner(c,m,x,p,v,B,Ya,K,na,Ja,Ia),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveSW(c,m,x,p,v,B,Ra,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),"double"==xa&&(A.moveNWInner(c,m,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,m,x,p,v,B,Ra,K,Ia),A.paintLeft(c,m,x,p,v,B,Ra,K,Ga),A.lineNWInner(c,m,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,m,x,p,v,B,Za,K,na,Ia,Ha),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,m,x,p,v,B,Ra,Xa,
-Ya,Za,K,Ga,Ja,Ia,Ha);c.stroke()};Da.prototype.moveNW=function(c,m,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,0):c.moveTo(0,ha)};Da.prototype.moveNE=function(c,m,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,0):c.moveTo(p-ha,0)};Da.prototype.moveSE=function(c,m,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,v):c.moveTo(p,v-ha)};Da.prototype.moveSW=function(c,m,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,
-v):c.moveTo(ha,v)};Da.prototype.paintNW=function(c,m,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){m=0;if("rounded"==B||"default"==B&&"rounded"==A)m=1;c.arcTo(ha,ha,0,0,m,ha,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(ha,0);else c.lineTo(0,0)};Da.prototype.paintTop=function(c,m,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(p,0):c.lineTo(p-ha,0)};Da.prototype.paintNE=
-function(c,m,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){m=0;if("rounded"==B||"default"==B&&"rounded"==A)m=1;c.arcTo(ha,ha,0,0,m,p,ha)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p,ha);else c.lineTo(p,0)};Da.prototype.paintRight=function(c,m,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(p,v):c.lineTo(p,v-ha)};Da.prototype.paintLeft=function(c,m,x,p,v,A,B,ha,K){"square"==
-B||"default"==B&&"square"==A||!K?c.lineTo(0,0):c.lineTo(0,ha)};Da.prototype.paintSE=function(c,m,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){m=0;if("rounded"==B||"default"==B&&"rounded"==A)m=1;c.arcTo(ha,ha,0,0,m,p-ha,v)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-ha,v);else c.lineTo(p,v)};Da.prototype.paintBottom=function(c,m,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(0,
-v):c.lineTo(ha,v)};Da.prototype.paintSW=function(c,m,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){m=0;if("rounded"==B||"default"==B&&"rounded"==A)m=1;c.arcTo(ha,ha,0,0,m,0,v-ha)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,v-ha);else c.lineTo(0,v)};Da.prototype.paintNWInner=function(c,m,x,p,v,A,B,ha,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,K,.5*K+ha);else if("invRound"==
-B||"default"==B&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,K,K+ha);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(K,.5*K+ha);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ha,K+ha),c.lineTo(K,K+ha)};Da.prototype.paintTopInner=function(c,m,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(0,K):xa&&!na?c.lineTo(K,0):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(ha+.5*K,K):c.lineTo(ha+K,K):c.lineTo(0,
-K):c.lineTo(0,0)};Da.prototype.paintNEInner=function(c,m,x,p,v,A,B,ha,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,p-ha-.5*K,K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,p-ha-K,K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-ha-.5*K,K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ha-K,ha+K),c.lineTo(p-ha-K,K)};Da.prototype.paintRightInner=function(c,m,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(p-K,0):xa&&!na?c.lineTo(p,
-K):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,ha+.5*K):c.lineTo(p-K,ha+K):c.lineTo(p-K,0):c.lineTo(p,0)};Da.prototype.paintLeftInner=function(c,m,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(K,v):xa&&!na?c.lineTo(0,v-K):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,v-ha-.5*K):c.lineTo(K,v-ha-K):
-c.lineTo(K,v):c.lineTo(0,v)};Da.prototype.paintSEInner=function(c,m,x,p,v,A,B,ha,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,p-K,v-ha-.5*K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,p-K,v-ha-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-K,v-ha-.5*K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ha-K,v-ha-K),c.lineTo(p-K,v-ha-K)};Da.prototype.paintBottomInner=function(c,m,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(p,
-v-K):xa&&!na?c.lineTo(p-K,v):"square"==B||"default"==B&&"square"==A||!xa?c.lineTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-ha-.5*K,v-K):c.lineTo(p-ha-K,v-K):c.lineTo(p,v)};Da.prototype.paintSWInner=function(c,m,x,p,v,A,B,ha,K,xa){if(!xa)c.lineTo(K,v);else if("square"==B||"default"==B&&"square"==A)c.lineTo(K,v-K);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,ha+.5*K,v-K);else if("invRound"==B||"default"==B&&"invRound"==
-A)c.arcTo(ha+K,ha+K,0,0,1,ha+K,v-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(ha+.5*K,v-K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ha,v-ha-K),c.lineTo(K+ha,v-K)};Da.prototype.moveSWInner=function(c,m,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.moveTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(K,v-ha-K):
-c.moveTo(0,v-K)};Da.prototype.lineSWInner=function(c,m,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,v-ha-K):c.lineTo(0,v-K)};Da.prototype.moveSEInner=function(c,m,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.moveTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-K,v-ha-K):c.moveTo(p-K,v)};Da.prototype.lineSEInner=function(c,m,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-K,v-ha-K):
-c.lineTo(p-K,v)};Da.prototype.moveNEInner=function(c,m,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A||xa?c.moveTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-K,ha+K):c.moveTo(p,K)};Da.prototype.lineNEInner=function(c,m,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A||xa?c.lineTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-K,ha+K):c.lineTo(p,K)};Da.prototype.moveNWInner=function(c,m,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.moveTo(K,0):xa&&!na?c.moveTo(0,K):"square"==B||"default"==B&&"square"==A?c.moveTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
-B&&"fold"==A)&&c.moveTo(K,ha+K):c.moveTo(0,0)};Da.prototype.lineNWInner=function(c,m,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(K,0):xa&&!na?c.lineTo(0,K):"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,ha+K):c.lineTo(0,0)};Da.prototype.paintFolds=function(c,m,x,p,v,A,B,ha,K,xa,na,ab,jb,db,Ga){if("fold"==
+Ib=Math.max(0,Math.min(50,K));A=Da.prototype;c.setDashed(ab);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Fb);K=Math.min(.5*v,.5*p,K);ha||(K=Ib*Math.min(p,v)/100);K=Math.min(K,.5*Math.min(p,v));ha||(na=Math.min(db*Math.min(p,v)/100));na=Math.min(na,.5*Math.min(p,v)-K);(Ga||Ja||Ia||Ha)&&"frame"!=xa&&(c.begin(),Ga?A.moveNW(c,l,x,p,v,B,Ra,K,Ha):c.moveTo(0,0),Ga&&A.paintNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Xa,K,Ja),Ja&&A.paintNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),Ia&&
+A.paintSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),Ha&&A.paintSW(c,l,x,p,v,B,Za,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Cb),ab=ha=Hb,"none"==Cb&&(ha=0),"none"==Db&&(ab=0),c.setGradient(Cb,Db,0,0,p,v,Gb,ha,ab),c.begin(),Ga?A.moveNWInner(c,l,x,p,v,B,Ra,K,na,Ga,Ha):c.moveTo(na,0),A.paintLeftInner(c,l,x,p,v,B,Za,K,na,Ia,Ha),Ha&&Ia&&A.paintSWInner(c,l,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),Ia&&Ja&&A.paintSEInner(c,
+l,x,p,v,B,Ya,K,na),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),Ja&&Ga&&A.paintNEInner(c,l,x,p,v,B,Xa,K,na),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),Ga&&Ha&&A.paintNWInner(c,l,x,p,v,B,Ra,K,na),c.fill(),"none"==Eb&&(c.begin(),A.paintFolds(c,l,x,p,v,B,Ra,Xa,Ya,Za,K,Ga,Ja,Ia,Ha),c.stroke()));Ga||Ja||Ia||!Ha?Ga||Ja||!Ia||Ha?!Ga&&!Ja&&Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.paintSW(c,l,x,p,v,B,Za,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),"double"==
+xa&&(A.moveNWInner(c,l,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,l,x,p,v,B,Za,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.paintSW(c,l,x,p,v,B,Za,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),A.lineNWInner(c,l,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,l,x,p,v,B,Za,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),c.close(),
+c.fillAndStroke()):Ga||!Ja||Ia||Ha?!Ga&&Ja&&!Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSW(c,l,x,p,v,B,Ra,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),"double"==xa&&(A.moveNWInner(c,l,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,l,x,p,v,B,Za,K,na,Ia,Ha)),c.stroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Ra,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,
+K,Ga),A.lineNWInner(c,l,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,l,x,p,v,B,Za,K,na,Ia,Ha),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.lineSEInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):!Ga&&Ja&&Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.paintSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),"double"==xa&&(A.moveSWInner(c,
+l,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,K,na),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja)),c.stroke()):(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.paintSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.lineSWInner(c,l,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,K,na),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):!Ga&&
+Ja&&Ia&&Ha?"frame"!=xa?(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.paintSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.paintSW(c,l,x,p,v,B,Za,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),"double"==xa&&(A.moveNWInner(c,l,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,l,x,p,v,B,Za,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,K,na),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja)),c.stroke()):
+(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.paintSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.paintSW(c,l,x,p,v,B,Za,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),A.lineNWInner(c,l,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,l,x,p,v,B,Za,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,K,na),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):!Ga||Ja||Ia||Ha?
+Ga&&!Ja&&!Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSW(c,l,x,p,v,B,Za,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),A.paintNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Xa,K,Ja),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,l,x,p,v,B,Ra,K,na),A.paintLeftInner(c,l,x,p,v,B,Za,K,na,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Za,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),A.paintNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Xa,K,Ja),A.lineNEInner(c,
+l,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,l,x,p,v,B,Ra,K,na),A.paintLeftInner(c,l,x,p,v,B,Za,K,na,Ia,Ha),c.close(),c.fillAndStroke()):Ga&&!Ja&&Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Xa,K,Ja),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga)),c.stroke(),c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Za,
+K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Xa,K,Ja),A.lineNEInner(c,l,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.lineSWInner(c,l,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),c.close(),c.fillAndStroke()):Ga&&!Ja&&Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,
+K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.paintSW(c,l,x,p,v,B,Za,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),A.paintNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Xa,K,Ja),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,l,x,p,v,B,Ra,K,na),A.paintLeftInner(c,l,x,p,v,B,Za,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,
+x,p,v,B,Za,K,Ha),A.paintSW(c,l,x,p,v,B,Za,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),A.paintNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Xa,K,Ja),A.lineNEInner(c,l,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,l,x,p,v,B,Ra,K,na),A.paintLeftInner(c,l,x,p,v,B,Za,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),c.close(),c.fillAndStroke()):Ga&&Ja&&!Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,
+l,x,p,v,B,Xa,K,Ja),A.paintNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Xa,K,na),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Xa,K,Ja),A.paintNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.lineSEInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,
+l,x,p,v,B,Xa,K,na),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),c.close(),c.fillAndStroke()):Ga&&Ja&&!Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSW(c,l,x,p,v,B,Za,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),A.paintNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Xa,K,Ja),A.paintNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Xa,K,na),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,
+l,x,p,v,B,Ra,K,na),A.paintLeftInner(c,l,x,p,v,B,Za,K,na,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Za,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),A.paintNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Xa,K,Ja),A.paintNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.lineSEInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Xa,K,na),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,l,x,p,v,B,Ra,K,na),A.paintLeftInner(c,l,x,p,
+v,B,Za,K,na,Ia,Ha),c.close(),c.fillAndStroke()):Ga&&Ja&&Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Xa,K,Ja),A.paintNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.paintSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,K,na),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Xa,K,na),A.paintTopInner(c,
+l,x,p,v,B,Ra,K,na,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Xa,K,Ja),A.paintNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.paintSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.lineSWInner(c,l,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,K,na),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Xa,K,na),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),c.close(),c.fillAndStroke()):
+Ga&&Ja&&Ia&&Ha&&("frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Xa,K,Ja),A.paintNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.paintSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.paintSW(c,l,x,p,v,B,Za,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),c.close(),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Za,K,na,Ha),A.paintSWInner(c,l,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,
+B,Ya,K,na),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Xa,K,na),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,l,x,p,v,B,Ra,K,na),A.paintLeftInner(c,l,x,p,v,B,Za,K,na,Ia,Ha),c.close()),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Xa,K,Ja),A.paintNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.paintSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.paintSW(c,l,x,p,v,B,Za,K,Ia),
+A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),c.close(),A.moveSWInner(c,l,x,p,v,B,Za,K,na,Ha),A.paintSWInner(c,l,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,K,na),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Xa,K,na),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),A.paintNWInner(c,l,x,p,v,B,Ra,K,na),A.paintLeftInner(c,l,x,p,v,B,Za,K,na,Ia,Ha),c.close(),c.fillAndStroke())):"frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,
+l,x,p,v,B,Xa,K,Ja),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,K,Ha),A.paintTop(c,l,x,p,v,B,Xa,K,Ja),A.lineNEInner(c,l,x,p,v,B,Xa,K,na,Ja),A.paintTopInner(c,l,x,p,v,B,Ra,K,na,Ha,Ga),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja)),c.stroke()):
+(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.lineSEInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.lineSWInner(c,l,x,p,v,B,Za,K,na,Ha),
+A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveSW(c,l,x,p,v,B,Ra,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),"double"==xa&&(A.moveNWInner(c,l,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,l,x,p,v,B,Za,K,na,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Ra,K,Ia),A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),A.lineNWInner(c,l,x,p,v,B,Ra,K,na,Ga,Ha),A.paintLeftInner(c,l,x,p,v,B,Za,K,na,Ia,Ha),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,x,p,v,B,Ra,Xa,
+Ya,Za,K,Ga,Ja,Ia,Ha);c.stroke()};Da.prototype.moveNW=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,0):c.moveTo(0,ha)};Da.prototype.moveNE=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,0):c.moveTo(p-ha,0)};Da.prototype.moveSE=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,v):c.moveTo(p,v-ha)};Da.prototype.moveSW=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,
+v):c.moveTo(ha,v)};Da.prototype.paintNW=function(c,l,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ha,ha,0,0,l,ha,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(ha,0);else c.lineTo(0,0)};Da.prototype.paintTop=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(p,0):c.lineTo(p-ha,0)};Da.prototype.paintNE=
+function(c,l,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ha,ha,0,0,l,p,ha)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p,ha);else c.lineTo(p,0)};Da.prototype.paintRight=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(p,v):c.lineTo(p,v-ha)};Da.prototype.paintLeft=function(c,l,x,p,v,A,B,ha,K){"square"==
+B||"default"==B&&"square"==A||!K?c.lineTo(0,0):c.lineTo(0,ha)};Da.prototype.paintSE=function(c,l,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ha,ha,0,0,l,p-ha,v)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-ha,v);else c.lineTo(p,v)};Da.prototype.paintBottom=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(0,
+v):c.lineTo(ha,v)};Da.prototype.paintSW=function(c,l,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ha,ha,0,0,l,0,v-ha)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,v-ha);else c.lineTo(0,v)};Da.prototype.paintNWInner=function(c,l,x,p,v,A,B,ha,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,K,.5*K+ha);else if("invRound"==
+B||"default"==B&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,K,K+ha);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(K,.5*K+ha);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ha,K+ha),c.lineTo(K,K+ha)};Da.prototype.paintTopInner=function(c,l,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(0,K):xa&&!na?c.lineTo(K,0):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(ha+.5*K,K):c.lineTo(ha+K,K):c.lineTo(0,
+K):c.lineTo(0,0)};Da.prototype.paintNEInner=function(c,l,x,p,v,A,B,ha,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,p-ha-.5*K,K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,p-ha-K,K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-ha-.5*K,K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ha-K,ha+K),c.lineTo(p-ha-K,K)};Da.prototype.paintRightInner=function(c,l,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(p-K,0):xa&&!na?c.lineTo(p,
+K):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,ha+.5*K):c.lineTo(p-K,ha+K):c.lineTo(p-K,0):c.lineTo(p,0)};Da.prototype.paintLeftInner=function(c,l,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(K,v):xa&&!na?c.lineTo(0,v-K):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,v-ha-.5*K):c.lineTo(K,v-ha-K):
+c.lineTo(K,v):c.lineTo(0,v)};Da.prototype.paintSEInner=function(c,l,x,p,v,A,B,ha,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,p-K,v-ha-.5*K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,p-K,v-ha-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-K,v-ha-.5*K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ha-K,v-ha-K),c.lineTo(p-K,v-ha-K)};Da.prototype.paintBottomInner=function(c,l,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(p,
+v-K):xa&&!na?c.lineTo(p-K,v):"square"==B||"default"==B&&"square"==A||!xa?c.lineTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-ha-.5*K,v-K):c.lineTo(p-ha-K,v-K):c.lineTo(p,v)};Da.prototype.paintSWInner=function(c,l,x,p,v,A,B,ha,K,xa){if(!xa)c.lineTo(K,v);else if("square"==B||"default"==B&&"square"==A)c.lineTo(K,v-K);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,ha+.5*K,v-K);else if("invRound"==B||"default"==B&&"invRound"==
+A)c.arcTo(ha+K,ha+K,0,0,1,ha+K,v-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(ha+.5*K,v-K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ha,v-ha-K),c.lineTo(K+ha,v-K)};Da.prototype.moveSWInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.moveTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(K,v-ha-K):
+c.moveTo(0,v-K)};Da.prototype.lineSWInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,v-ha-K):c.lineTo(0,v-K)};Da.prototype.moveSEInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.moveTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==
+A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-K,v-ha-K):c.moveTo(p-K,v)};Da.prototype.lineSEInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-K,v-ha-K):
+c.lineTo(p-K,v)};Da.prototype.moveNEInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A||xa?c.moveTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-K,ha+K):c.moveTo(p,K)};Da.prototype.lineNEInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A||xa?c.lineTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==
+A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-K,ha+K):c.lineTo(p,K)};Da.prototype.moveNWInner=function(c,l,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.moveTo(K,0):xa&&!na?c.moveTo(0,K):"square"==B||"default"==B&&"square"==A?c.moveTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
+B&&"fold"==A)&&c.moveTo(K,ha+K):c.moveTo(0,0)};Da.prototype.lineNWInner=function(c,l,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(K,0):xa&&!na?c.lineTo(0,K):"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,ha+K):c.lineTo(0,0)};Da.prototype.paintFolds=function(c,l,x,p,v,A,B,ha,K,xa,na,ab,jb,db,Ga){if("fold"==
A||"fold"==B||"fold"==ha||"fold"==K||"fold"==xa)("fold"==B||"default"==B&&"fold"==A)&&ab&&Ga&&(c.moveTo(0,na),c.lineTo(na,na),c.lineTo(na,0)),("fold"==ha||"default"==ha&&"fold"==A)&&ab&&jb&&(c.moveTo(p-na,0),c.lineTo(p-na,na),c.lineTo(p,na)),("fold"==K||"default"==K&&"fold"==A)&&db&&jb&&(c.moveTo(p-na,v),c.lineTo(p-na,v-na),c.lineTo(p,v-na)),("fold"==xa||"default"==xa&&"fold"==A)&&db&&Ga&&(c.moveTo(0,v-na),c.lineTo(na,v-na),c.lineTo(na,v))};mxCellRenderer.registerShape(Da.prototype.cst.RECT2,Da);
-Da.prototype.constraints=null;mxUtils.extend(Ea,mxConnector);Ea.prototype.origPaintEdgeShape=Ea.prototype.paintEdgeShape;Ea.prototype.paintEdgeShape=function(c,m,x){for(var p=[],v=0;v<m.length;v++)p.push(mxUtils.clone(m[v]));v=c.state.dashed;var A=c.state.fixDash;Ea.prototype.origPaintEdgeShape.apply(this,[c,p,x]);3<=c.state.strokeWidth&&(p=mxUtils.getValue(this.style,"fillColor",null),null!=p&&(c.setStrokeColor(p),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(v,A),Ea.prototype.origPaintEdgeShape.apply(this,
-[c,m,x])))};mxCellRenderer.registerShape("filledEdge",Ea);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var m=this.editorUi.getSelectionState(),x=c.apply(this,arguments);"umlFrame"==m.style.shape&&x.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return x}}();mxMarker.addMarker("dash",function(c,m,x,p,v,A,B,ha,K,xa){var na=v*(B+K+1),ab=A*(B+K+1);return function(){c.begin();
-c.moveTo(p.x-na/2-ab/2,p.y-ab/2+na/2);c.lineTo(p.x+ab/2-3*na/2,p.y-3*ab/2-na/2);c.stroke()}});mxMarker.addMarker("box",function(c,m,x,p,v,A,B,ha,K,xa){var na=v*(B+K+1),ab=A*(B+K+1),jb=p.x+na/2,db=p.y+ab/2;p.x-=na;p.y-=ab;return function(){c.begin();c.moveTo(jb-na/2-ab/2,db-ab/2+na/2);c.lineTo(jb-na/2+ab/2,db-ab/2-na/2);c.lineTo(jb+ab/2-3*na/2,db-3*ab/2-na/2);c.lineTo(jb-ab/2-3*na/2,db-3*ab/2+na/2);c.close();xa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,m,x,p,v,A,B,ha,K,
-xa){var na=v*(B+K+1),ab=A*(B+K+1);return function(){c.begin();c.moveTo(p.x-na/2-ab/2,p.y-ab/2+na/2);c.lineTo(p.x+ab/2-3*na/2,p.y-3*ab/2-na/2);c.moveTo(p.x-na/2+ab/2,p.y-ab/2-na/2);c.lineTo(p.x-ab/2-3*na/2,p.y-3*ab/2+na/2);c.stroke()}});mxMarker.addMarker("circle",La);mxMarker.addMarker("circlePlus",function(c,m,x,p,v,A,B,ha,K,xa){var na=p.clone(),ab=La.apply(this,arguments),jb=v*(B+2*K),db=A*(B+2*K);return function(){ab.apply(this,arguments);c.begin();c.moveTo(na.x-v*K,na.y-A*K);c.lineTo(na.x-2*jb+
-v*K,na.y-2*db+A*K);c.moveTo(na.x-jb-db+A*K,na.y-db+jb-v*K);c.lineTo(na.x+db-jb-A*K,na.y-db-jb+v*K);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,m,x,p,v,A,B,ha,K,xa){var na=v*(B+K+1),ab=A*(B+K+1),jb=p.clone();p.x-=na;p.y-=ab;return function(){c.begin();c.moveTo(jb.x-ab,jb.y+na);c.quadTo(p.x-ab,p.y+na,p.x,p.y);c.quadTo(p.x+ab,p.y-na,jb.x+ab,jb.y-na);c.stroke()}});mxMarker.addMarker("async",function(c,m,x,p,v,A,B,ha,K,xa){m=v*K*1.118;x=A*K*1.118;v*=B+K;A*=B+K;var na=p.clone();na.x-=m;na.y-=
-x;p.x+=-v-m;p.y+=-A-x;return function(){c.begin();c.moveTo(na.x,na.y);ha?c.lineTo(na.x-v-A/2,na.y-A+v/2):c.lineTo(na.x+A/2-v,na.y-A-v/2);c.lineTo(na.x-v,na.y-A);c.close();xa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(m,x,p,v,A,B,ha,K,xa,na){A*=ha+xa;B*=ha+xa;var ab=v.clone();return function(){m.begin();m.moveTo(ab.x,ab.y);K?m.lineTo(ab.x-A-B/c,ab.y-B+A/c):m.lineTo(ab.x+B/c-A,ab.y-B-A/c);m.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var hb=
-function(c,m,x){return lb(c,["width"],m,function(p,v,A,B,ha){ha=c.shape.getEdgeWidth()*c.view.scale+x;return new mxPoint(B.x+v*p/4+A*ha/2,B.y+A*p/4-v*ha/2)},function(p,v,A,B,ha,K){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));c.style.width=Math.round(2*p)/c.view.scale-x})},lb=function(c,m,x,p,v){return eb(c,m,function(A){var B=c.absolutePoints,ha=B.length-1;A=c.view.translate;var K=c.view.scale,xa=x?B[0]:B[ha];B=x?B[1]:B[ha-1];ha=B.x-xa.x;var na=B.y-xa.y,ab=Math.sqrt(ha*ha+na*na);xa=
-p.call(this,ab,ha/ab,na/ab,xa,B);return new mxPoint(xa.x/K-A.x,xa.y/K-A.y)},function(A,B,ha){var K=c.absolutePoints,xa=K.length-1;A=c.view.translate;var na=c.view.scale,ab=x?K[0]:K[xa];K=x?K[1]:K[xa-1];xa=K.x-ab.x;var jb=K.y-ab.y,db=Math.sqrt(xa*xa+jb*jb);B.x=(B.x+A.x)*na;B.y=(B.y+A.y)*na;v.call(this,db,xa/db,jb/db,ab,K,B,ha)})},rb=function(c){return function(m){return[eb(m,["arrowWidth","arrowSize"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",$a.prototype.arrowWidth))),
-v=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",$a.prototype.arrowSize)));return new mxPoint(x.x+(1-v)*x.width,x.y+(1-p)*x.height/2)},function(x,p){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(x.y+x.height/2-p.y)/x.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(x.x+x.width-p.x)/x.width))})]}},vb=function(c){return function(m){return[eb(m,["size"],function(x){var p=Math.max(0,Math.min(.5*x.height,parseFloat(mxUtils.getValue(this.state.style,"size",
-c))));return new mxPoint(x.x,x.y+p)},function(x,p){this.state.style.size=Math.max(0,p.y-x.y)},!0)]}},ob=function(c,m,x){return function(p){var v=[eb(p,["size"],function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",m)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];x&&mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,
-!1)&&v.push(kb(p));return v}},Ab=function(c,m,x,p,v){x=null!=x?x:.5;return function(A){var B=[eb(A,["size"],function(ha){var K=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,xa=parseFloat(mxUtils.getValue(this.state.style,"size",K?v:c));return new mxPoint(ha.x+Math.max(0,Math.min(.5*ha.width,xa*(K?1:ha.width))),ha.getCenterY())},function(ha,K,xa){ha=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?K.x-ha.x:Math.max(0,Math.min(x,(K.x-ha.x)/ha.width));this.state.style.size=
-ha},!1,p)];m&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(kb(A));return B}},Bb=function(c,m,x){c=null!=c?c:.5;return function(p){var v=[eb(p,["size"],function(A){var B=null!=x?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ha=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?x:m)));return new mxPoint(A.x+Math.min(.75*A.width*c,ha*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=x&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-
-A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,!1)&&v.push(kb(p));return v}},ub=function(){return function(c){var m=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(kb(c));return m}},kb=function(c,m){return eb(c,[mxConstants.STYLE_ARCSIZE],function(x){var p=null!=m?m:x.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var v=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
+Da.prototype.constraints=null;mxUtils.extend(Ea,mxConnector);Ea.prototype.origPaintEdgeShape=Ea.prototype.paintEdgeShape;Ea.prototype.paintEdgeShape=function(c,l,x){for(var p=[],v=0;v<l.length;v++)p.push(mxUtils.clone(l[v]));v=c.state.dashed;var A=c.state.fixDash;Ea.prototype.origPaintEdgeShape.apply(this,[c,p,x]);3<=c.state.strokeWidth&&(p=mxUtils.getValue(this.style,"fillColor",null),null!=p&&(c.setStrokeColor(p),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(v,A),Ea.prototype.origPaintEdgeShape.apply(this,
+[c,l,x])))};mxCellRenderer.registerShape("filledEdge",Ea);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),x=c.apply(this,arguments);"umlFrame"==l.style.shape&&x.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return x}}();mxMarker.addMarker("dash",function(c,l,x,p,v,A,B,ha,K,xa){var na=v*(B+K+1),ab=A*(B+K+1);return function(){c.begin();
+c.moveTo(p.x-na/2-ab/2,p.y-ab/2+na/2);c.lineTo(p.x+ab/2-3*na/2,p.y-3*ab/2-na/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,x,p,v,A,B,ha,K,xa){var na=v*(B+K+1),ab=A*(B+K+1),jb=p.x+na/2,db=p.y+ab/2;p.x-=na;p.y-=ab;return function(){c.begin();c.moveTo(jb-na/2-ab/2,db-ab/2+na/2);c.lineTo(jb-na/2+ab/2,db-ab/2-na/2);c.lineTo(jb+ab/2-3*na/2,db-3*ab/2-na/2);c.lineTo(jb-ab/2-3*na/2,db-3*ab/2+na/2);c.close();xa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,x,p,v,A,B,ha,K,
+xa){var na=v*(B+K+1),ab=A*(B+K+1);return function(){c.begin();c.moveTo(p.x-na/2-ab/2,p.y-ab/2+na/2);c.lineTo(p.x+ab/2-3*na/2,p.y-3*ab/2-na/2);c.moveTo(p.x-na/2+ab/2,p.y-ab/2-na/2);c.lineTo(p.x-ab/2-3*na/2,p.y-3*ab/2+na/2);c.stroke()}});mxMarker.addMarker("circle",La);mxMarker.addMarker("circlePlus",function(c,l,x,p,v,A,B,ha,K,xa){var na=p.clone(),ab=La.apply(this,arguments),jb=v*(B+2*K),db=A*(B+2*K);return function(){ab.apply(this,arguments);c.begin();c.moveTo(na.x-v*K,na.y-A*K);c.lineTo(na.x-2*jb+
+v*K,na.y-2*db+A*K);c.moveTo(na.x-jb-db+A*K,na.y-db+jb-v*K);c.lineTo(na.x+db-jb-A*K,na.y-db-jb+v*K);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,x,p,v,A,B,ha,K,xa){var na=v*(B+K+1),ab=A*(B+K+1),jb=p.clone();p.x-=na;p.y-=ab;return function(){c.begin();c.moveTo(jb.x-ab,jb.y+na);c.quadTo(p.x-ab,p.y+na,p.x,p.y);c.quadTo(p.x+ab,p.y-na,jb.x+ab,jb.y-na);c.stroke()}});mxMarker.addMarker("async",function(c,l,x,p,v,A,B,ha,K,xa){l=v*K*1.118;x=A*K*1.118;v*=B+K;A*=B+K;var na=p.clone();na.x-=l;na.y-=
+x;p.x+=-v-l;p.y+=-A-x;return function(){c.begin();c.moveTo(na.x,na.y);ha?c.lineTo(na.x-v-A/2,na.y-A+v/2):c.lineTo(na.x+A/2-v,na.y-A-v/2);c.lineTo(na.x-v,na.y-A);c.close();xa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,x,p,v,A,B,ha,K,xa,na){A*=ha+xa;B*=ha+xa;var ab=v.clone();return function(){l.begin();l.moveTo(ab.x,ab.y);K?l.lineTo(ab.x-A-B/c,ab.y-B+A/c):l.lineTo(ab.x+B/c-A,ab.y-B-A/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var hb=
+function(c,l,x){return lb(c,["width"],l,function(p,v,A,B,ha){ha=c.shape.getEdgeWidth()*c.view.scale+x;return new mxPoint(B.x+v*p/4+A*ha/2,B.y+A*p/4-v*ha/2)},function(p,v,A,B,ha,K){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));c.style.width=Math.round(2*p)/c.view.scale-x})},lb=function(c,l,x,p,v){return eb(c,l,function(A){var B=c.absolutePoints,ha=B.length-1;A=c.view.translate;var K=c.view.scale,xa=x?B[0]:B[ha];B=x?B[1]:B[ha-1];ha=B.x-xa.x;var na=B.y-xa.y,ab=Math.sqrt(ha*ha+na*na);xa=
+p.call(this,ab,ha/ab,na/ab,xa,B);return new mxPoint(xa.x/K-A.x,xa.y/K-A.y)},function(A,B,ha){var K=c.absolutePoints,xa=K.length-1;A=c.view.translate;var na=c.view.scale,ab=x?K[0]:K[xa];K=x?K[1]:K[xa-1];xa=K.x-ab.x;var jb=K.y-ab.y,db=Math.sqrt(xa*xa+jb*jb);B.x=(B.x+A.x)*na;B.y=(B.y+A.y)*na;v.call(this,db,xa/db,jb/db,ab,K,B,ha)})},rb=function(c){return function(l){return[eb(l,["arrowWidth","arrowSize"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",$a.prototype.arrowWidth))),
+v=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",$a.prototype.arrowSize)));return new mxPoint(x.x+(1-v)*x.width,x.y+(1-p)*x.height/2)},function(x,p){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(x.y+x.height/2-p.y)/x.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(x.x+x.width-p.x)/x.width))})]}},vb=function(c){return function(l){return[eb(l,["size"],function(x){var p=Math.max(0,Math.min(.5*x.height,parseFloat(mxUtils.getValue(this.state.style,"size",
+c))));return new mxPoint(x.x,x.y+p)},function(x,p){this.state.style.size=Math.max(0,p.y-x.y)},!0)]}},ob=function(c,l,x){return function(p){var v=[eb(p,["size"],function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];x&&mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,
+!1)&&v.push(kb(p));return v}},Ab=function(c,l,x,p,v){x=null!=x?x:.5;return function(A){var B=[eb(A,["size"],function(ha){var K=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,xa=parseFloat(mxUtils.getValue(this.state.style,"size",K?v:c));return new mxPoint(ha.x+Math.max(0,Math.min(.5*ha.width,xa*(K?1:ha.width))),ha.getCenterY())},function(ha,K,xa){ha=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?K.x-ha.x:Math.max(0,Math.min(x,(K.x-ha.x)/ha.width));this.state.style.size=
+ha},!1,p)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(kb(A));return B}},Bb=function(c,l,x){c=null!=c?c:.5;return function(p){var v=[eb(p,["size"],function(A){var B=null!=x?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ha=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?x:l)));return new mxPoint(A.x+Math.min(.75*A.width*c,ha*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=x&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-
+A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,!1)&&v.push(kb(p));return v}},ub=function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l}},kb=function(c,l){return eb(c,[mxConstants.STYLE_ARCSIZE],function(x){var p=null!=l?l:x.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var v=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
mxConstants.LINE_ARCSIZE)/2;return new mxPoint(x.x+x.width-Math.min(x.width/2,v),x.y+p)}v=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(x.x+x.width-Math.min(Math.max(x.width/2,x.height/2),Math.min(x.width,x.height)*v),x.y+p)},function(x,p,v){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(x.width,2*(x.x+x.width-
-p.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(x.width-p.x+x.x)/Math.min(x.width,x.height))))})},eb=function(c,m,x,p,v,A,B){var ha=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ha.execute=function(xa){for(var na=0;na<m.length;na++)this.copyStyle(m[na]);B&&B(xa)};ha.getPosition=x;ha.setPosition=p;ha.ignoreGrid=null!=v?v:!0;if(A){var K=ha.positionChanged;ha.positionChanged=function(){K.apply(this,arguments);c.view.invalidate(this.state.cell);
-c.view.validate()}}return ha},mb={link:function(c){return[hb(c,!0,10),hb(c,!1,10)]},flexArrow:function(c){var m=c.view.graph.gridSize/c.view.scale,x=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(lb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ha){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;
+p.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(x.width-p.x+x.x)/Math.min(x.width,x.height))))})},eb=function(c,l,x,p,v,A,B){var ha=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ha.execute=function(xa){for(var na=0;na<l.length;na++)this.copyStyle(l[na]);B&&B(xa)};ha.getPosition=x;ha.setPosition=p;ha.ignoreGrid=null!=v?v:!0;if(A){var K=ha.positionChanged;ha.positionChanged=function(){K.apply(this,arguments);c.view.invalidate(this.state.cell);
+c.view.validate()}}return ha},mb={link:function(c){return[hb(c,!0,10),hb(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,x=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(lb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ha){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;
return new mxPoint(B.x+v*(ha+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ha+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ha,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
-c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(xa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<m/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),x.push(lb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ha){p=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
+c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(xa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),x.push(lb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ha){p=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
5)*c.view.scale;return new mxPoint(B.x+v*(ha+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ha+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ha,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
-c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(xa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<m/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<m&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(lb(c,
+c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(xa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(lb(c,
["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,ha){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ha+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ha+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ha,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,K.x,K.y);
-c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(xa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<m/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),
+c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(xa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),
x.push(lb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,ha){p=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ha+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ha+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ha,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,
B.y,B.x+A,B.y-v,K.x,K.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.endWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(xa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<
-m/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<m&&(c.style.endWidth=c.style.startWidth))})));return x},swimlane:function(c){var m=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var x=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));m.push(kb(c,x/2))}m.push(eb(c,[mxConstants.STYLE_STARTSIZE],function(p){var v=parseFloat(mxUtils.getValue(c.style,
+l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return x},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var x=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(kb(c,x/2))}l.push(eb(c,[mxConstants.STYLE_STARTSIZE],function(p){var v=parseFloat(mxUtils.getValue(c.style,
mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(p.getCenterX(),p.y+Math.max(0,Math.min(p.height,v))):new mxPoint(p.x+Math.max(0,Math.min(p.width,v)),p.getCenterY())},function(p,v){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(p.height,v.y-p.y))):Math.round(Math.max(0,Math.min(p.width,v.x-p.x)))},!1,null,function(p){var v=
-c.view.graph;if(!mxEvent.isShiftDown(p.getEvent())&&!mxEvent.isControlDown(p.getEvent())&&(v.isTableRow(c.cell)||v.isTableCell(c.cell))){p=v.getSwimlaneDirection(c.style);var A=v.model.getParent(c.cell);A=v.model.getChildCells(A,!0);for(var B=[],ha=0;ha<A.length;ha++)A[ha]!=c.cell&&v.isSwimlane(A[ha])&&v.getSwimlaneDirection(v.getCurrentCellStyle(A[ha]))==p&&B.push(A[ha]);v.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return m},label:ub(),ext:ub(),rectangle:ub(),
-triangle:ub(),rhombus:ub(),umlLifeline:function(c){return[eb(c,["size"],function(m){var x=Math.max(0,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(m.getCenterX(),m.y+x)},function(m,x){this.state.style.size=Math.round(Math.max(0,Math.min(m.height,x.y-m.y)))},!1)]},umlFrame:function(c){return[eb(c,["width","height"],function(m){var x=Math.max(W.prototype.corner,Math.min(m.width,mxUtils.getValue(this.state.style,"width",W.prototype.width))),
-p=Math.max(1.5*W.prototype.corner,Math.min(m.height,mxUtils.getValue(this.state.style,"height",W.prototype.height)));return new mxPoint(m.x+x,m.y+p)},function(m,x){this.state.style.width=Math.round(Math.max(W.prototype.corner,Math.min(m.width,x.x-m.x)));this.state.style.height=Math.round(Math.max(1.5*W.prototype.corner,Math.min(m.height,x.y-m.y)))},!1)]},process:function(c){var m=[eb(c,["size"],function(x){var p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,
-"size",ea.prototype.size));return p?new mxPoint(x.x+v,x.y+x.height/4):new mxPoint(x.x+x.width*v,x.y+x.height/4)},function(x,p){x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*x.width,p.x-x.x)):Math.max(0,Math.min(.5,(p.x-x.x)/x.width));this.state.style.size=x},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(kb(c));return m},cross:function(c){return[eb(c,["size"],function(m){var x=Math.min(m.width,m.height);x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"size",za.prototype.size)))*x/2;return new mxPoint(m.getCenterX()-x,m.getCenterY()-x)},function(m,x){var p=Math.min(m.width,m.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,m.getCenterY()-x.y)/p*2,Math.max(0,m.getCenterX()-x.x)/p*2)))})]},note:function(c){return[eb(c,["size"],function(m){var x=Math.max(0,Math.min(m.width,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(m.x+m.width-x,m.y+x)},function(m,x){this.state.style.size=
-Math.round(Math.max(0,Math.min(Math.min(m.width,m.x+m.width-x.x),Math.min(m.height,x.y-m.y))))})]},note2:function(c){return[eb(c,["size"],function(m){var x=Math.max(0,Math.min(m.width,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size)))));return new mxPoint(m.x+m.width-x,m.y+x)},function(m,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(m.width,m.x+m.width-x.x),Math.min(m.height,x.y-m.y))))})]},manualInput:function(c){var m=[eb(c,["size"],function(x){var p=
-Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",Qa.prototype.size)));return new mxPoint(x.x+x.width/4,x.y+3*p/4)},function(x,p){this.state.style.size=Math.round(Math.max(0,Math.min(x.height,4*(p.y-x.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(kb(c));return m},dataStorage:function(c){return[eb(c,["size"],function(m){var x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",x?L.prototype.fixedSize:
-L.prototype.size));return new mxPoint(m.x+m.width-p*(x?1:m.width),m.getCenterY())},function(m,x){m="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(m.width,m.x+m.width-x.x)):Math.max(0,Math.min(1,(m.x+m.width-x.x)/m.width));this.state.style.size=m},!1)]},callout:function(c){var m=[eb(c,["size","position"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ja.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+c.view.graph;if(!mxEvent.isShiftDown(p.getEvent())&&!mxEvent.isControlDown(p.getEvent())&&(v.isTableRow(c.cell)||v.isTableCell(c.cell))){p=v.getSwimlaneDirection(c.style);var A=v.model.getParent(c.cell);A=v.model.getChildCells(A,!0);for(var B=[],ha=0;ha<A.length;ha++)A[ha]!=c.cell&&v.isSwimlane(A[ha])&&v.getSwimlaneDirection(v.getCurrentCellStyle(A[ha]))==p&&B.push(A[ha]);v.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return l},label:ub(),ext:ub(),rectangle:ub(),
+triangle:ub(),rhombus:ub(),umlLifeline:function(c){return[eb(c,["size"],function(l){var x=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(l.getCenterX(),l.y+x)},function(l,x){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},umlFrame:function(c){return[eb(c,["width","height"],function(l){var x=Math.max(W.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",W.prototype.width))),
+p=Math.max(1.5*W.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",W.prototype.height)));return new mxPoint(l.x+x,l.y+p)},function(l,x){this.state.style.width=Math.round(Math.max(W.prototype.corner,Math.min(l.width,x.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*W.prototype.corner,Math.min(l.height,x.y-l.y)))},!1)]},process:function(c){var l=[eb(c,["size"],function(x){var p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,
+"size",ea.prototype.size));return p?new mxPoint(x.x+v,x.y+x.height/4):new mxPoint(x.x+x.width*v,x.y+x.height/4)},function(x,p){x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*x.width,p.x-x.x)):Math.max(0,Math.min(.5,(p.x-x.x)/x.width));this.state.style.size=x},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},cross:function(c){return[eb(c,["size"],function(l){var x=Math.min(l.width,l.height);x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"size",za.prototype.size)))*x/2;return new mxPoint(l.getCenterX()-x,l.getCenterY()-x)},function(l,x){var p=Math.min(l.width,l.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-x.y)/p*2,Math.max(0,l.getCenterX()-x.x)/p*2)))})]},note:function(c){return[eb(c,["size"],function(l){var x=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(l.x+l.width-x,l.y+x)},function(l,x){this.state.style.size=
+Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-x.x),Math.min(l.height,x.y-l.y))))})]},note2:function(c){return[eb(c,["size"],function(l){var x=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size)))));return new mxPoint(l.x+l.width-x,l.y+x)},function(l,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-x.x),Math.min(l.height,x.y-l.y))))})]},manualInput:function(c){var l=[eb(c,["size"],function(x){var p=
+Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",Qa.prototype.size)));return new mxPoint(x.x+x.width/4,x.y+3*p/4)},function(x,p){this.state.style.size=Math.round(Math.max(0,Math.min(x.height,4*(p.y-x.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},dataStorage:function(c){return[eb(c,["size"],function(l){var x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",x?L.prototype.fixedSize:
+L.prototype.size));return new mxPoint(l.x+l.width-p*(x?1:l.width),l.getCenterY())},function(l,x){l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-x.x)):Math.max(0,Math.min(1,(l.x+l.width-x.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[eb(c,["size","position"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ja.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
"position",ja.prototype.position)));mxUtils.getValue(this.state.style,"base",ja.prototype.base);return new mxPoint(x.x+v*x.width,x.y+x.height-p)},function(x,p){mxUtils.getValue(this.state.style,"base",ja.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(x.height,x.y+x.height-p.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),eb(c,["position2"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ja.prototype.position2)));
return new mxPoint(x.x+p*x.width,x.y+x.height)},function(x,p){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),eb(c,["base"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ja.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ja.prototype.position))),A=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"base",ja.prototype.base)));return new mxPoint(x.x+Math.min(x.width,
-v*x.width+A),x.y+x.height-p)},function(x,p){var v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ja.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(x.width,p.x-x.x-v*x.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(kb(c));return m},internalStorage:function(c){var m=[eb(c,["dx","dy"],function(x){var p=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"dx",Ua.prototype.dx))),v=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,
-"dy",Ua.prototype.dy)));return new mxPoint(x.x+p,x.y+v)},function(x,p){this.state.style.dx=Math.round(Math.max(0,Math.min(x.width,p.x-x.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(x.height,p.y-x.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(kb(c));return m},module:function(c){return[eb(c,["jettyWidth","jettyHeight"],function(m){var x=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"jettyWidth",va.prototype.jettyWidth))),p=Math.max(0,Math.min(m.height,
-mxUtils.getValue(this.state.style,"jettyHeight",va.prototype.jettyHeight)));return new mxPoint(m.x+x/2,m.y+2*p)},function(m,x){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(m.width,x.x-m.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(m.height,x.y-m.y))/2)})]},corner:function(c){return[eb(c,["dx","dy"],function(m){var x=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"dx",Ka.prototype.dx))),p=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,
-"dy",Ka.prototype.dy)));return new mxPoint(m.x+x,m.y+p)},function(m,x){this.state.style.dx=Math.round(Math.max(0,Math.min(m.width,x.x-m.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(m.height,x.y-m.y)))},!1)]},tee:function(c){return[eb(c,["dx","dy"],function(m){var x=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"dx",Va.prototype.dx))),p=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"dy",Va.prototype.dy)));return new mxPoint(m.x+(m.width+x)/2,m.y+p)},function(m,
-x){this.state.style.dx=Math.round(Math.max(0,2*Math.min(m.width/2,x.x-m.x-m.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(m.height,x.y-m.y)))},!1)]},singleArrow:rb(1),doubleArrow:rb(.5),folder:function(c){return[eb(c,["tabWidth","tabHeight"],function(m){var x=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"tabWidth",C.prototype.tabWidth))),p=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"tabHeight",C.prototype.tabHeight)));mxUtils.getValue(this.state.style,
-"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(x=m.width-x);return new mxPoint(m.x+x,m.y+p)},function(m,x){var p=Math.max(0,Math.min(m.width,x.x-m.x));mxUtils.getValue(this.state.style,"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(p=m.width-p);this.state.style.tabWidth=Math.round(p);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(m.height,x.y-m.y)))},!1)]},document:function(c){return[eb(c,["size"],function(m){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
-"size",da.prototype.size))));return new mxPoint(m.x+3*m.width/4,m.y+(1-x)*m.height)},function(m,x){this.state.style.size=Math.max(0,Math.min(1,(m.y+m.height-x.y)/m.height))},!1)]},tape:function(c){return[eb(c,["size"],function(m){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(m.getCenterX(),m.y+x*m.height/2)},function(m,x){this.state.style.size=Math.max(0,Math.min(1,(x.y-m.y)/m.height*2))},!1)]},isoCube2:function(c){return[eb(c,
-["isoAngle"],function(m){var x=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",l.isoAngle))))*Math.PI/200;return new mxPoint(m.x,m.y+Math.min(m.width*Math.tan(x),.5*m.height))},function(m,x){this.state.style.isoAngle=Math.max(0,50*(x.y-m.y)/m.height)},!0)]},cylinder2:vb(q.prototype.size),cylinder3:vb(y.prototype.size),offPageConnector:function(c){return[eb(c,["size"],function(m){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ia.prototype.size))));
-return new mxPoint(m.getCenterX(),m.y+(1-x)*m.height)},function(m,x){this.state.style.size=Math.max(0,Math.min(1,(m.y+m.height-x.y)/m.height))},!1)]},"mxgraph.basic.rect":function(c){var m=[Graph.createHandle(c,["size"],function(x){var p=Math.max(0,Math.min(x.width/2,x.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(x.x+p,x.y+p)},function(x,p){this.state.style.size=Math.round(100*Math.max(0,Math.min(x.height/2,x.width/2,p.x-x.x)))/100})];c=Graph.createHandle(c,
-["indent"],function(x){var p=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(x.x+.75*x.width,x.y+p*x.height/200)},function(x,p){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(p.y-x.y)/x.height)))/100});m.push(c);return m},step:Ab(U.prototype.size,!0,null,!0,U.prototype.fixedSize),hexagon:Ab(I.prototype.size,!0,.5,!0,I.prototype.fixedSize),curlyBracket:Ab(qa.prototype.size,!1),display:Ab(wa.prototype.size,!1),cube:ob(1,
-n.prototype.size,!1),card:ob(.5,G.prototype.size,!0),loopLimit:ob(.5,ca.prototype.size,!0),trapezoid:Bb(.5,Y.prototype.size,Y.prototype.fixedSize),parallelogram:Bb(1,ba.prototype.size,ba.prototype.fixedSize)};Graph.createHandle=eb;Graph.handleFactory=mb;var wb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=wb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var m=this.state.style.shape;null==mxCellRenderer.defaultShapes[m]&&
-null==mxStencilRegistry.getStencil(m)?m=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(m=mxConstants.SHAPE_SWIMLANE);m=mb[m];null==m&&null!=this.state.shape&&this.state.shape.isRoundable()&&(m=mb[mxConstants.SHAPE_RECTANGLE]);null!=m&&(m=m(this.state),null!=m&&(c=null==c?m:c.concat(m)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);
-c=mb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var pb=new mxPoint(1,0),xb=new mxPoint(1,0),zb=mxUtils.toRadians(-30);pb=mxUtils.getRotatedPoint(pb,Math.cos(zb),Math.sin(zb));var yb=mxUtils.toRadians(-150);xb=mxUtils.getRotatedPoint(xb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,m,x,p,v){var A=c.view;p=null!=p&&0<p.length?p[0]:null;var B=c.absolutePoints,ha=B[0];B=B[B.length-1];null!=p&&(p=A.transformControlPoint(c,p));
-null==ha&&null!=m&&(ha=new mxPoint(m.getCenterX(),m.getCenterY()));null==B&&null!=x&&(B=new mxPoint(x.getCenterX(),x.getCenterY()));var K=pb.x,xa=pb.y,na=xb.x,ab=xb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ha){c=function(Ga,Ja,Ia){Ga-=db.x;var Ha=Ja-db.y;Ja=(ab*Ga-na*Ha)/(K*ab-xa*na);Ga=(xa*Ga-K*Ha)/(xa*na-K*ab);jb?(Ia&&(db=new mxPoint(db.x+K*Ja,db.y+xa*Ja),v.push(db)),db=new mxPoint(db.x+na*Ga,db.y+ab*Ga)):(Ia&&(db=new mxPoint(db.x+na*Ga,db.y+ab*Ga),v.push(db)),
-db=new mxPoint(db.x+K*Ja,db.y+xa*Ja));v.push(db)};var db=ha;null==p&&(p=new mxPoint(ha.x+(B.x-ha.x)/2,ha.y+(B.y-ha.y)/2));c(p.x,p.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var nb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,m){if(m==mxEdgeStyle.IsometricConnector){var x=new mxElbowEdgeHandler(c);x.snapToTerminals=!1;return x}return nb.apply(this,arguments)};t.prototype.constraints=[];E.prototype.getConstraints=
-function(c,m,x){c=[];var p=Math.tan(mxUtils.toRadians(30)),v=(.5-p)/2;p=Math.min(m,x/(.5+p));m=(m-p)/2;x=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,x+.25*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+.5*p,x+p*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+p,x+.25*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+p,x+.75*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+.5*p,x+(1-v)*p));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,m,x+.75*p));return c};l.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;p=Math.min(m*Math.tan(p),.5*x);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,p));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,x-p));c.push(new mxConnectionConstraint(new mxPoint(.5,
-1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));return c};ja.prototype.getConstraints=function(c,m,x){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var p=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var v=m*Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(x-p)));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,m,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-p)));m>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+v*x.width+A),x.y+x.height-p)},function(x,p){var v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ja.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(x.width,p.x-x.x-v*x.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},internalStorage:function(c){var l=[eb(c,["dx","dy"],function(x){var p=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"dx",Ua.prototype.dx))),v=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,
+"dy",Ua.prototype.dy)));return new mxPoint(x.x+p,x.y+v)},function(x,p){this.state.style.dx=Math.round(Math.max(0,Math.min(x.width,p.x-x.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(x.height,p.y-x.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},module:function(c){return[eb(c,["jettyWidth","jettyHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",va.prototype.jettyWidth))),p=Math.max(0,Math.min(l.height,
+mxUtils.getValue(this.state.style,"jettyHeight",va.prototype.jettyHeight)));return new mxPoint(l.x+x/2,l.y+2*p)},function(l,x){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,x.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,x.y-l.y))/2)})]},corner:function(c){return[eb(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Ka.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,
+"dy",Ka.prototype.dy)));return new mxPoint(l.x+x,l.y+p)},function(l,x){this.state.style.dx=Math.round(Math.max(0,Math.min(l.width,x.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},tee:function(c){return[eb(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Va.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Va.prototype.dy)));return new mxPoint(l.x+(l.width+x)/2,l.y+p)},function(l,
+x){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,x.x-l.x-l.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},singleArrow:rb(1),doubleArrow:rb(.5),folder:function(c){return[eb(c,["tabWidth","tabHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",C.prototype.tabWidth))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",C.prototype.tabHeight)));mxUtils.getValue(this.state.style,
+"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(x=l.width-x);return new mxPoint(l.x+x,l.y+p)},function(l,x){var p=Math.max(0,Math.min(l.width,x.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(p=l.width-p);this.state.style.tabWidth=Math.round(p);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},document:function(c){return[eb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
+"size",da.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-x)*l.height)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-x.y)/l.height))},!1)]},tape:function(c){return[eb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(l.getCenterX(),l.y+x*l.height/2)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(x.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[eb(c,
+["isoAngle"],function(l){var x=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",m.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(x),.5*l.height))},function(l,x){this.state.style.isoAngle=Math.max(0,50*(x.y-l.y)/l.height)},!0)]},cylinder2:vb(q.prototype.size),cylinder3:vb(y.prototype.size),offPageConnector:function(c){return[eb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ia.prototype.size))));
+return new mxPoint(l.getCenterX(),l.y+(1-x)*l.height)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-x.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(x){var p=Math.max(0,Math.min(x.width/2,x.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(x.x+p,x.y+p)},function(x,p){this.state.style.size=Math.round(100*Math.max(0,Math.min(x.height/2,x.width/2,p.x-x.x)))/100})];c=Graph.createHandle(c,
+["indent"],function(x){var p=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(x.x+.75*x.width,x.y+p*x.height/200)},function(x,p){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(p.y-x.y)/x.height)))/100});l.push(c);return l},step:Ab(U.prototype.size,!0,null,!0,U.prototype.fixedSize),hexagon:Ab(I.prototype.size,!0,.5,!0,I.prototype.fixedSize),curlyBracket:Ab(qa.prototype.size,!1),display:Ab(wa.prototype.size,!1),cube:ob(1,
+n.prototype.size,!1),card:ob(.5,G.prototype.size,!0),loopLimit:ob(.5,ca.prototype.size,!0),trapezoid:Bb(.5,Y.prototype.size,Y.prototype.fixedSize),parallelogram:Bb(1,ba.prototype.size,ba.prototype.fixedSize)};Graph.createHandle=eb;Graph.handleFactory=mb;var wb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=wb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&
+null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(l=mxConstants.SHAPE_SWIMLANE);l=mb[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=mb[mxConstants.SHAPE_RECTANGLE]);null!=l&&(l=l(this.state),null!=l&&(c=null==c?l:c.concat(l)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);
+c=mb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var pb=new mxPoint(1,0),xb=new mxPoint(1,0),zb=mxUtils.toRadians(-30);pb=mxUtils.getRotatedPoint(pb,Math.cos(zb),Math.sin(zb));var yb=mxUtils.toRadians(-150);xb=mxUtils.getRotatedPoint(xb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,l,x,p,v){var A=c.view;p=null!=p&&0<p.length?p[0]:null;var B=c.absolutePoints,ha=B[0];B=B[B.length-1];null!=p&&(p=A.transformControlPoint(c,p));
+null==ha&&null!=l&&(ha=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=x&&(B=new mxPoint(x.getCenterX(),x.getCenterY()));var K=pb.x,xa=pb.y,na=xb.x,ab=xb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ha){c=function(Ga,Ja,Ia){Ga-=db.x;var Ha=Ja-db.y;Ja=(ab*Ga-na*Ha)/(K*ab-xa*na);Ga=(xa*Ga-K*Ha)/(xa*na-K*ab);jb?(Ia&&(db=new mxPoint(db.x+K*Ja,db.y+xa*Ja),v.push(db)),db=new mxPoint(db.x+na*Ga,db.y+ab*Ga)):(Ia&&(db=new mxPoint(db.x+na*Ga,db.y+ab*Ga),v.push(db)),
+db=new mxPoint(db.x+K*Ja,db.y+xa*Ja));v.push(db)};var db=ha;null==p&&(p=new mxPoint(ha.x+(B.x-ha.x)/2,ha.y+(B.y-ha.y)/2));c(p.x,p.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var nb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var x=new mxElbowEdgeHandler(c);x.snapToTerminals=!1;return x}return nb.apply(this,arguments)};t.prototype.constraints=[];E.prototype.getConstraints=
+function(c,l,x){c=[];var p=Math.tan(mxUtils.toRadians(30)),v=(.5-p)/2;p=Math.min(l,x/(.5+p));l=(l-p)/2;x=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,x+.25*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*p,x+p*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+p,x+.25*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+p,x+.75*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*p,x+(1-v)*p));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,l,x+.75*p));return c};m.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;p=Math.min(l*Math.tan(p),.5*x);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,x-p));c.push(new mxConnectionConstraint(new mxPoint(.5,
+1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));return c};ja.prototype.getConstraints=function(c,l,x){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var p=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var v=l*Math.max(0,
+Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(x-p)));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,l,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-p)));l>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,
1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Oa.prototype.constraints=mxRectangleShape.prototype.constraints;
-mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(0,Math.min(m,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(m-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));m>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};G.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(0,Math.min(m,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));m>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};n.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(0,Math.min(m,Math.min(x,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(m+p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-p)));return c};y.prototype.getConstraints=function(c,m,x){c=[];m=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,m));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-m));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m+.5*(.5*x-m)));c.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,m+.5*(.5*x-m)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,x-m-.5*(.5*x-m)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-m-.5*(.5*x-m)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*m));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*m));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-m));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-m));return c};C.prototype.getConstraints=
-function(c,m,x){c=[];var p=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,p,v)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),v))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,v)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,m,.25*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,
+mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(l-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));l>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};G.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));l>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};n.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,Math.min(x,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(l+p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-p)));return c};y.prototype.getConstraints=function(c,l,x){c=[];l=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l+.5*(.5*x-l)));c.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1,null,0,l+.5*(.5*x-l)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,x-l-.5*(.5*x-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-l-.5*(.5*x-l)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-l));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-l));return c};C.prototype.getConstraints=
+function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,p,v)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,v)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,l,.25*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Ua.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;ma.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;
-ua.prototype.constraints=mxEllipse.prototype.constraints;Pa.prototype.constraints=mxEllipse.prototype.constraints;Qa.prototype.constraints=mxRectangleShape.prototype.constraints;Sa.prototype.constraints=mxRectangleShape.prototype.constraints;wa.prototype.getConstraints=function(c,m,x){c=[];var p=Math.min(m,x/2),v=Math.min(m-p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*m);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+m-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+m-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};va.prototype.getConstraints=function(c,m,x){m=parseFloat(mxUtils.getValue(c,
-"jettyWidth",va.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",va.prototype.jettyHeight));var p=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,m),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
-.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,m),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(x-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(x-.5*c,3.5*c))];x>5*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,m));x>8*c&&p.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1,null,m));x>15*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,m));return p};ca.prototype.constraints=mxRectangleShape.prototype.constraints;ia.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,
+ua.prototype.constraints=mxEllipse.prototype.constraints;Pa.prototype.constraints=mxEllipse.prototype.constraints;Qa.prototype.constraints=mxRectangleShape.prototype.constraints;Sa.prototype.constraints=mxRectangleShape.prototype.constraints;wa.prototype.getConstraints=function(c,l,x){c=[];var p=Math.min(l,x/2),v=Math.min(l-p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+l-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+l-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};va.prototype.getConstraints=function(c,l,x){l=parseFloat(mxUtils.getValue(c,
+"jettyWidth",va.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",va.prototype.jettyHeight));var p=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
+.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(x-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(x-.5*c,3.5*c))];x>5*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,l));x>8*c&&p.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1,null,l));x>15*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return p};ca.prototype.constraints=mxRectangleShape.prototype.constraints;ia.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)];fa.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)];Aa.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,
@@ -2908,85 +2912,85 @@ ua.prototype.constraints=mxEllipse.prototype.constraints;Pa.prototype.constraint
.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)];ba.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
-0),!0),new mxConnectionConstraint(new mxPoint(0,.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;Va.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,
-"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*m+.25*p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(m+p),.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),x));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*m-.25*p,v));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*v));return c};Ka.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,m,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,x));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+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;Va.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,
+"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*l+.25*p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(l+p),.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),x));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*l-.25*p,v));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*v));return c};Ka.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,l,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,x));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
1),!1));return c};bb.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)];$a.prototype.getConstraints=
-function(c,m,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),v=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-v),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-v),x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));return c};z.prototype.getConstraints=function(c,m,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",$a.prototype.arrowWidth)))),v=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",$a.prototype.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*m,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*m,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};za.prototype.getConstraints=
-function(c,m,x){c=[];var p=Math.min(x,m),v=Math.max(0,Math.min(p,p*parseFloat(mxUtils.getValue(this.style,"size",this.size))));p=(x-v)/2;var A=p+v,B=(m-v)/2;v=B+v;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,v,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,x));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+v),p));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,m,p));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+v),A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+function(c,l,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-v),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-v),x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));return c};z.prototype.getConstraints=function(c,l,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",$a.prototype.arrowWidth)))),v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",$a.prototype.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};za.prototype.getConstraints=
+function(c,l,x){c=[];var p=Math.min(x,l),v=Math.max(0,Math.min(p,p*parseFloat(mxUtils.getValue(this.style,"size",this.size))));p=(x-v)/2;var A=p+v,B=(l-v)/2;v=B+v;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,v,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,x));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+v),p));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+v),A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,p));return c};N.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)];T.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)];Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];oa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
-Actions.prototype.init=function(){function b(g){t.escape();g=t.deleteCells(t.getDeletableCells(t.getSelectionCells()),g);null!=g&&t.setSelectionCells(g)}function e(){if(!t.isSelectionEmpty()){t.getModel().beginUpdate();try{for(var g=t.getSelectionCells(),l=0;l<g.length;l++)t.cellLabelChanged(g[l],"")}finally{t.getModel().endUpdate()}}}function k(g,l,q,y,F){F.getModel().beginUpdate();try{var C=F.getCellGeometry(g);null!=C&&q&&y&&(q/=y,C=C.clone(),1<q?C.height=C.width/q:C.width=C.height*q,F.getModel().setGeometry(g,
-C));F.setCellStyles(mxConstants.STYLE_CLIP_PATH,l,[g]);F.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[g])}finally{F.getModel().endUpdate()}}var n=this.editorUi,D=n.editor,t=D.graph,E=function(){return Action.prototype.isEnabled.apply(this,arguments)&&t.isEnabled()};this.addAction("new...",function(){t.openLink(n.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";n.openFile()});this.addAction("smartFit",function(){t.popupMenuHandler.hideMenu();var g=t.view.scale,
-l=t.view.translate.x,q=t.view.translate.y;n.actions.get("resetView").funct();1E-5>Math.abs(g-t.view.scale)&&l==t.view.translate.x&&q==t.view.translate.y&&n.actions.get(t.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){t.isEnabled()&&(t.isSelectionEmpty()?n.actions.get("smartFit").funct():t.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){n.hideDialog()}));
-window.openFile.setConsumer(mxUtils.bind(this,function(g,l){try{var q=mxUtils.parseXml(g);D.graph.setSelectionCells(D.graph.importGraphModel(q.documentElement))}catch(y){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+y.message)}}));n.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=E;this.addAction("save",function(){n.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=E;this.addAction("saveAs...",function(){n.saveFile(!0)},null,
+Actions.prototype.init=function(){function b(g){t.escape();g=t.deleteCells(t.getDeletableCells(t.getSelectionCells()),g);null!=g&&t.setSelectionCells(g)}function e(){if(!t.isSelectionEmpty()){t.getModel().beginUpdate();try{for(var g=t.getSelectionCells(),m=0;m<g.length;m++)t.cellLabelChanged(g[m],"")}finally{t.getModel().endUpdate()}}}function k(g,m,q,y,F){F.getModel().beginUpdate();try{var C=F.getCellGeometry(g);null!=C&&q&&y&&(q/=y,C=C.clone(),1<q?C.height=C.width/q:C.width=C.height*q,F.getModel().setGeometry(g,
+C));F.setCellStyles(mxConstants.STYLE_CLIP_PATH,m,[g]);F.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[g])}finally{F.getModel().endUpdate()}}var n=this.editorUi,D=n.editor,t=D.graph,E=function(){return Action.prototype.isEnabled.apply(this,arguments)&&t.isEnabled()};this.addAction("new...",function(){t.openLink(n.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";n.openFile()});this.addAction("smartFit",function(){t.popupMenuHandler.hideMenu();var g=t.view.scale,
+m=t.view.translate.x,q=t.view.translate.y;n.actions.get("resetView").funct();1E-5>Math.abs(g-t.view.scale)&&m==t.view.translate.x&&q==t.view.translate.y&&n.actions.get(t.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){t.isEnabled()&&(t.isSelectionEmpty()?n.actions.get("smartFit").funct():t.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){n.hideDialog()}));
+window.openFile.setConsumer(mxUtils.bind(this,function(g,m){try{var q=mxUtils.parseXml(g);D.graph.setSelectionCells(D.graph.importGraphModel(q.documentElement))}catch(y){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+y.message)}}));n.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=E;this.addAction("save",function(){n.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=E;this.addAction("saveAs...",function(){n.saveFile(!0)},null,
null,Editor.ctrlKey+"+Shift+S").isEnabled=E;this.addAction("export...",function(){n.showDialog((new ExportDialog(n)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var g=new EditDiagramDialog(n);n.showDialog(g.container,620,420,!0,!1);g.init()});this.addAction("pageSetup...",function(){n.showDialog((new PageSetupDialog(n)).container,320,240,!0,!0)}).isEnabled=E;this.addAction("print...",function(){n.showDialog((new PrintDialog(n)).container,300,180,!0,!0)},null,"sprite-print",
-Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(t,null,10,10)});this.addAction("undo",function(){n.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){n.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var g=null;try{g=n.copyXml(),null!=g&&t.removeCells(g,!1)}catch(l){}null==g&&mxClipboard.cut(t)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{n.copyXml()}catch(g){}try{mxClipboard.copy(t)}catch(g){n.handleError(g)}},
-null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())){var g=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(l){if(null!=l){t.getModel().beginUpdate();try{n.pasteXml(l,!0)}finally{t.getModel().endUpdate()}}else mxClipboard.paste(t)}),g=!0)}catch(l){}g||mxClipboard.paste(t)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(g){function l(y){if(null!=y){for(var F=!0,C=0;C<
-y.length&&F;C++)F=F&&t.model.isEdge(y[C]);var H=t.view.translate;C=t.view.scale;var G=H.x,aa=H.y;H=null;if(1==y.length&&F){var da=t.getCellGeometry(y[0]);null!=da&&(H=da.getTerminalPoint(!0))}H=null!=H?H:t.getBoundingBoxFromGeometry(y,F);null!=H&&(F=Math.round(t.snap(t.popupMenuHandler.triggerX/C-G)),C=Math.round(t.snap(t.popupMenuHandler.triggerY/C-aa)),t.cellsMoved(y,F-H.x,C-H.y))}}function q(){t.getModel().beginUpdate();try{l(mxClipboard.paste(t))}finally{t.getModel().endUpdate()}}if(t.isEnabled()&&
-!t.isCellLocked(t.getDefaultParent())){g=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(y){if(null!=y){t.getModel().beginUpdate();try{l(n.pasteXml(y,!0))}finally{t.getModel().endUpdate()}}else q()}),g=!0)}catch(y){}g||q()}});this.addAction("copySize",function(){var g=t.getSelectionCell();t.isEnabled()&&null!=g&&t.getModel().isVertex(g)&&(g=t.getCellGeometry(g),null!=g&&(n.copiedSize=new mxRectangle(g.x,g.y,g.width,g.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
-function(){if(t.isEnabled()&&!t.isSelectionEmpty()&&null!=n.copiedSize){t.getModel().beginUpdate();try{for(var g=t.getResizableCells(t.getSelectionCells()),l=0;l<g.length;l++)if(t.getModel().isVertex(g[l])){var q=t.getCellGeometry(g[l]);null!=q&&(q=q.clone(),q.width=n.copiedSize.width,q.height=n.copiedSize.height,t.getModel().setGeometry(g[l],q))}}finally{t.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var g=t.getSelectionCell()||t.getModel().getRoot();t.isEnabled()&&
-null!=g&&(g=g.cloneValue(),null==g||isNaN(g.nodeType)||(n.copiedValue=g))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(g,l){function q(C,H){var G=y.getValue(C);H=C.cloneValue(H);H.removeAttribute("placeholders");null==G||isNaN(G.nodeType)||H.setAttribute("placeholders",G.getAttribute("placeholders"));null!=g&&mxEvent.isShiftDown(g)||H.setAttribute("label",t.convertValueToString(C));y.setValue(C,H)}g=null!=l?l:g;var y=t.getModel();if(t.isEnabled()&&!t.isSelectionEmpty()&&null!=n.copiedValue){y.beginUpdate();
-try{var F=t.getEditableCells(t.getSelectionCells());if(0==F.length)q(y.getRoot(),n.copiedValue);else for(l=0;l<F.length;l++)q(F[l],n.copiedValue)}finally{y.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(g,l){g=null!=l?l:g;null!=g&&mxEvent.isShiftDown(g)?e():b(null!=g&&(mxEvent.isControlDown(g)||mxEvent.isMetaDown(g)||mxEvent.isAltDown(g)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+
+Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(t,null,10,10)});this.addAction("undo",function(){n.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){n.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var g=null;try{g=n.copyXml(),null!=g&&t.removeCells(g,!1)}catch(m){}null==g&&mxClipboard.cut(t)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{n.copyXml()}catch(g){}try{mxClipboard.copy(t)}catch(g){n.handleError(g)}},
+null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())){var g=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(m){if(null!=m){t.getModel().beginUpdate();try{n.pasteXml(m,!0)}finally{t.getModel().endUpdate()}}else mxClipboard.paste(t)}),g=!0)}catch(m){}g||mxClipboard.paste(t)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(g){function m(y){if(null!=y){for(var F=!0,C=0;C<
+y.length&&F;C++)F=F&&t.model.isEdge(y[C]);var H=t.view.translate;C=t.view.scale;var G=H.x,aa=H.y;H=null;if(1==y.length&&F){var da=t.getCellGeometry(y[0]);null!=da&&(H=da.getTerminalPoint(!0))}H=null!=H?H:t.getBoundingBoxFromGeometry(y,F);null!=H&&(F=Math.round(t.snap(t.popupMenuHandler.triggerX/C-G)),C=Math.round(t.snap(t.popupMenuHandler.triggerY/C-aa)),t.cellsMoved(y,F-H.x,C-H.y))}}function q(){t.getModel().beginUpdate();try{m(mxClipboard.paste(t))}finally{t.getModel().endUpdate()}}if(t.isEnabled()&&
+!t.isCellLocked(t.getDefaultParent())){g=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(y){if(null!=y){t.getModel().beginUpdate();try{m(n.pasteXml(y,!0))}finally{t.getModel().endUpdate()}}else q()}),g=!0)}catch(y){}g||q()}});this.addAction("copySize",function(){var g=t.getSelectionCell();t.isEnabled()&&null!=g&&t.getModel().isVertex(g)&&(g=t.getCellGeometry(g),null!=g&&(n.copiedSize=new mxRectangle(g.x,g.y,g.width,g.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
+function(){if(t.isEnabled()&&!t.isSelectionEmpty()&&null!=n.copiedSize){t.getModel().beginUpdate();try{for(var g=t.getResizableCells(t.getSelectionCells()),m=0;m<g.length;m++)if(t.getModel().isVertex(g[m])){var q=t.getCellGeometry(g[m]);null!=q&&(q=q.clone(),q.width=n.copiedSize.width,q.height=n.copiedSize.height,t.getModel().setGeometry(g[m],q))}}finally{t.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var g=t.getSelectionCell()||t.getModel().getRoot();t.isEnabled()&&
+null!=g&&(g=g.cloneValue(),null==g||isNaN(g.nodeType)||(n.copiedValue=g))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(g,m){function q(C,H){var G=y.getValue(C);H=C.cloneValue(H);H.removeAttribute("placeholders");null==G||isNaN(G.nodeType)||H.setAttribute("placeholders",G.getAttribute("placeholders"));null!=g&&mxEvent.isShiftDown(g)||H.setAttribute("label",t.convertValueToString(C));y.setValue(C,H)}g=null!=m?m:g;var y=t.getModel();if(t.isEnabled()&&!t.isSelectionEmpty()&&null!=n.copiedValue){y.beginUpdate();
+try{var F=t.getEditableCells(t.getSelectionCells());if(0==F.length)q(y.getRoot(),n.copiedValue);else for(m=0;m<F.length;m++)q(F[m],n.copiedValue)}finally{y.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(g,m){g=null!=m?m:g;null!=g&&mxEvent.isShiftDown(g)?e():b(null!=g&&(mxEvent.isControlDown(g)||mxEvent.isMetaDown(g)||mxEvent.isAltDown(g)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+
"+Delete");this.addAction("duplicate",function(){try{t.setSelectionCells(t.duplicateCells()),t.scrollCellToVisible(t.getSelectionCell())}catch(g){n.handleError(g)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var g=n.getSelectionState();if(null!=g.mergeCell){t.getModel().beginUpdate();try{t.setCellStyles("rowspan",g.rowspan,[g.mergeCell]),t.setCellStyles("colspan",g.colspan,[g.mergeCell])}finally{t.getModel().endUpdate()}}}));this.put("unmergeCells",
-new Action(mxResources.get("unmerge"),function(){var g=n.getSelectionState();if(0<g.cells.length){t.getModel().beginUpdate();try{t.setCellStyles("rowspan",null,g.cells),t.setCellStyles("colspan",null,g.cells)}finally{t.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(g,l){g=null!=l?l:g;t.turnShapes(t.getResizableCells(t.getSelectionCells()),null!=g?mxEvent.isShiftDown(g):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
+new Action(mxResources.get("unmerge"),function(){var g=n.getSelectionState();if(0<g.cells.length){t.getModel().beginUpdate();try{t.setCellStyles("rowspan",null,g.cells),t.setCellStyles("colspan",null,g.cells)}finally{t.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(g,m){g=null!=m?m:g;t.turnShapes(t.getResizableCells(t.getSelectionCells()),null!=g?mxEvent.isShiftDown(g):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(g){g=t.getSelectionCell();t.isEnabled()&&null!=g&&t.addSelectionCells(t.getEdges(g))}));this.addAction("selectVertices",function(){t.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){t.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){t.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){t.clearSelection()},
-null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!t.isSelectionEmpty()){t.getModel().beginUpdate();try{var g=t.getSelectionCells(),l=t.getCurrentCellStyle(t.getSelectionCell()),q=1==mxUtils.getValue(l,mxConstants.STYLE_EDITABLE,1)?0:1;t.setCellStyles(mxConstants.STYLE_MOVABLE,q,g);t.setCellStyles(mxConstants.STYLE_RESIZABLE,q,g);t.setCellStyles(mxConstants.STYLE_ROTATABLE,q,g);t.setCellStyles(mxConstants.STYLE_DELETABLE,q,g);t.setCellStyles(mxConstants.STYLE_EDITABLE,
+null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!t.isSelectionEmpty()){t.getModel().beginUpdate();try{var g=t.getSelectionCells(),m=t.getCurrentCellStyle(t.getSelectionCell()),q=1==mxUtils.getValue(m,mxConstants.STYLE_EDITABLE,1)?0:1;t.setCellStyles(mxConstants.STYLE_MOVABLE,q,g);t.setCellStyles(mxConstants.STYLE_RESIZABLE,q,g);t.setCellStyles(mxConstants.STYLE_ROTATABLE,q,g);t.setCellStyles(mxConstants.STYLE_DELETABLE,q,g);t.setCellStyles(mxConstants.STYLE_EDITABLE,
q,g);t.setCellStyles("connectable",q,g)}finally{t.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){t.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){t.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){t.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){t.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){t.foldCells(!1)},
null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){t.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){t.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(g){t.orderCells(!1,null,!0)});this.addAction("sendBackward",function(g){t.orderCells(!0,null,!0)});this.addAction("group",function(){if(t.isEnabled()){var g=mxUtils.sortCells(t.getSelectionCells(),!0);1!=g.length||t.isTable(g[0])||t.isTableRow(g[0])?
-(g=t.getCellsForGroup(g),1<g.length&&t.setSelectionCell(t.groupCells(null,0,g))):t.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(t.isEnabled()){var g=t.getEditableCells(t.getSelectionCells());t.model.beginUpdate();try{var l=t.ungroupCells();if(null!=g)for(var q=0;q<g.length;q++)t.model.contains(g[q])&&(0==t.model.getChildCount(g[q])&&t.model.isVertex(g[q])&&t.setCellStyles("container","0",[g[q]]),l.push(g[q]))}finally{t.model.endUpdate()}0<
-l.length&&t.setSelectionCells(l)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(t.isEnabled()){var g=t.getSelectionCells();if(null!=g){for(var l=[],q=0;q<g.length;q++)t.isTableRow(g[q])||t.isTableCell(g[q])||l.push(g[q]);t.removeCellsFromParent(l)}}});this.addAction("edit",function(){t.isEnabled()&&t.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var g=t.getSelectionCell()||t.getModel().getRoot();n.showDataDialog(g)},null,
-null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&null!=g&&t.isCellEditable(g)){var l="";if(mxUtils.isNode(g.value)){var q=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&g.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(q=g.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==q&&(q=g.value.getAttribute("tooltip"));null!=q&&(l=q)}l=new TextareaDialog(n,mxResources.get("editTooltip")+":",l,function(y){t.setTooltipForCell(g,
-y)});n.showDialog(l.container,320,200,!0,!0);l.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var g=t.getLinkForCell(t.getSelectionCell());null!=g&&t.openLink(g)});this.addAction("editLink...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&null!=g&&t.isCellEditable(g)){var l=t.getLinkForCell(g)||"";n.showLinkDialog(l,mxResources.get("apply"),function(q,y,F){q=mxUtils.trim(q);t.setLinkForCell(g,0<q.length?q:null);t.setAttributeForCell(g,"linkTarget",F)},!0,t.getLinkTargetForCell(g))}},
-null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&(t.clearSelection(),n.actions.get("image").funct())})).isEnabled=E;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&n.showLinkDialog("",mxResources.get("insert"),function(g,l,q){g=mxUtils.trim(g);if(0<g.length){var y=null,F=t.getLinkTitle(g);null!=l&&0<l.length&&(y=l[0].iconUrl,
-F=l[0].name||l[0].type,F=F.charAt(0).toUpperCase()+F.substring(1),30<F.length&&(F=F.substring(0,30)+"..."));l=new mxCell(F,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=y?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+y:"spacing=10;"));l.vertex=!0;y=t.getCenterInsertPoint(t.getBoundingBoxFromGeometry([l],!0));l.geometry.x=y.x;l.geometry.y=y.y;t.setAttributeForCell(l,"linkTarget",q);t.setLinkForCell(l,g);t.cellSizeUpdated(l,
-!0);t.getModel().beginUpdate();try{l=t.addCell(l),t.fireEvent(new mxEventObject("cellsInserted","cells",[l]))}finally{t.getModel().endUpdate()}t.setSelectionCell(l);t.scrollCellToVisible(t.getSelectionCell())}},!0)})).isEnabled=E;this.addAction("link...",mxUtils.bind(this,function(){if(t.isEnabled())if(t.cellEditor.isContentEditing()){var g=t.getSelectedElement(),l=t.getParentByName(g,"A",t.cellEditor.textarea),q="";if(null==l&&null!=g&&null!=g.getElementsByTagName)for(var y=g.getElementsByTagName("a"),
-F=0;F<y.length&&null==l;F++)y[F].textContent==g.textContent&&(l=y[F]);null!=l&&"A"==l.nodeName&&(q=l.getAttribute("href")||"",t.selectNode(l));var C=t.cellEditor.saveSelection();n.showLinkDialog(q,mxResources.get("apply"),mxUtils.bind(this,function(H){t.cellEditor.restoreSelection(C);null!=H&&t.insertLink(H)}))}else t.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=E;this.addAction("autosize",function(){var g=t.getSelectionCells();if(null!=g){t.getModel().beginUpdate();
-try{for(var l=0;l<g.length;l++){var q=g[l];0<t.getModel().getChildCount(q)?t.updateGroupBounds([q],0,!0):t.updateCellSize(q)}}finally{t.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){t.snapCellsToGrid(t.getSelectionCells(),t.gridSize)});this.addAction("formattedText",function(){t.stopEditing();var g=t.getCommonStyle(t.getSelectionCells());g="1"==mxUtils.getValue(g,"html","0")?null:"1";t.getModel().beginUpdate();try{for(var l=t.getEditableCells(t.getSelectionCells()),
-q=0;q<l.length;q++)if(state=t.getView().getState(l[q]),null!=state){var y=mxUtils.getValue(state.style,"html","0");if("1"==y&&null==g){var F=t.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(F=F.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var C=document.createElement("div");C.innerHTML=t.sanitizeHtml(F);F=mxUtils.extractTextWithWhitespace(C.childNodes);t.cellLabelChanged(state.cell,F);t.setCellStyles("html",g,[l[q]])}else"0"==y&&"1"==g&&(F=mxUtils.htmlEntities(t.convertValueToString(state.cell),
-!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(F=F.replace(/\n/g,"<br/>")),t.cellLabelChanged(state.cell,t.sanitizeHtml(F)),t.setCellStyles("html",g,[l[q]]))}n.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=g?g:"0"],"cells",l))}finally{t.getModel().endUpdate()}});this.addAction("wordWrap",function(){var g=t.getView().getState(t.getSelectionCell()),l="wrap";t.stopEditing();null!=g&&"wrap"==g.style[mxConstants.STYLE_WHITE_SPACE]&&(l=null);t.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
-l)});this.addAction("rotation",function(){var g="0",l=t.getView().getState(t.getSelectionCell());null!=l&&(g=l.style[mxConstants.STYLE_ROTATION]||g);g=new FilenameDialog(n,g,mxResources.get("apply"),function(q){null!=q&&0<q.length&&t.setCellStyles(mxConstants.STYLE_ROTATION,q)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");n.showDialog(g.container,375,80,!0,!0);g.init()});this.addAction("resetView",function(){t.zoomTo(1);n.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",
-function(g){t.isFastZoomEnabled()?t.lazyZoom(!0,!0,n.buttonZoomDelay):t.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(g){t.isFastZoomEnabled()?t.lazyZoom(!1,!0,n.buttonZoomDelay):t.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var g=t.isSelectionEmpty()?t.getGraphBounds():t.getBoundingBox(t.getSelectionCells()),l=t.view.translate,q=t.view.scale;g.x=g.x/q-l.x;g.y=g.y/q-l.y;g.width/=q;
-g.height/=q;null!=t.backgroundImage&&(g=mxRectangle.fromRectangle(g),g.add(new mxRectangle(0,0,t.backgroundImage.width,t.backgroundImage.height)));0==g.width||0==g.height?(t.zoomTo(1),n.resetScrollbars()):(l=Editor.fitWindowBorders,null!=l&&(g.x-=l.x,g.y-=l.y,g.width+=l.width+l.x,g.height+=l.height+l.y),t.fitWindow(g))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){t.pageVisible||this.get("pageView").funct();var g=t.pageFormat,l=t.pageScale;t.zoomTo(Math.floor(20*
-Math.min((t.container.clientWidth-10)/g.width/l,(t.container.clientHeight-10)/g.height/l))/20);mxUtils.hasScrollbars(t.container)&&(g=t.getPagePadding(),t.container.scrollTop=g.y*t.view.scale-1,t.container.scrollLeft=Math.min(g.x*t.view.scale,(t.container.scrollWidth-t.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){t.pageVisible||this.get("pageView").funct();var g=t.pageFormat,l=t.pageScale;t.zoomTo(Math.floor(20*Math.min((t.container.clientWidth-
-10)/(2*g.width)/l,(t.container.clientHeight-10)/g.height/l))/20);mxUtils.hasScrollbars(t.container)&&(g=t.getPagePadding(),t.container.scrollTop=Math.min(g.y,(t.container.scrollHeight-t.container.clientHeight)/2),t.container.scrollLeft=Math.min(g.x,(t.container.scrollWidth-t.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){t.pageVisible||this.get("pageView").funct();t.zoomTo(Math.floor(20*(t.container.clientWidth-10)/t.pageFormat.width/
-t.pageScale)/20);if(mxUtils.hasScrollbars(t.container)){var g=t.getPagePadding();t.container.scrollLeft=Math.min(g.x*t.view.scale,(t.container.scrollWidth-t.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var g=new FilenameDialog(this.editorUi,parseInt(100*t.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(l){l=parseInt(l);!isNaN(l)&&0<l&&t.zoomTo(l/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(g.container,
-300,80,!0,!0);g.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var g=new FilenameDialog(this.editorUi,parseInt(100*t.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(l){l=parseInt(l);!isNaN(l)&&0<l&&(l=new ChangePageSetup(n,null,null,null,l/100),l.ignoreColor=!0,l.ignoreImage=!0,t.model.execute(l))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(g.container,300,80,!0,!0);g.init()}));var d=null;d=this.addAction("grid",
+(g=t.getCellsForGroup(g),1<g.length&&t.setSelectionCell(t.groupCells(null,0,g))):t.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(t.isEnabled()){var g=t.getEditableCells(t.getSelectionCells());t.model.beginUpdate();try{var m=t.ungroupCells();if(null!=g)for(var q=0;q<g.length;q++)t.model.contains(g[q])&&(0==t.model.getChildCount(g[q])&&t.model.isVertex(g[q])&&t.setCellStyles("container","0",[g[q]]),m.push(g[q]))}finally{t.model.endUpdate()}0<
+m.length&&t.setSelectionCells(m)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(t.isEnabled()){var g=t.getSelectionCells();if(null!=g){for(var m=[],q=0;q<g.length;q++)t.isTableRow(g[q])||t.isTableCell(g[q])||m.push(g[q]);t.removeCellsFromParent(m)}}});this.addAction("edit",function(){t.isEnabled()&&t.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var g=t.getSelectionCell()||t.getModel().getRoot();n.showDataDialog(g)},null,
+null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&null!=g&&t.isCellEditable(g)){var m="";if(mxUtils.isNode(g.value)){var q=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&g.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(q=g.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==q&&(q=g.value.getAttribute("tooltip"));null!=q&&(m=q)}m=new TextareaDialog(n,mxResources.get("editTooltip")+":",m,function(y){t.setTooltipForCell(g,
+y)});n.showDialog(m.container,320,200,!0,!0);m.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var g=t.getLinkForCell(t.getSelectionCell());null!=g&&t.openLink(g)});this.addAction("editLink...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&null!=g&&t.isCellEditable(g)){var m=t.getLinkForCell(g)||"";n.showLinkDialog(m,mxResources.get("apply"),function(q,y,F){q=mxUtils.trim(q);t.setLinkForCell(g,0<q.length?q:null);t.setAttributeForCell(g,"linkTarget",F)},!0,t.getLinkTargetForCell(g))}},
+null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&(t.clearSelection(),n.actions.get("image").funct())})).isEnabled=E;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&n.showLinkDialog("",mxResources.get("insert"),function(g,m,q){g=mxUtils.trim(g);if(0<g.length){var y=null,F=t.getLinkTitle(g);null!=m&&0<m.length&&(y=m[0].iconUrl,
+F=m[0].name||m[0].type,F=F.charAt(0).toUpperCase()+F.substring(1),30<F.length&&(F=F.substring(0,30)+"..."));m=new mxCell(F,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=y?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+y:"spacing=10;"));m.vertex=!0;y=t.getCenterInsertPoint(t.getBoundingBoxFromGeometry([m],!0));m.geometry.x=y.x;m.geometry.y=y.y;t.setAttributeForCell(m,"linkTarget",q);t.setLinkForCell(m,g);t.cellSizeUpdated(m,
+!0);t.getModel().beginUpdate();try{m=t.addCell(m),t.fireEvent(new mxEventObject("cellsInserted","cells",[m]))}finally{t.getModel().endUpdate()}t.setSelectionCell(m);t.scrollCellToVisible(t.getSelectionCell())}},!0)})).isEnabled=E;this.addAction("link...",mxUtils.bind(this,function(){if(t.isEnabled())if(t.cellEditor.isContentEditing()){var g=t.getSelectedElement(),m=t.getParentByName(g,"A",t.cellEditor.textarea),q="";if(null==m&&null!=g&&null!=g.getElementsByTagName)for(var y=g.getElementsByTagName("a"),
+F=0;F<y.length&&null==m;F++)y[F].textContent==g.textContent&&(m=y[F]);null!=m&&"A"==m.nodeName&&(q=m.getAttribute("href")||"",t.selectNode(m));var C=t.cellEditor.saveSelection();n.showLinkDialog(q,mxResources.get("apply"),mxUtils.bind(this,function(H){t.cellEditor.restoreSelection(C);null!=H&&t.insertLink(H)}))}else t.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=E;this.addAction("autosize",function(){var g=t.getSelectionCells();if(null!=g){t.getModel().beginUpdate();
+try{for(var m=0;m<g.length;m++){var q=g[m];0<t.getModel().getChildCount(q)?t.updateGroupBounds([q],0,!0):t.updateCellSize(q)}}finally{t.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){t.snapCellsToGrid(t.getSelectionCells(),t.gridSize)});this.addAction("formattedText",function(){t.stopEditing();var g=t.getCommonStyle(t.getSelectionCells());g="1"==mxUtils.getValue(g,"html","0")?null:"1";t.getModel().beginUpdate();try{for(var m=t.getEditableCells(t.getSelectionCells()),
+q=0;q<m.length;q++)if(state=t.getView().getState(m[q]),null!=state){var y=mxUtils.getValue(state.style,"html","0");if("1"==y&&null==g){var F=t.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(F=F.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var C=document.createElement("div");C.innerHTML=t.sanitizeHtml(F);F=mxUtils.extractTextWithWhitespace(C.childNodes);t.cellLabelChanged(state.cell,F);t.setCellStyles("html",g,[m[q]])}else"0"==y&&"1"==g&&(F=mxUtils.htmlEntities(t.convertValueToString(state.cell),
+!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(F=F.replace(/\n/g,"<br/>")),t.cellLabelChanged(state.cell,t.sanitizeHtml(F)),t.setCellStyles("html",g,[m[q]]))}n.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=g?g:"0"],"cells",m))}finally{t.getModel().endUpdate()}});this.addAction("wordWrap",function(){var g=t.getView().getState(t.getSelectionCell()),m="wrap";t.stopEditing();null!=g&&"wrap"==g.style[mxConstants.STYLE_WHITE_SPACE]&&(m=null);t.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
+m)});this.addAction("rotation",function(){var g="0",m=t.getView().getState(t.getSelectionCell());null!=m&&(g=m.style[mxConstants.STYLE_ROTATION]||g);g=new FilenameDialog(n,g,mxResources.get("apply"),function(q){null!=q&&0<q.length&&t.setCellStyles(mxConstants.STYLE_ROTATION,q)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");n.showDialog(g.container,375,80,!0,!0);g.init()});this.addAction("resetView",function(){t.zoomTo(1);n.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",
+function(g){t.isFastZoomEnabled()?t.lazyZoom(!0,!0,n.buttonZoomDelay):t.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(g){t.isFastZoomEnabled()?t.lazyZoom(!1,!0,n.buttonZoomDelay):t.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var g=t.isSelectionEmpty()?t.getGraphBounds():t.getBoundingBox(t.getSelectionCells()),m=t.view.translate,q=t.view.scale;g.x=g.x/q-m.x;g.y=g.y/q-m.y;g.width/=q;
+g.height/=q;null!=t.backgroundImage&&(g=mxRectangle.fromRectangle(g),g.add(new mxRectangle(0,0,t.backgroundImage.width,t.backgroundImage.height)));0==g.width||0==g.height?(t.zoomTo(1),n.resetScrollbars()):(m=Editor.fitWindowBorders,null!=m&&(g.x-=m.x,g.y-=m.y,g.width+=m.width+m.x,g.height+=m.height+m.y),t.fitWindow(g))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){t.pageVisible||this.get("pageView").funct();var g=t.pageFormat,m=t.pageScale;t.zoomTo(Math.floor(20*
+Math.min((t.container.clientWidth-10)/g.width/m,(t.container.clientHeight-10)/g.height/m))/20);mxUtils.hasScrollbars(t.container)&&(g=t.getPagePadding(),t.container.scrollTop=g.y*t.view.scale-1,t.container.scrollLeft=Math.min(g.x*t.view.scale,(t.container.scrollWidth-t.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){t.pageVisible||this.get("pageView").funct();var g=t.pageFormat,m=t.pageScale;t.zoomTo(Math.floor(20*Math.min((t.container.clientWidth-
+10)/(2*g.width)/m,(t.container.clientHeight-10)/g.height/m))/20);mxUtils.hasScrollbars(t.container)&&(g=t.getPagePadding(),t.container.scrollTop=Math.min(g.y,(t.container.scrollHeight-t.container.clientHeight)/2),t.container.scrollLeft=Math.min(g.x,(t.container.scrollWidth-t.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){t.pageVisible||this.get("pageView").funct();t.zoomTo(Math.floor(20*(t.container.clientWidth-10)/t.pageFormat.width/
+t.pageScale)/20);if(mxUtils.hasScrollbars(t.container)){var g=t.getPagePadding();t.container.scrollLeft=Math.min(g.x*t.view.scale,(t.container.scrollWidth-t.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var g=new FilenameDialog(this.editorUi,parseInt(100*t.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(m){m=parseInt(m);!isNaN(m)&&0<m&&t.zoomTo(m/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(g.container,
+300,80,!0,!0);g.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var g=new FilenameDialog(this.editorUi,parseInt(100*t.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(m){m=parseInt(m);!isNaN(m)&&0<m&&(m=new ChangePageSetup(n,null,null,null,m/100),m.ignoreColor=!0,m.ignoreImage=!0,t.model.execute(m))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(g.container,300,80,!0,!0);g.init()}));var d=null;d=this.addAction("grid",
function(){t.setGridEnabled(!t.isGridEnabled());t.defaultGridEnabled=t.isGridEnabled();n.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");d.setToggleAction(!0);d.setSelectedCallback(function(){return t.isGridEnabled()});d.setEnabled(!1);d=this.addAction("guides",function(){t.graphHandler.guidesEnabled=!t.graphHandler.guidesEnabled;n.fireEvent(new mxEventObject("guidesEnabledChanged"))});d.setToggleAction(!0);d.setSelectedCallback(function(){return t.graphHandler.guidesEnabled});
d.setEnabled(!1);d=this.addAction("tooltips",function(){t.tooltipHandler.setEnabled(!t.tooltipHandler.isEnabled());n.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});d.setToggleAction(!0);d.setSelectedCallback(function(){return t.tooltipHandler.isEnabled()});d=this.addAction("collapseExpand",function(){var g=new ChangePageSetup(n);g.ignoreColor=!0;g.ignoreImage=!0;g.foldingEnabled=!t.foldingEnabled;t.model.execute(g)});d.setToggleAction(!0);d.setSelectedCallback(function(){return t.foldingEnabled});
d.isEnabled=E;d=this.addAction("scrollbars",function(){n.setScrollbars(!n.hasScrollbars())});d.setToggleAction(!0);d.setSelectedCallback(function(){return t.scrollbars});d=this.addAction("pageView",mxUtils.bind(this,function(){n.setPageVisible(!t.pageVisible)}));d.setToggleAction(!0);d.setSelectedCallback(function(){return t.pageVisible});d=this.addAction("connectionArrows",function(){t.connectionArrowsEnabled=!t.connectionArrowsEnabled;n.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,
null,"Alt+Shift+A");d.setToggleAction(!0);d.setSelectedCallback(function(){return t.connectionArrowsEnabled});d=this.addAction("connectionPoints",function(){t.setConnectable(!t.connectionHandler.isEnabled());n.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");d.setToggleAction(!0);d.setSelectedCallback(function(){return t.connectionHandler.isEnabled()});d=this.addAction("copyConnect",function(){t.connectionHandler.setCreateTarget(!t.connectionHandler.isCreateTarget());
n.fireEvent(new mxEventObject("copyConnectChanged"))});d.setToggleAction(!0);d.setSelectedCallback(function(){return t.connectionHandler.isCreateTarget()});d.isEnabled=E;d=this.addAction("autosave",function(){n.editor.setAutosave(!n.editor.autosave)});d.setToggleAction(!0);d.setSelectedCallback(function(){return n.editor.autosave});d.isEnabled=E;d.visible=!1;this.addAction("help",function(){var g="";mxResources.isLanguageSupported(mxClient.language)&&(g="_"+mxClient.language);t.openLink(RESOURCES_PATH+
-"/help"+g+".html")});var f=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){f||(n.showDialog((new AboutDialog(n)).container,320,280,!0,!0,function(){f=!1}),f=!0)}));d=mxUtils.bind(this,function(g,l,q,y){return this.addAction(g,function(){if(null!=q&&t.cellEditor.isContentEditing())q();else{t.stopEditing(!1);t.getModel().beginUpdate();try{var F=t.getEditableCells(t.getSelectionCells());t.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,l,F);(l&mxConstants.FONT_BOLD)==
-mxConstants.FONT_BOLD?t.updateLabelElements(F,function(H){H.style.fontWeight=null;"B"==H.nodeName&&t.replaceElement(H)}):(l&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?t.updateLabelElements(F,function(H){H.style.fontStyle=null;"I"==H.nodeName&&t.replaceElement(H)}):(l&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&t.updateLabelElements(F,function(H){H.style.textDecoration=null;"U"==H.nodeName&&t.replaceElement(H)});for(var C=0;C<F.length;C++)0==t.model.getChildCount(F[C])&&t.autoSizeCell(F[C],
+"/help"+g+".html")});var f=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){f||(n.showDialog((new AboutDialog(n)).container,320,280,!0,!0,function(){f=!1}),f=!0)}));d=mxUtils.bind(this,function(g,m,q,y){return this.addAction(g,function(){if(null!=q&&t.cellEditor.isContentEditing())q();else{t.stopEditing(!1);t.getModel().beginUpdate();try{var F=t.getEditableCells(t.getSelectionCells());t.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,m,F);(m&mxConstants.FONT_BOLD)==
+mxConstants.FONT_BOLD?t.updateLabelElements(F,function(H){H.style.fontWeight=null;"B"==H.nodeName&&t.replaceElement(H)}):(m&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?t.updateLabelElements(F,function(H){H.style.fontStyle=null;"I"==H.nodeName&&t.replaceElement(H)}):(m&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&t.updateLabelElements(F,function(H){H.style.textDecoration=null;"U"==H.nodeName&&t.replaceElement(H)});for(var C=0;C<F.length;C++)0==t.model.getChildCount(F[C])&&t.autoSizeCell(F[C],
!1)}finally{t.getModel().endUpdate()}}},null,null,y)});d("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");d("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");d("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){n.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
function(){n.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){n.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){n.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){n.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){n.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){n.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
!0)});this.addAction("shadow",function(){n.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){t.getModel().beginUpdate();try{t.setCellStyles(mxConstants.STYLE_DASHED,null),t.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});this.addAction("dashed",function(){t.getModel().beginUpdate();
try{t.setCellStyles(mxConstants.STYLE_DASHED,"1"),t.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});this.addAction("dotted",function(){t.getModel().beginUpdate();try{t.setCellStyles(mxConstants.STYLE_DASHED,"1"),t.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),n.fireEvent(new mxEventObject("styleChanged",
"keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});this.addAction("sharp",function(){t.getModel().beginUpdate();try{t.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),t.setCellStyles(mxConstants.STYLE_CURVED,"0"),n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});
-this.addAction("rounded",function(){t.getModel().beginUpdate();try{t.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),t.setCellStyles(mxConstants.STYLE_CURVED,"0"),n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!t.isSelectionEmpty()&&t.isEnabled()){t.getModel().beginUpdate();try{var g=t.getSelectionCells(),l=t.getCurrentCellStyle(g[0]),
-q="1"==mxUtils.getValue(l,mxConstants.STYLE_ROUNDED,"0")?"0":"1";t.setCellStyles(mxConstants.STYLE_ROUNDED,q);t.setCellStyles(mxConstants.STYLE_CURVED,null);n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[q,"0"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}}});this.addAction("curved",function(){t.getModel().beginUpdate();try{t.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),t.setCellStyles(mxConstants.STYLE_CURVED,
-"1"),n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});this.addAction("collapsible",function(){var g=t.view.getState(t.getSelectionCell()),l="1";null!=g&&null!=t.getFoldingImage(g)&&(l="0");t.setCellStyles("collapsible",l);n.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[l],"cells",t.getSelectionCells()))});this.addAction("editStyle...",
-mxUtils.bind(this,function(){var g=t.getEditableCells(t.getSelectionCells());if(null!=g&&0<g.length){var l=t.getModel();l=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",l.getStyle(g[0])||"",function(q){null!=q&&t.setCellStyle(mxUtils.trim(q),g)},null,null,400,220);this.editorUi.showDialog(l.container,420,300,!0,!0);l.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){t.isEnabled()&&!t.isSelectionEmpty()&&n.setDefaultStyle(t.getSelectionCell())},
-null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){t.isEnabled()&&n.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var g=t.getSelectionCell();if(null!=g&&t.getModel().isEdge(g)){var l=D.graph.selectionCellsHandler.getHandler(g);if(l instanceof mxEdgeHandler){var q=t.view.translate,y=t.view.scale,F=q.x;q=q.y;g=t.getModel().getParent(g);for(var C=t.getCellGeometry(g);t.getModel().isVertex(g)&&null!=C;)F+=C.x,q+=C.y,g=
-t.getModel().getParent(g),C=t.getCellGeometry(g);F=Math.round(t.snap(t.popupMenuHandler.triggerX/y-F));y=Math.round(t.snap(t.popupMenuHandler.triggerY/y-q));l.addPointAt(l.state,F,y)}}});this.addAction("removeWaypoint",function(){var g=n.actions.get("removeWaypoint");null!=g.handler&&g.handler.removePoint(g.handler.state,g.index)});this.addAction("clearWaypoints",function(g,l){g=null!=l?l:g;var q=t.getSelectionCells();if(null!=q){q=t.getEditableCells(t.addAllEdges(q));t.getModel().beginUpdate();try{for(var y=
-0;y<q.length;y++){var F=q[y];if(t.getModel().isEdge(F)){var C=t.getCellGeometry(F);null!=l&&mxEvent.isShiftDown(g)?(t.setCellStyles(mxConstants.STYLE_EXIT_X,null,[F]),t.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[F]),t.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[F]),t.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[F])):null!=C&&(C=C.clone(),C.points=null,C.x=0,C.y=0,C.offset=null,t.getModel().setGeometry(F,C))}}}finally{t.getModel().endUpdate()}}},null,null,"Alt+Shift+C");d=this.addAction("subscript",
-mxUtils.bind(this,function(){t.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");d=this.addAction("superscript",mxUtils.bind(this,function(){t.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())){var g=mxResources.get("image")+" ("+mxResources.get("url")+"):",l=t.getView().getState(t.getSelectionCell()),
-q="",y=null;null!=l&&(q=l.style[mxConstants.STYLE_IMAGE]||q,y=l.style[mxConstants.STYLE_CLIP_PATH]||y);var F=t.cellEditor.saveSelection();n.showImageDialog(g,q,function(C,H,G,aa,da,ba){if(t.cellEditor.isContentEditing())t.cellEditor.restoreSelection(F),t.insertImage(C,H,G);else{var Y=t.getSelectionCells();if(null!=C&&(0<C.length||0<Y.length)){var qa=null;t.getModel().beginUpdate();try{if(0==Y.length){Y=[t.insertVertex(t.getDefaultParent(),null,"",0,0,H,G,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
+this.addAction("rounded",function(){t.getModel().beginUpdate();try{t.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),t.setCellStyles(mxConstants.STYLE_CURVED,"0"),n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!t.isSelectionEmpty()&&t.isEnabled()){t.getModel().beginUpdate();try{var g=t.getSelectionCells(),m=t.getCurrentCellStyle(g[0]),
+q="1"==mxUtils.getValue(m,mxConstants.STYLE_ROUNDED,"0")?"0":"1";t.setCellStyles(mxConstants.STYLE_ROUNDED,q);t.setCellStyles(mxConstants.STYLE_CURVED,null);n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[q,"0"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}}});this.addAction("curved",function(){t.getModel().beginUpdate();try{t.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),t.setCellStyles(mxConstants.STYLE_CURVED,
+"1"),n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});this.addAction("collapsible",function(){var g=t.view.getState(t.getSelectionCell()),m="1";null!=g&&null!=t.getFoldingImage(g)&&(m="0");t.setCellStyles("collapsible",m);n.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[m],"cells",t.getSelectionCells()))});this.addAction("editStyle...",
+mxUtils.bind(this,function(){var g=t.getEditableCells(t.getSelectionCells());if(null!=g&&0<g.length){var m=t.getModel();m=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",m.getStyle(g[0])||"",function(q){null!=q&&t.setCellStyle(mxUtils.trim(q),g)},null,null,400,220);this.editorUi.showDialog(m.container,420,300,!0,!0);m.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){t.isEnabled()&&!t.isSelectionEmpty()&&n.setDefaultStyle(t.getSelectionCell())},
+null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){t.isEnabled()&&n.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var g=t.getSelectionCell();if(null!=g&&t.getModel().isEdge(g)){var m=D.graph.selectionCellsHandler.getHandler(g);if(m instanceof mxEdgeHandler){var q=t.view.translate,y=t.view.scale,F=q.x;q=q.y;g=t.getModel().getParent(g);for(var C=t.getCellGeometry(g);t.getModel().isVertex(g)&&null!=C;)F+=C.x,q+=C.y,g=
+t.getModel().getParent(g),C=t.getCellGeometry(g);F=Math.round(t.snap(t.popupMenuHandler.triggerX/y-F));y=Math.round(t.snap(t.popupMenuHandler.triggerY/y-q));m.addPointAt(m.state,F,y)}}});this.addAction("removeWaypoint",function(){var g=n.actions.get("removeWaypoint");null!=g.handler&&g.handler.removePoint(g.handler.state,g.index)});this.addAction("clearWaypoints",function(g,m){g=null!=m?m:g;var q=t.getSelectionCells();if(null!=q){q=t.getEditableCells(t.addAllEdges(q));t.getModel().beginUpdate();try{for(var y=
+0;y<q.length;y++){var F=q[y];if(t.getModel().isEdge(F)){var C=t.getCellGeometry(F);null!=m&&mxEvent.isShiftDown(g)?(t.setCellStyles(mxConstants.STYLE_EXIT_X,null,[F]),t.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[F]),t.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[F]),t.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[F])):null!=C&&(C=C.clone(),C.points=null,C.x=0,C.y=0,C.offset=null,t.getModel().setGeometry(F,C))}}}finally{t.getModel().endUpdate()}}},null,null,"Alt+Shift+C");d=this.addAction("subscript",
+mxUtils.bind(this,function(){t.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");d=this.addAction("superscript",mxUtils.bind(this,function(){t.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())){var g=mxResources.get("image")+" ("+mxResources.get("url")+"):",m=t.getView().getState(t.getSelectionCell()),
+q="",y=null;null!=m&&(q=m.style[mxConstants.STYLE_IMAGE]||q,y=m.style[mxConstants.STYLE_CLIP_PATH]||y);var F=t.cellEditor.saveSelection();n.showImageDialog(g,q,function(C,H,G,aa,da,ba){if(t.cellEditor.isContentEditing())t.cellEditor.restoreSelection(F),t.insertImage(C,H,G);else{var Y=t.getSelectionCells();if(null!=C&&(0<C.length||0<Y.length)){var qa=null;t.getModel().beginUpdate();try{if(0==Y.length){Y=[t.insertVertex(t.getDefaultParent(),null,"",0,0,H,G,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
var O=t.getCenterInsertPoint(t.getBoundingBoxFromGeometry(Y,!0));Y[0].geometry.x=O.x;Y[0].geometry.y=O.y;null!=aa&&k(Y[0],aa,da,ba,t);qa=Y;t.fireEvent(new mxEventObject("cellsInserted","cells",qa))}t.setCellStyles(mxConstants.STYLE_IMAGE,0<C.length?C:null,Y);var X=t.getCurrentCellStyle(Y[0]);"image"!=X[mxConstants.STYLE_SHAPE]&&"label"!=X[mxConstants.STYLE_SHAPE]?t.setCellStyles(mxConstants.STYLE_SHAPE,"image",Y):0==C.length&&t.setCellStyles(mxConstants.STYLE_SHAPE,null,Y);if(1==t.getSelectionCount()&&
null!=H&&null!=G){var ea=Y[0],ka=t.getModel().getGeometry(ea);null!=ka&&(ka=ka.clone(),ka.width=H,ka.height=G,t.getModel().setGeometry(ea,ka));null!=aa?k(ea,aa,da,ba,t):t.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,Y)}}finally{t.getModel().endUpdate()}null!=qa&&(t.setSelectionCells(qa),t.scrollCellToVisible(qa[0]))}}},t.cellEditor.isContentEditing(),!t.cellEditor.isContentEditing(),!0,y)}}).isEnabled=E;this.addAction("crop...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&
-null!=g){var l=t.getCurrentCellStyle(g),q=l[mxConstants.STYLE_IMAGE],y=l[mxConstants.STYLE_SHAPE];q&&"image"==y&&(l=new CropImageDialog(n,q,l[mxConstants.STYLE_CLIP_PATH],function(F,C,H){k(g,F,C,H,t)}),n.showDialog(l.container,300,390,!0,!0))}}).isEnabled=E;d=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(n,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){n.fireEvent(new mxEventObject("layers"))})),
+null!=g){var m=t.getCurrentCellStyle(g),q=m[mxConstants.STYLE_IMAGE],y=m[mxConstants.STYLE_SHAPE];q&&"image"==y&&(m=new CropImageDialog(n,q,m[mxConstants.STYLE_CLIP_PATH],function(F,C,H){k(g,F,C,H,t)}),n.showDialog(m.container,300,390,!0,!0))}}).isEnabled=E;d=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(n,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){n.fireEvent(new mxEventObject("layers"))})),
this.layersWindow.window.addListener("hide",function(){n.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),n.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));d=this.addAction("formatPanel",mxUtils.bind(this,
function(){n.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){return 0<n.formatWidth}));d=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(n,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){n.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){n.fireEvent(new mxEventObject("outline"))}),
-this.outlineWindow.window.setVisible(!0),n.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&null!=g){var l=new ConnectionPointsDialog(n,
-g);n.showDialog(l.container,350,450,!0,!1,function(){l.destroy()});l.init()}}).isEnabled=E};Actions.prototype.addAction=function(b,e,k,n,D){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var t=mxResources.get(b)+"..."}else t=mxResources.get(b);return this.put(b,new Action(t,e,k,n,D))};Actions.prototype.put=function(b,e){return this.actions[b]=e};Actions.prototype.get=function(b){return this.actions[b]};
+this.outlineWindow.window.setVisible(!0),n.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&null!=g){var m=new ConnectionPointsDialog(n,
+g);n.showDialog(m.container,350,450,!0,!1,function(){m.destroy()});m.init()}}).isEnabled=E};Actions.prototype.addAction=function(b,e,k,n,D){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var t=mxResources.get(b)+"..."}else t=mxResources.get(b);return this.put(b,new Action(t,e,k,n,D))};Actions.prototype.put=function(b,e){return this.actions[b]=e};Actions.prototype.get=function(b){return this.actions[b]};
function Action(b,e,k,n,D){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(e);this.enabled=null!=k?k:!0;this.iconCls=n;this.shortcut=D;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,e){mxEventSource.call(this);this.ui=b;this.setData(e||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;
@@ -2994,23 +2998,23 @@ DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile
DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,e){this.savingFile?null!=e&&e({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(k){this.sync.cleanup(b,e,k)}),e):this.updateFile(b,e)};
DrawioFile.prototype.updateFile=function(b,e,k,n){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(D){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[D]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=D?this.mergeFile(D,b,e,n):this.reloadFile(b,
e))}catch(t){null!=e&&e(t)}}),e))};
-DrawioFile.prototype.mergeFile=function(b,e,k,n){var D=!0;try{this.stats.fileMerged++;var t=this.getShadowPages(),E=b.getShadowPages();if(null!=E&&0<E.length){var d=[this.ui.diffPages(null!=n?n:t,E)],f=this.ignorePatches(d);this.setShadowPages(E);if(f)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",f);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(t,this.ui.pages):null;n={};f={};var g=this.ui.patchPages(t,d[0]),l=this.ui.getHashValueForPages(g,
-n),q=this.ui.getHashValueForPages(E,f);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",t,"pages",this.ui.pages,"patches",d,"backup",this.backupPatch,"checksum",l,"current",q,"valid",l==q,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=l&&l!=q){var y=this.compressReportData(this.getAnonymizedXmlForPages(E)),F=this.compressReportData(this.getAnonymizedXmlForPages(g)),C=this.ui.hashValue(b.getCurrentEtag()),H=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(k,d,"Shadow Details: "+JSON.stringify(n)+"\nChecksum: "+l+"\nCurrent: "+q+"\nCurrent Details: "+JSON.stringify(f)+"\nFrom: "+C+"\nTo: "+H+"\n\nFile Data:\n"+y+"\nPatched Shadow:\n"+F,null,"mergeFile");return}if(null!=this.sync){var G=this.sync.patchRealtime(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==G||mxUtils.isEmptyObject(G)||d.push(G)}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw D=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
+DrawioFile.prototype.mergeFile=function(b,e,k,n){var D=!0;try{this.stats.fileMerged++;var t=this.getShadowPages(),E=b.getShadowPages();if(null!=E&&0<E.length){var d=[this.ui.diffPages(null!=n?n:t,E)],f=this.ignorePatches(d);this.setShadowPages(E);if(f)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",f);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(t,this.ui.pages):null;n={};f={};var g=this.ui.patchPages(t,d[0]),m=this.ui.getHashValueForPages(g,
+n),q=this.ui.getHashValueForPages(E,f);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",t,"pages",this.ui.pages,"patches",d,"backup",this.backupPatch,"checksum",m,"current",q,"valid",m==q,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=m&&m!=q){var y=this.compressReportData(this.getAnonymizedXmlForPages(E)),F=this.compressReportData(this.getAnonymizedXmlForPages(g)),C=this.ui.hashValue(b.getCurrentEtag()),H=this.ui.hashValue(this.getCurrentEtag());
+this.checksumError(k,d,"Shadow Details: "+JSON.stringify(n)+"\nChecksum: "+m+"\nCurrent: "+q+"\nCurrent Details: "+JSON.stringify(f)+"\nFrom: "+C+"\nTo: "+H+"\n\nFile Data:\n"+y+"\nPatched Shadow:\n"+F,null,"mergeFile");return}if(null!=this.sync){var G=this.sync.patchRealtime(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==G||mxUtils.isEmptyObject(G)||d.push(G)}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw D=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(ba){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(ba);try{if(D)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,ba);else{var aa=this.getCurrentUser(),da=null!=aa?aa.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),da,ba)}}catch(Y){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),k=e.document.createElement("mxfile");if(null!=b)for(var n=0;n<b.length;n++){var D=e.encode(new mxGraphModel(b[n].root));"1"!=urlParams.dev&&(D=this.ui.anonymizeNode(D,!0));D.setAttribute("id",b[n].getId());b[n].viewState&&this.ui.editor.graph.saveViewState(b[n].viewState,D,!0);k.appendChild(D)}return mxUtils.getPrettyXml(k)};
DrawioFile.prototype.compressReportData=function(b,e,k){e=null!=e?e:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
DrawioFile.prototype.checksumError=function(b,e,k,n,D){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);var t=mxUtils.bind(this,function(f){var g=this.compressReportData(JSON.stringify(e,null,2));f=null==f?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(f.data)),
25E3);this.sendErrorReport("Checksum Error in "+D+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+g+(null!=f?"\n\nRemote:\n"+f:""),null,7E4)});null==n?t(null):this.getLatestVersion(mxUtils.bind(this,function(f){null!=f&&f.getCurrentEtag()==n?t(f):t(null)}),function(){})}else{var E=this.getCurrentUser(),d=null!=E?E.id:"unknown";EditorUi.logError("Checksum Error in "+D+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+
JSON.stringify(e).length+"-patches_"+e.length+"-size_"+this.getSize());try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:D,label:"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+JSON.stringify(e).length+"-patches_"+e.length+"-size_"+this.getSize()})}catch(f){}}}catch(f){}};
-DrawioFile.prototype.sendErrorReport=function(b,e,k,n){try{var D=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),t=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),E=this.getCurrentUser(),d=null!=E?this.ui.hashValue(E.id):"unknown",f=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",g=this.getTitle(),l=g.lastIndexOf(".");E="xml";0<l&&(E=g.substring(l));var q=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+DrawioFile.prototype.sendErrorReport=function(b,e,k,n){try{var D=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),t=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),E=this.getCurrentUser(),d=null!=E?this.ui.hashValue(E.id):"unknown",f=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",g=this.getTitle(),m=g.lastIndexOf(".");E="xml";0<m&&(E=g.substring(m));var q=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+E+")\nUser="+d+f+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+q+"\n\nShadow:\n"+D+"\n\nData:\n"+t,n)}catch(y){}};
DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){this.stats.fileReloaded++;var n=this.ui.editor.graph.getViewState(),D=this.ui.editor.graph.getSelectionCells(),t=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(t,n,D);null!=this.backupPatch&&this.patch([this.backupPatch]);var E=this.ui.getCurrentFile();null!=E&&(E.stats=this.stats);null!=b&&
b()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):k()}catch(n){null!=e&&e(n)}};DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var k=0;k<b.length&&e;k++)e=e&&mxUtils.isEmptyObject(b[k]);return e};
-DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var n=this.ui.editor.undoManager,D=n.history.slice(),t=n.indexOfNextAdd,E=this.ui.editor.graph;E.container.style.visibility="hidden";var d=this.changeListenerEnabled;this.changeListenerEnabled=k;var f=E.foldingEnabled,g=E.mathEnabled,l=E.cellRenderer.redraw;E.cellRenderer.redraw=function(q){q.view.graph.isEditing(q.cell)&&(q.view.graph.scrollCellToVisible(q.cell),q.view.graph.cellEditor.resize());l.apply(this,arguments)};E.model.beginUpdate();
-try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{E.container.style.visibility="";E.model.endUpdate();E.cellRenderer.redraw=l;this.changeListenerEnabled=d;k||(n.history=D,n.indexOfNextAdd=t,n.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)g!=E.mathEnabled?
+DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var n=this.ui.editor.undoManager,D=n.history.slice(),t=n.indexOfNextAdd,E=this.ui.editor.graph;E.container.style.visibility="hidden";var d=this.changeListenerEnabled;this.changeListenerEnabled=k;var f=E.foldingEnabled,g=E.mathEnabled,m=E.cellRenderer.redraw;E.cellRenderer.redraw=function(q){q.view.graph.isEditing(q.cell)&&(q.view.graph.scrollCellToVisible(q.cell),q.view.graph.cellEditor.resize());m.apply(this,arguments)};E.model.beginUpdate();
+try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{E.container.style.visibility="";E.model.endUpdate();E.cellRenderer.redraw=m;this.changeListenerEnabled=d;k||(n.history=D,n.indexOfNextAdd=t,n.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)g!=E.mathEnabled?
(this.ui.editor.updateGraphComponents(),E.refresh()):(f!=E.foldingEnabled?E.view.revalidate():E.view.validate(),E.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",k)}return b};
DrawioFile.prototype.save=function(b,e,k,n,D,t){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",n,"overwrite",D,"manual",t,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!D&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=k)k({message:mxResources.get("readOnly")});
else throw Error(mxResources.get("readOnly"));}catch(E){if(null!=k)k(E);else throw E;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e};
@@ -3065,9 +3069,9 @@ DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this
DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,k){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,k,n,D,t){DrawioFile.call(this,b,e);this.title=k;this.mode=n?null:App.MODE_DEVICE;this.fileHandle=D;this.desc=t};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,e,k){this.saveAs(this.title,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};
-LocalFile.prototype.saveFile=function(b,e,k,n,D){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;D||this.updateFileData();var t=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var E=this.getData(),d=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),f=mxUtils.bind(this,function(g){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var l=mxUtils.bind(this,
+LocalFile.prototype.saveFile=function(b,e,k,n,D){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;D||this.updateFileData();var t=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var E=this.getData(),d=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),f=mxUtils.bind(this,function(g){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var m=mxUtils.bind(this,
function(y){this.savingFile=!1;null!=n&&n({error:y})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(y){this.fileHandle.getFile().then(mxUtils.bind(this,function(F){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[F],"conflict",this.desc.lastModified!=F.lastModified);this.desc.lastModified==F.lastModified?y.write(t?this.ui.base64ToBlob(g,"image/png"):g).then(mxUtils.bind(this,function(){y.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(C){try{var H=this.desc;this.savingFile=!1;this.desc=C;this.fileSaved(E,H,d,l);this.removeDraft()}catch(G){l(G)}}),l)}),l)}),l):(this.inConflictState=!0,l())}),mxUtils.bind(this,function(F){this.invalidFileHandle=!0;l(F)}))}),l)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(g,b,t?"image/png":"text/xml",t);else if(g.length<MAX_REQUEST_SIZE){var q=b.lastIndexOf(".");q=0<q?b.substring(q+1):"xml";
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(C){try{var H=this.desc;this.savingFile=!1;this.desc=C;this.fileSaved(E,H,d,m);this.removeDraft()}catch(G){m(G)}}),m)}),m)}),m):(this.inConflictState=!0,m())}),mxUtils.bind(this,function(F){this.invalidFileHandle=!0;m(F)}))}),m)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(g,b,t?"image/png":"text/xml",t);else if(g.length<MAX_REQUEST_SIZE){var q=b.lastIndexOf(".");q=0<q?b.substring(q+1):"xml";
(new mxXmlRequest(SAVE_URL,"format="+q+"&xml="+encodeURIComponent(g)+"&filename="+encodeURIComponent(b)+(t?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(g)}));d()}});t?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){f(g)}),n,this.ui.getCurrentFile()!=this?E:null,e.scale,e.border)):f(E)};
LocalFile.prototype.rename=function(b,e,k){this.title=b;this.descriptorChanged();null!=e&&e()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
@@ -3195,7 +3199,7 @@ S&&S(M)}}))}catch(L){null!=S&&S(L)}}),N,sa)}catch(Va){null!=S&&S(Va)}};Editor.cr
va;va+=Ba;return sa.substring(ta,va)}function Z(sa){sa=P(sa,4);return sa.charCodeAt(3)+(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function oa(sa){return String.fromCharCode(sa>>24&255,sa>>16&255,sa>>8&255,sa&255)}u=u.substring(u.indexOf(",")+1);u=window.atob?atob(u):Base64.decode(u,!0);var va=0;if(P(u,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=S&&S();else if(P(u,4),"IHDR"!=P(u,4))null!=S&&S();else{P(u,17);S=u.substring(0,va);do{var Aa=Z(u);if("IDAT"==
P(u,4)){S=u.substring(0,va-8);"pHYs"==J&&"dpi"==N?(N=Math.round(W/.0254),N=oa(N)+oa(N)+String.fromCharCode(1)):N=N+String.fromCharCode(0)+("zTXt"==J?String.fromCharCode(0):"")+W;W=4294967295;W=Editor.updateCRC(W,J,0,4);W=Editor.updateCRC(W,N,0,N.length);S+=oa(N.length)+J+N+oa(W^4294967295);S+=u.substring(va-8,u.length);break}S+=u.substring(va-8,va-4+Aa);P(u,Aa);P(u,4)}while(Aa);return"data:image/png;base64,"+(window.btoa?btoa(S):Base64.encode(S,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink=
"https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(u,J){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(u,J){var N=null;null!=u.editor.graph.getModel().getParent(J)?
-N=J.getId():null!=u.currentPage&&(N=u.currentPage.getId());return N});if(null!=window.StyleFormatPanel){var g=Format.prototype.init;Format.prototype.init=function(){g.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var l=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?l.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var u=
+N=J.getId():null!=u.currentPage&&(N=u.currentPage.getId());return N});if(null!=window.StyleFormatPanel){var g=Format.prototype.init;Format.prototype.init=function(){g.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var m=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?m.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var u=
this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=u&&u.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(u){return!1};var q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(u){u=q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var J=this.editorUi,N=J.editor.graph,W=this.createOption(mxResources.get("shadow"),function(){return N.shadowVisible},function(S){var P=new ChangePageSetup(J);
P.ignoreColor=!0;P.ignoreImage=!0;P.shadowVisible=S;N.model.execute(P)},{install:function(S){this.listener=function(){S(N.shadowVisible)};J.addListener("shadowVisibleChanged",this.listener)},destroy:function(){J.removeListener(this.listener)}});Editor.enableShadowOption||(W.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(W,60));u.appendChild(W)}return u};var y=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(u){u=y.apply(this,
arguments);var J=this.editorUi,N=J.editor.graph;if(N.isEnabled()){var W=J.getCurrentFile();if(null!=W&&W.isAutosaveOptional()){var S=this.createOption(mxResources.get("autosave"),function(){return J.editor.autosave},function(Z){J.editor.setAutosave(Z);J.editor.autosave&&W.isModified()&&W.fileChanged()},{install:function(Z){this.listener=function(){Z(J.editor.autosave)};J.editor.addListener("autosaveChanged",this.listener)},destroy:function(){J.editor.removeListener(this.listener)}});u.appendChild(S)}}if(this.isMathOptionVisible()&&
@@ -3324,8 +3328,8 @@ mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupN
function(u,J,N,W,S,P){"1"==mxUtils.getValue(J.style,"lineShape",null)&&u.setFillColor(mxUtils.getValue(J.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return R.apply(this,arguments)};PrintDialog.prototype.create=function(u,J){function N(){ta.value=Math.max(1,Math.min(oa,Math.max(parseInt(ta.value),parseInt(Ba.value))));Ba.value=Math.max(1,Math.min(oa,Math.min(parseInt(ta.value),parseInt(Ba.value))))}function W(Fa){function Ma(cb,hb,lb){var rb=cb.useCssTransforms,vb=cb.currentTranslate,ob=cb.currentScale,
Ab=cb.view.translate,Bb=cb.view.scale;cb.useCssTransforms&&(cb.useCssTransforms=!1,cb.currentTranslate=new mxPoint(0,0),cb.currentScale=1,cb.view.translate=new mxPoint(0,0),cb.view.scale=1);var ub=cb.getGraphBounds(),kb=0,eb=0,mb=ua.get(),wb=1/cb.pageScale,pb=Ka.checked;if(pb){wb=parseInt(ma.value);var xb=parseInt(pa.value);wb=Math.min(mb.height*xb/(ub.height/cb.view.scale),mb.width*wb/(ub.width/cb.view.scale))}else wb=parseInt(Ua.value)/(100*cb.pageScale),isNaN(wb)&&(Oa=1/cb.pageScale,Ua.value="100 %");
mb=mxRectangle.fromRectangle(mb);mb.width=Math.ceil(mb.width*Oa);mb.height=Math.ceil(mb.height*Oa);wb*=Oa;!pb&&cb.pageVisible?(ub=cb.getPageLayout(),kb-=ub.x*mb.width,eb-=ub.y*mb.height):pb=!0;if(null==hb){hb=PrintDialog.createPrintPreview(cb,wb,mb,0,kb,eb,pb);hb.pageSelector=!1;hb.mathEnabled=!1;Na.checked&&(hb.isCellVisible=function(nb){return cb.isCellSelected(nb)});kb=u.getCurrentFile();null!=kb&&(hb.title=kb.getTitle());var zb=hb.writeHead;hb.writeHead=function(nb){zb.apply(this,arguments);if(mxClient.IS_GC||
-mxClient.IS_SF)nb.writeln('<style type="text/css">'),nb.writeln(Editor.mathJaxWebkitCss),nb.writeln("</style>");mxClient.IS_GC&&(nb.writeln('<style type="text/css">'),nb.writeln("@media print {"),nb.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),nb.writeln("}"),nb.writeln("</style>"));null!=u.editor.fontCss&&(nb.writeln('<style type="text/css">'),nb.writeln(u.editor.fontCss),nb.writeln("</style>"));for(var c=cb.getCustomFonts(),m=0;m<c.length;m++){var x=c[m].name,p=c[m].url;Graph.isCssFontUrl(p)?
-nb.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(p)+'" charset="UTF-8" type="text/css">'):(nb.writeln('<style type="text/css">'),nb.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(x)+'";\nsrc: url("'+mxUtils.htmlEntities(p)+'");\n}'),nb.writeln("</style>"))}};if("undefined"!==typeof MathJax){var yb=hb.renderPage;hb.renderPage=function(nb,c,m,x,p,v){var A=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!u.editor.useForeignObjectForMath?!0:u.editor.originalNoForeignObject;
+mxClient.IS_SF)nb.writeln('<style type="text/css">'),nb.writeln(Editor.mathJaxWebkitCss),nb.writeln("</style>");mxClient.IS_GC&&(nb.writeln('<style type="text/css">'),nb.writeln("@media print {"),nb.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),nb.writeln("}"),nb.writeln("</style>"));null!=u.editor.fontCss&&(nb.writeln('<style type="text/css">'),nb.writeln(u.editor.fontCss),nb.writeln("</style>"));for(var c=cb.getCustomFonts(),l=0;l<c.length;l++){var x=c[l].name,p=c[l].url;Graph.isCssFontUrl(p)?
+nb.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(p)+'" charset="UTF-8" type="text/css">'):(nb.writeln('<style type="text/css">'),nb.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(x)+'";\nsrc: url("'+mxUtils.htmlEntities(p)+'");\n}'),nb.writeln("</style>"))}};if("undefined"!==typeof MathJax){var yb=hb.renderPage;hb.renderPage=function(nb,c,l,x,p,v){var A=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!u.editor.useForeignObjectForMath?!0:u.editor.originalNoForeignObject;
var B=yb.apply(this,arguments);mxClient.NO_FO=A;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:B.className="geDisableMathJax";return B}}kb=null;eb=S.shapeForegroundColor;pb=S.shapeBackgroundColor;mb=S.enableFlowAnimation;S.enableFlowAnimation=!1;null!=S.themes&&"darkTheme"==S.defaultThemeName&&(kb=S.stylesheet,S.stylesheet=S.getDefaultStylesheet(),S.shapeForegroundColor="#000000",S.shapeBackgroundColor="#ffffff",S.refresh());hb.open(null,null,lb,!0);S.enableFlowAnimation=mb;null!=kb&&
(S.shapeForegroundColor=eb,S.shapeBackgroundColor=pb,S.stylesheet=kb,S.refresh())}else{mb=cb.background;if(null==mb||""==mb||mb==mxConstants.NONE)mb="#ffffff";hb.backgroundColor=mb;hb.autoOrigin=pb;hb.appendGraph(cb,wb,kb,eb,lb,!0);lb=cb.getCustomFonts();if(null!=hb.wnd)for(kb=0;kb<lb.length;kb++)eb=lb[kb].name,pb=lb[kb].url,Graph.isCssFontUrl(pb)?hb.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(pb)+'" charset="UTF-8" type="text/css">'):(hb.wnd.document.writeln('<style type="text/css">'),
hb.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(eb)+'";\nsrc: url("'+mxUtils.htmlEntities(pb)+'");\n}'),hb.wnd.document.writeln("</style>"))}rb&&(cb.useCssTransforms=rb,cb.currentTranslate=vb,cb.currentScale=ob,cb.view.translate=Ab,cb.view.scale=Bb);return hb}var Oa=parseInt(ya.value)/100;isNaN(Oa)&&(Oa=1,ya.value="100 %");Oa*=.75;var Pa=null,Sa=S.shapeForegroundColor,za=S.shapeBackgroundColor;null!=S.themes&&"darkTheme"==S.defaultThemeName&&(Pa=S.stylesheet,S.stylesheet=
@@ -3348,86 +3352,86 @@ Ca=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),funct
this.image;null!=u&&null!=u.src&&Graph.isPageLink(u.src)&&(u={originalSrc:u.src});this.page.viewState.backgroundImage=u}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else fa.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 la=document.createElement("canvas"),ra=new Image;ra.onload=function(){try{la.getContext("2d").drawImage(ra,0,0);var u=la.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=u&&6<u.length}catch(J){}};ra.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(u){}})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};b.afterDecode=function(e,k,n){n.previousColor=n.color;n.previousImage=n.image;n.previousFormat=n.format;null!=n.foldingEnabled&&(n.foldingEnabled=!n.foldingEnabled);null!=n.mathEnabled&&(n.mathEnabled=!n.mathEnabled);null!=n.shadowVisible&&(n.shadowVisible=!n.shadowVisible);return n};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="18.1.2";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="18.1.3";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,
-mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,f,g,l,q,y,F){y=null!=y?y:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
-"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==f||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var C=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";q=null!=q?q:Error(d);(new Image).src=C+"/log?severity="+y+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=l?":colno:"+
-encodeURIComponent(l):"")+(null!=q&&null!=q.stack?"&stack="+encodeURIComponent(q.stack):"")}}catch(H){}try{F||null==window.console||console.error(y,d,f,g,l,q)}catch(H){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(g){}};EditorUi.sendReport=
+mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,f,g,m,q,y,F){y=null!=y?y:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
+"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==f||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var C=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";q=null!=q?q:Error(d);(new Image).src=C+"/log?severity="+y+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=m?":colno:"+
+encodeURIComponent(m):"")+(null!=q&&null!=q.stack?"&stack="+encodeURIComponent(q.stack):"")}}catch(H){}try{F||null==window.console||console.error(y,d,f,g,m,q)}catch(H){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(g){}};EditorUi.sendReport=
function(d,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,d.length>f&&(d=d.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],f=0;f<arguments.length;f++)d.push(arguments[f]);console.log.apply(console,
d)}}catch(g){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var d=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!d.getContext||!d.getContext("2d"))}catch(q){}try{var f=document.createElement("canvas"),g=new Image;g.onload=function(){try{f.getContext("2d").drawImage(g,0,0);var q=
-f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=q&&6<q.length}catch(y){}};g.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}try{f=document.createElement("canvas");f.width=f.height=1;var l=f.toDataURL("image/jpeg");
-EditorUi.prototype.jpgSupported=null!==l.match("image/jpeg")}catch(q){}})();EditorUi.prototype.openLink=function(d,f,g){return this.editor.graph.openLink(d,f,g)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,f){f(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,f,g){localStorage.setItem(d,f);null!=g&&g()};EditorUi.prototype.removeLocalData=function(d,f){localStorage.removeItem(d);f()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=
+f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=q&&6<q.length}catch(y){}};g.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}try{f=document.createElement("canvas");f.width=f.height=1;var m=f.toDataURL("image/jpeg");
+EditorUi.prototype.jpgSupported=null!==m.match("image/jpeg")}catch(q){}})();EditorUi.prototype.openLink=function(d,f,g){return this.editor.graph.openLink(d,f,g)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,f){f(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,f,g){localStorage.setItem(d,f);null!=g&&g()};EditorUi.prototype.removeLocalData=function(d,f){localStorage.removeItem(d);f()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=
d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){this.editor.graph.mathEnabled=d;this.editor.updateGraphComponents();this.editor.graph.refresh();
this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
-EditorUi.prototype.createSpinner=function(d,f,g){var l=null==d||null==f;g=null!=g?g:24;var q=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),y=q.spin;q.spin=function(C,H){var G=!1;this.active||(y.call(this,C),this.active=!0,null!=H&&(l&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),G=document.createElement("div"),
+EditorUi.prototype.createSpinner=function(d,f,g){var m=null==d||null==f;g=null!=g?g:24;var q=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),y=q.spin;q.spin=function(C,H){var G=!1;this.active||(y.call(this,C),this.active=!0,null!=H&&(m&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),G=document.createElement("div"),
G.style.position="absolute",G.style.whiteSpace="nowrap",G.style.background="#4B4243",G.style.color="white",G.style.fontFamily=Editor.defaultHtmlFont,G.style.fontSize="9pt",G.style.padding="6px",G.style.paddingLeft="10px",G.style.paddingRight="10px",G.style.zIndex=2E9,G.style.left=Math.max(0,d)+"px",G.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(G.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(G.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(G.style,
"boxShadow","2px 2px 3px 0px #ddd"),"..."!=H.substring(H.length-3,H.length)&&"!"!=H.charAt(H.length-1)&&(H+="..."),G.innerHTML=H,C.appendChild(G),q.status=G),this.pause=mxUtils.bind(this,function(){var aa=function(){};this.active&&(aa=mxUtils.bind(this,function(){this.spin(C,H)}));this.stop();return aa}),G=!0);return G};var F=q.stop;q.stop=function(){F.call(this);this.active=!1;null!=q.status&&null!=q.status.parentNode&&q.status.parentNode.removeChild(q.status);q.status=null};q.pause=function(){return function(){}};
-return q};EditorUi.prototype.isCompatibleString=function(d){try{var f=mxUtils.parseXml(d),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(l){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&
+return q};EditorUi.prototype.isCompatibleString=function(d){try{var f=mxUtils.parseXml(d),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(m){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&
3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
-EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,l=this.editor.graph,q=this;f.getFunction=function(y){if(l.isSelectionEmpty()&&null!=q.pages&&0<q.pages.length){var F=q.getSelectedPageIndex();if(mxEvent.isShiftDown(y)){if(37==y.keyCode)return function(){0<F&&q.movePage(F,F-1)};if(38==y.keyCode)return function(){0<F&&q.movePage(F,0)};if(39==y.keyCode)return function(){F<q.pages.length-1&&q.movePage(F,
+EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,m=this.editor.graph,q=this;f.getFunction=function(y){if(m.isSelectionEmpty()&&null!=q.pages&&0<q.pages.length){var F=q.getSelectedPageIndex();if(mxEvent.isShiftDown(y)){if(37==y.keyCode)return function(){0<F&&q.movePage(F,F-1)};if(38==y.keyCode)return function(){0<F&&q.movePage(F,0)};if(39==y.keyCode)return function(){F<q.pages.length-1&&q.movePage(F,
F+1)};if(40==y.keyCode)return function(){F<q.pages.length-1&&q.movePage(F,q.pages.length-1)}}else if(mxEvent.isControlDown(y)||mxClient.IS_MAC&&mxEvent.isMetaDown(y)){if(37==y.keyCode)return function(){0<F&&q.selectNextPage(!1)};if(38==y.keyCode)return function(){0<F&&q.selectPage(q.pages[0])};if(39==y.keyCode)return function(){F<q.pages.length-1&&q.selectNextPage(!0)};if(40==y.keyCode)return function(){F<q.pages.length-1&&q.selectPage(q.pages[q.pages.length-1])}}}return g.apply(this,arguments)}}return f};
-var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var f=e.apply(this,arguments);if(null==f)try{var g=d.indexOf("&lt;mxfile ");if(0<=g){var l=d.lastIndexOf("&lt;/mxfile&gt;");l>g&&(f=d.substring(g,l+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var q=mxUtils.parseXml(d),y=this.editor.extractGraphModel(q.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=
+var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var f=e.apply(this,arguments);if(null==f)try{var g=d.indexOf("&lt;mxfile ");if(0<=g){var m=d.lastIndexOf("&lt;/mxfile&gt;");m>g&&(f=d.substring(g,m+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var q=mxUtils.parseXml(d),y=this.editor.extractGraphModel(q.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=
y?mxUtils.getXml(y):""}}catch(F){}return f};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var f=d.indexOf('<meta charset="utf-8">');0<=f&&(d=d.slice(0,f)+'<meta charset="utf-8"/>'+d.slice(f+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d);d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var f=null!=d?this.editor.extractGraphModel(d,!0):null;null!=f&&(d=f);if(null!=d){f=this.editor.graph;
-f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,l=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<l.length||1==l.length&&l[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var q=l.length-1;0<=q;q--){var y=this.updatePageRoot(new DiagramPage(l[q]));null==y.getName()&&y.setName(mxResources.get("pageWithNumber",[q+1]));f.model.execute(new ChangePage(this,y,0==q?y:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=
+f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,m=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<m.length||1==m.length&&m[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var q=m.length-1;0<=q;q--){var y=this.updatePageRoot(new DiagramPage(m[q]));null==y.getName()&&y.setName(mxResources.get("pageWithNumber",[q+1]));f.model.execute(new ChangePage(this,y,0==q?y:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=
d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=g)for(q=0;q<g.length;q++)f.model.execute(new ChangePage(this,g[q],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=
-function(d,f,g,l,q,y,F,C,H,G,aa){f=null!=f?f:this.editor.graph;q=null!=q?q:!1;H=null!=H?H:!0;var da=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var ba="_blank";else da=ba=l;if(null==d)return"";var Y=d;if("mxfile"!=Y.nodeName.toLowerCase()){if(aa){var qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());qa.appendChild(d)}else{qa=Graph.zapGremlins(mxUtils.getXml(d));Y=Graph.compress(qa);if(Graph.decompress(Y)!=qa)return qa;qa=d.ownerDocument.createElement("diagram");
+function(d,f,g,m,q,y,F,C,H,G,aa){f=null!=f?f:this.editor.graph;q=null!=q?q:!1;H=null!=H?H:!0;var da=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var ba="_blank";else da=ba=m;if(null==d)return"";var Y=d;if("mxfile"!=Y.nodeName.toLowerCase()){if(aa){var qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());qa.appendChild(d)}else{qa=Graph.zapGremlins(mxUtils.getXml(d));Y=Graph.compress(qa);if(Graph.decompress(Y)!=qa)return qa;qa=d.ownerDocument.createElement("diagram");
qa.setAttribute("id",Editor.guid());mxUtils.setTextContent(qa,Y)}Y=d.ownerDocument.createElement("mxfile");Y.appendChild(qa)}G?(Y=Y.cloneNode(!0),Y.removeAttribute("modified"),Y.removeAttribute("host"),Y.removeAttribute("agent"),Y.removeAttribute("etag"),Y.removeAttribute("userAgent"),Y.removeAttribute("version"),Y.removeAttribute("editor"),Y.removeAttribute("type")):(Y.removeAttribute("userAgent"),Y.removeAttribute("version"),Y.removeAttribute("editor"),Y.removeAttribute("pages"),Y.removeAttribute("type"),
mxClient.IS_CHROMEAPP?Y.setAttribute("host","Chrome"):EditorUi.isElectronApp?Y.setAttribute("host","Electron"):Y.setAttribute("host",window.location.hostname),Y.setAttribute("modified",(new Date).toISOString()),Y.setAttribute("agent",navigator.appVersion),Y.setAttribute("version",EditorUi.VERSION),Y.setAttribute("etag",Editor.guid()),d=null!=g?g.getMode():this.mode,null!=d&&Y.setAttribute("type",d),1<Y.getElementsByTagName("diagram").length&&null!=this.pages&&Y.setAttribute("pages",this.pages.length));
-aa=aa?mxUtils.getPrettyXml(Y):mxUtils.getXml(Y);if(!y&&!q&&(F||null!=g&&/(\.html)$/i.test(g.getTitle())))aa=this.getHtml2(mxUtils.getXml(Y),f,null!=g?g.getTitle():null,ba,da);else if(y||!q&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(l=null),aa=this.getEmbeddedSvg(aa,f,l,null,C,H,da);return aa};EditorUi.prototype.getXmlFileData=function(d,f,g,l){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var q=this.editor.getGraphXml(d,
-l);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(H){var G=H.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(H)),H=H.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&H.appendChild(mxUtils.parseXml(G).documentElement))):null==G||g?H=H.cloneNode(!0):(H=H.cloneNode(!1),mxUtils.setTextContent(H,Graph.compressNode(G)));q.appendChild(H)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,
-Graph.compressNode(q)),q=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var y=this.pages[f],F=y.node;if(y!=this.currentPage)if(y.needsUpdate){var C=new mxCodec(mxUtils.createXmlDocument());C=C.encode(new mxGraphModel(y.root));this.editor.graph.saveViewState(y.viewState,C,null,l);EditorUi.removeChildNodes(F);mxUtils.setTextContent(F,Graph.compressNode(C));delete y.needsUpdate}else l&&(this.updatePageRoot(y),null!=y.viewState.backgroundImage&&(null!=y.viewState.backgroundImage.originalSrc?
-y.viewState.backgroundImage=this.createImageForPageLink(y.viewState.backgroundImage.originalSrc,y):Graph.isPageLink(y.viewState.backgroundImage.src)&&(y.viewState.backgroundImage=this.createImageForPageLink(y.viewState.backgroundImage.src,y))),null!=y.viewState.backgroundImage&&null!=y.viewState.backgroundImage.originalSrc&&(C=new mxCodec(mxUtils.createXmlDocument()),C=C.encode(new mxGraphModel(y.root)),this.editor.graph.saveViewState(y.viewState,C,null,l),F=F.cloneNode(!1),mxUtils.setTextContent(F,
-Graph.compressNode(C))));d(F)}return q};EditorUi.prototype.anonymizeString=function(d,f){for(var g=[],l=0;l<d.length;l++){var q=d.charAt(l);0<=EditorUi.ignoredAnonymizedChars.indexOf(q)?g.push(q):isNaN(parseInt(q))?q.toLowerCase()!=q?g.push(String.fromCharCode(65+Math.round(25*Math.random()))):q.toUpperCase()!=q?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(q)?g.push(" "):g.push("?"):g.push(f?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=
-function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSERT].length;f++)try{var g=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(y){d[EditorUi.DIFF_INSERT][f].data=y.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var l in d[EditorUi.DIFF_UPDATE]){var q=d[EditorUi.DIFF_UPDATE][l];null!=q.name&&
+aa=aa?mxUtils.getPrettyXml(Y):mxUtils.getXml(Y);if(!y&&!q&&(F||null!=g&&/(\.html)$/i.test(g.getTitle())))aa=this.getHtml2(mxUtils.getXml(Y),f,null!=g?g.getTitle():null,ba,da);else if(y||!q&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(m=null),aa=this.getEmbeddedSvg(aa,f,m,null,C,H,da);return aa};EditorUi.prototype.getXmlFileData=function(d,f,g,m){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var q=this.editor.getGraphXml(d,
+m);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(H){var G=H.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(H)),H=H.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&H.appendChild(mxUtils.parseXml(G).documentElement))):null==G||g?H=H.cloneNode(!0):(H=H.cloneNode(!1),mxUtils.setTextContent(H,Graph.compressNode(G)));q.appendChild(H)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,
+Graph.compressNode(q)),q=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var y=this.pages[f],F=y.node;if(y!=this.currentPage)if(y.needsUpdate){var C=new mxCodec(mxUtils.createXmlDocument());C=C.encode(new mxGraphModel(y.root));this.editor.graph.saveViewState(y.viewState,C,null,m);EditorUi.removeChildNodes(F);mxUtils.setTextContent(F,Graph.compressNode(C));delete y.needsUpdate}else m&&(this.updatePageRoot(y),null!=y.viewState.backgroundImage&&(null!=y.viewState.backgroundImage.originalSrc?
+y.viewState.backgroundImage=this.createImageForPageLink(y.viewState.backgroundImage.originalSrc,y):Graph.isPageLink(y.viewState.backgroundImage.src)&&(y.viewState.backgroundImage=this.createImageForPageLink(y.viewState.backgroundImage.src,y))),null!=y.viewState.backgroundImage&&null!=y.viewState.backgroundImage.originalSrc&&(C=new mxCodec(mxUtils.createXmlDocument()),C=C.encode(new mxGraphModel(y.root)),this.editor.graph.saveViewState(y.viewState,C,null,m),F=F.cloneNode(!1),mxUtils.setTextContent(F,
+Graph.compressNode(C))));d(F)}return q};EditorUi.prototype.anonymizeString=function(d,f){for(var g=[],m=0;m<d.length;m++){var q=d.charAt(m);0<=EditorUi.ignoredAnonymizedChars.indexOf(q)?g.push(q):isNaN(parseInt(q))?q.toLowerCase()!=q?g.push(String.fromCharCode(65+Math.round(25*Math.random()))):q.toUpperCase()!=q?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(q)?g.push(" "):g.push("?"):g.push(f?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=
+function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSERT].length;f++)try{var g=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(y){d[EditorUi.DIFF_INSERT][f].data=y.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var m in d[EditorUi.DIFF_UPDATE]){var q=d[EditorUi.DIFF_UPDATE][m];null!=q.name&&
(q.name=this.anonymizeString(q.name));null!=q.cells&&(f=mxUtils.bind(this,function(y){var F=q.cells[y];if(null!=F){for(var C in F)null!=F[C].value&&(F[C].value="["+F[C].value.length+"]"),null!=F[C].xmlValue&&(F[C].xmlValue="["+F[C].xmlValue.length+"]"),null!=F[C].style&&(F[C].style="["+F[C].style.length+"]"),mxUtils.isEmptyObject(F[C])&&delete F[C];mxUtils.isEmptyObject(F)&&delete q.cells[y]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(q.cells)&&delete q.cells);mxUtils.isEmptyObject(q)&&
-delete d[EditorUi.DIFF_UPDATE][l]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&&d.setAttribute(d.attributes[g].name,this.anonymizeString(d.attributes[g].value,f));if(null!=d.childNodes)for(g=0;g<d.childNodes.length;g++)this.anonymizeAttributes(d.childNodes[g],f)};EditorUi.prototype.anonymizeNode=function(d,f){f=d.getElementsByTagName("mxCell");
+delete d[EditorUi.DIFF_UPDATE][m]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&&d.setAttribute(d.attributes[g].name,this.anonymizeString(d.attributes[g].value,f));if(null!=d.childNodes)for(g=0;g<d.childNodes.length;g++)this.anonymizeAttributes(d.childNodes[g],f)};EditorUi.prototype.anonymizeNode=function(d,f){f=d.getElementsByTagName("mxCell");
for(var g=0;g<f.length;g++)null!=f[g].getAttribute("value")&&f[g].setAttribute("value","["+f[g].getAttribute("value").length+"]"),null!=f[g].getAttribute("xmlValue")&&f[g].setAttribute("xmlValue","["+f[g].getAttribute("xmlValue").length+"]"),null!=f[g].getAttribute("style")&&f[g].setAttribute("style","["+f[g].getAttribute("style").length+"]"),null!=f[g].parentNode&&"root"!=f[g].parentNode.nodeName&&null!=f[g].parentNode.parentNode&&(f[g].setAttribute("id",f[g].parentNode.getAttribute("id")),f[g].parentNode.parentNode.replaceChild(f[g],
f[g].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&f.invalidChecksum?f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),d?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,
-function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,l,q,y,F,C,H,G,aa){q=null!=q?q:!0;y=null!=y?y:!1;var da=this.editor.graph;if(f||!d&&null!=H&&/(\.svg)$/i.test(H.getTitle())){var ba=null!=da.themes&&"darkTheme"==da.defaultThemeName;G=!1;if(ba||null!=this.pages&&this.currentPage!=this.pages[0]){var Y=da.getGlobalVariable;da=this.createTemporaryGraph(ba?da.getDefaultStylesheet():da.getStylesheet());
+function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,m,q,y,F,C,H,G,aa){q=null!=q?q:!0;y=null!=y?y:!1;var da=this.editor.graph;if(f||!d&&null!=H&&/(\.svg)$/i.test(H.getTitle())){var ba=null!=da.themes&&"darkTheme"==da.defaultThemeName;G=!1;if(ba||null!=this.pages&&this.currentPage!=this.pages[0]){var Y=da.getGlobalVariable;da=this.createTemporaryGraph(ba?da.getDefaultStylesheet():da.getStylesheet());
da.setBackgroundImage=this.editor.graph.setBackgroundImage;da.background=this.editor.graph.background;var qa=this.pages[0];this.currentPage==qa?da.setBackgroundImage(this.editor.graph.backgroundImage):null!=qa.viewState&&null!=qa.viewState&&da.setBackgroundImage(qa.viewState.backgroundImage);da.getGlobalVariable=function(O){return"page"==O?qa.getName():"pagenumber"==O?1:Y.apply(this,arguments)};document.body.appendChild(da.container);da.model.setRoot(qa.root)}}F=null!=F?F:this.getXmlFileData(q,y,
-G,aa);H=null!=H?H:this.getCurrentFile();d=this.createFileData(F,da,H,window.location.href,d,f,g,l,q,C,G);da!=this.editor.graph&&da.container.parentNode.removeChild(da.container);return d};EditorUi.prototype.getHtml=function(d,f,g,l,q,y){y=null!=y?y:!0;var F=null,C=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=y?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var H=f.view.scale;y=Math.floor(F.x/H-f.view.translate.x);H=Math.floor(F.y/H-f.view.translate.y);F=f.background;null==
-q&&(f=this.getBasenames().join(";"),0<f.length&&(C=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",y);d.setAttribute("y0",H)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize","0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=l&&d.setAttribute("edit",l));null!=q&&(q=q.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";l=Graph.compress(d);Graph.decompress(l)!=d&&(l=encodeURIComponent(d));
+G,aa);H=null!=H?H:this.getCurrentFile();d=this.createFileData(F,da,H,window.location.href,d,f,g,m,q,C,G);da!=this.editor.graph&&da.container.parentNode.removeChild(da.container);return d};EditorUi.prototype.getHtml=function(d,f,g,m,q,y){y=null!=y?y:!0;var F=null,C=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=y?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var H=f.view.scale;y=Math.floor(F.x/H-f.view.translate.x);H=Math.floor(F.y/H-f.view.translate.y);F=f.background;null==
+q&&(f=this.getBasenames().join(";"),0<f.length&&(C=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",y);d.setAttribute("y0",H)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize","0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=m&&d.setAttribute("edit",m));null!=q&&(q=q.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";m=Graph.compress(d);Graph.decompress(m)!=d&&(m=encodeURIComponent(d));
return(null==q?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=q?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==q?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=q?'<meta http-equiv="refresh" content="0;URL=\''+q+"'\"/>\n":"")+"</head>\n<body"+(null==q&&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;">'+
-l+"</div>\n</div>\n"+(null==q?'<script type="text/javascript" src="'+C+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,g,l,q){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=q&&(q=q.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,
+m+"</div>\n</div>\n"+(null==q?'<script type="text/javascript" src="'+C+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,g,m,q){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=q&&(q=q.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,
resize:!0,xml:Graph.zapGremlins(d),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==q?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=q?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==q?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=q?'<meta http-equiv="refresh" content="0;URL=\''+
q+"'\"/>\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(d))+'"></div>\n'+(null==q?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=
function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var f=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null,g=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[d],"node",[f],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");d=null!=f?this.editor.extractGraphModel(f,!0):null;null!=d&&(f=d);if(null!=f&&"mxfile"==f.nodeName&&(d=f.getElementsByTagName("diagram"),
-"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){g=null;this.fileNode=f;this.pages=[];for(var l=0;l<d.length;l++)null==d[l].getAttribute("id")&&d[l].setAttribute("id",l),f=new DiagramPage(d[l]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[l+1])),this.pages.push(f),null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(g=f);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}"0"!=
-urlParams.pages&&null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var q=urlParams["layer-ids"].split(" ");f={};for(l=0;l<q.length;l++)f[q[l]]=!0;var y=this.editor.graph.getModel(),
-F=y.getChildren(y.root);for(l=0;l<F.length;l++){var C=F[l];y.setVisible(C,f[C.id]||!1)}}catch(H){}};EditorUi.prototype.getBaseFilename=function(d){var f=this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&
-0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(d,f,g,l,q,y,F,C,H,G,aa,da){try{l=null!=l?l:this.editor.graph.isSelectionEmpty();var ba=this.getBaseFilename("remoteSvg"==d?!1:!q),Y=ba+("xml"==d||"pdf"==d&&aa?".drawio":"")+"."+d;if("xml"==d){var qa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,l,q,null,null,null,f);this.saveData(Y,d,qa,"text/xml")}else if("html"==d)qa=this.getHtml2(this.getFileData(!0),this.editor.graph,
+"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){g=null;this.fileNode=f;this.pages=[];for(var m=0;m<d.length;m++)null==d[m].getAttribute("id")&&d[m].setAttribute("id",m),f=new DiagramPage(d[m]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[m+1])),this.pages.push(f),null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(g=f);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}"0"!=
+urlParams.pages&&null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var q=urlParams["layer-ids"].split(" ");f={};for(m=0;m<q.length;m++)f[q[m]]=!0;var y=this.editor.graph.getModel(),
+F=y.getChildren(y.root);for(m=0;m<F.length;m++){var C=F[m];y.setVisible(C,f[C.id]||!1)}}catch(H){}};EditorUi.prototype.getBaseFilename=function(d){var f=this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&
+0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(d,f,g,m,q,y,F,C,H,G,aa,da){try{m=null!=m?m:this.editor.graph.isSelectionEmpty();var ba=this.getBaseFilename("remoteSvg"==d?!1:!q),Y=ba+("xml"==d||"pdf"==d&&aa?".drawio":"")+"."+d;if("xml"==d){var qa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,m,q,null,null,null,f);this.saveData(Y,d,qa,"text/xml")}else if("html"==d)qa=this.getHtml2(this.getFileData(!0),this.editor.graph,
ba),this.saveData(Y,d,qa,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)Y=ba+".png";else if("jpeg"==d)Y=ba+".jpg";else if("remoteSvg"==d){Y=ba+".svg";d="svg";var O=parseInt(H);"string"===typeof C&&0<C.indexOf("%")&&(C=parseInt(C)/100);if(0<O){var X=this.editor.graph,ea=X.getGraphBounds();var ka=Math.ceil(ea.width*C/X.view.scale+2*O);var ja=Math.ceil(ea.height*C/X.view.scale+2*O)}}this.saveRequest(Y,d,mxUtils.bind(this,function(R,
-fa){try{var la=this.editor.graph.pageVisible;0==y&&(this.editor.graph.pageVisible=y);var ra=this.createDownloadRequest(R,d,l,fa,F,q,C,H,G,aa,da,ka,ja);this.editor.graph.pageVisible=la;return ra}catch(u){this.handleError(u)}}))}else{var U=null,I=mxUtils.bind(this,function(R){R.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",R,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(U)}))});if("svg"==d){var V=this.editor.graph.background;
-if(F||V==mxConstants.NONE)V=null;var Q=this.editor.graph.getSvg(V,null,null,null,null,l);g&&this.editor.graph.addSvgShadow(Q);this.editor.convertImages(Q,mxUtils.bind(this,mxUtils.bind(this,function(R){this.spinner.stop();I(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(R))})))}else Y=ba+".svg",U=this.getFileData(!1,!0,null,mxUtils.bind(this,function(R){this.spinner.stop();I(R)}),l)}}catch(R){this.handleError(R)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,l,q,y,F,C,H,
+fa){try{var la=this.editor.graph.pageVisible;0==y&&(this.editor.graph.pageVisible=y);var ra=this.createDownloadRequest(R,d,m,fa,F,q,C,H,G,aa,da,ka,ja);this.editor.graph.pageVisible=la;return ra}catch(u){this.handleError(u)}}))}else{var U=null,I=mxUtils.bind(this,function(R){R.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",R,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(U)}))});if("svg"==d){var V=this.editor.graph.background;
+if(F||V==mxConstants.NONE)V=null;var Q=this.editor.graph.getSvg(V,null,null,null,null,m);g&&this.editor.graph.addSvgShadow(Q);this.editor.convertImages(Q,mxUtils.bind(this,mxUtils.bind(this,function(R){this.spinner.stop();I(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(R))})))}else Y=ba+".svg",U=this.getFileData(!1,!0,null,mxUtils.bind(this,function(R){this.spinner.stop();I(R)}),m)}}catch(R){this.handleError(R)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,m,q,y,F,C,H,
G,aa,da,ba){var Y=this.editor.graph,qa=Y.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==y?!1:"xmlpng"!=f,null,null,null,!1,"pdf"==f);var O="",X="";if(qa.width*qa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=aa?X="&from="+aa.from+"&to="+aa.to:0==y&&(X="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(y=0;y<this.pages.length;y++)if(this.pages[y]==
-this.currentPage){O="&from="+y;break}y=Y.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!q?q||null!=y&&y!=mxConstants.NONE||(y="#ffffff"):y=mxConstants.NONE;q={globalVars:Y.getExportVariables()};H&&(q.grid={size:Y.gridSize,steps:Y.view.gridSteps,color:Y.view.gridColor});Graph.translateDiagram&&(q.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+O+X+"&bg="+(null!=y?y:mxConstants.NONE)+"&base64="+l+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):
-"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(null!=F?"&scale="+F:"")+(null!=C?"&border="+C:"")+(da&&isFinite(da)?"&w="+da:"")+(ba&&isFinite(ba)?"&h="+ba:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var l=window.location.hash,q=mxUtils.bind(this,function(y){var F=null!=d.data?d.data:"";null!=y&&0<y.length&&(0<F.length&&(F+="\n"),F+=y);y=new LocalFile(this,"csv"!=d.format&&0<F.length?F:this.emptyDiagramXml,null!=urlParams.title?
-decodeURIComponent(urlParams.title):this.defaultFilename,!0);y.getHash=function(){return l};this.fileLoaded(y);"csv"==d.format&&this.importCsv(F,mxUtils.bind(this,function(da){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var C=null!=d.interval?parseInt(d.interval):6E4,H=null,G=mxUtils.bind(this,function(){var da=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,
+this.currentPage){O="&from="+y;break}y=Y.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!q?q||null!=y&&y!=mxConstants.NONE||(y="#ffffff"):y=mxConstants.NONE;q={globalVars:Y.getExportVariables()};H&&(q.grid={size:Y.gridSize,steps:Y.view.gridSteps,color:Y.view.gridColor});Graph.translateDiagram&&(q.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+O+X+"&bg="+(null!=y?y:mxConstants.NONE)+"&base64="+m+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):
+"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(null!=F?"&scale="+F:"")+(null!=C?"&border="+C:"")+(da&&isFinite(da)?"&w="+da:"")+(ba&&isFinite(ba)?"&h="+ba:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var m=window.location.hash,q=mxUtils.bind(this,function(y){var F=null!=d.data?d.data:"";null!=y&&0<y.length&&(0<F.length&&(F+="\n"),F+=y);y=new LocalFile(this,"csv"!=d.format&&0<F.length?F:this.emptyDiagramXml,null!=urlParams.title?
+decodeURIComponent(urlParams.title):this.defaultFilename,!0);y.getHash=function(){return m};this.fileLoaded(y);"csv"==d.format&&this.importCsv(F,mxUtils.bind(this,function(da){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var C=null!=d.interval?parseInt(d.interval):6E4,H=null,G=mxUtils.bind(this,function(){var da=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,
function(ba){da===this.currentPage&&(200<=ba.getStatus()&&300>=ba.getStatus()?(this.updateDiagram(ba.getText()),aa()):this.handleError({message:mxResources.get("error")+" "+ba.getStatus()}))}),mxUtils.bind(this,function(ba){this.handleError(ba)}))}),aa=mxUtils.bind(this,function(){window.clearTimeout(H);H=window.setTimeout(G,C)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){aa();G()}));aa();G()}null!=f&&f()});null!=d.url&&0<d.url.length?this.editor.loadUrl(d.url,mxUtils.bind(this,
-function(y){q(y)}),mxUtils.bind(this,function(y){null!=g&&g(y)})):q("")};EditorUi.prototype.updateDiagram=function(d){function f(ja){var U=new mxCellOverlay(ja.image||q.warningImage,ja.tooltip,ja.align,ja.valign,ja.offset);U.addListener(mxEvent.CLICK,function(I,V){l.alert(ja.tooltip)});return U}var g=null,l=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var q=this.editor.graph,y=q.getModel();y.beginUpdate();var F=null;try{for(d=
+function(y){q(y)}),mxUtils.bind(this,function(y){null!=g&&g(y)})):q("")};EditorUi.prototype.updateDiagram=function(d){function f(ja){var U=new mxCellOverlay(ja.image||q.warningImage,ja.tooltip,ja.align,ja.valign,ja.offset);U.addListener(mxEvent.CLICK,function(I,V){m.alert(ja.tooltip)});return U}var g=null,m=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var q=this.editor.graph,y=q.getModel();y.beginUpdate();var F=null;try{for(d=
d.firstChild;null!=d;){if("update"==d.nodeName){var C=y.getCell(d.getAttribute("id"));if(null!=C){try{var H=d.getAttribute("value");if(null!=H){var G=mxUtils.parseXml(H).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))y.setValue(C,G);else for(var aa=G.attributes,da=0;da<aa.length;da++)q.setAttributeForCell(C,aa[da].nodeName,0<aa[da].nodeValue.length?aa[da].nodeValue:null)}}catch(ja){null!=window.console&&console.log("Error in value for "+C.id+": "+ja)}try{var ba=d.getAttribute("style");
null!=ba&&q.model.setStyle(C,ba)}catch(ja){null!=window.console&&console.log("Error in style for "+C.id+": "+ja)}try{var Y=d.getAttribute("icon");if(null!=Y){var qa=0<Y.length?JSON.parse(Y):null;null!=qa&&qa.append||q.removeCellOverlays(C);null!=qa&&q.addCellOverlay(C,f(qa))}}catch(ja){null!=window.console&&console.log("Error in icon for "+C.id+": "+ja)}try{var O=d.getAttribute("geometry");if(null!=O){O=JSON.parse(O);var X=q.getCellGeometry(C);if(null!=X){X=X.clone();for(key in O){var ea=parseFloat(O[key]);
"dx"==key?X.x+=ea:"dy"==key?X.y+=ea:"dw"==key?X.width+=ea:"dh"==key?X.height+=ea:X[key]=parseFloat(O[key])}q.model.setGeometry(C,X)}}}catch(ja){null!=window.console&&console.log("Error in icon for "+C.id+": "+ja)}}}else if("model"==d.nodeName){for(var ka=d.firstChild;null!=ka&&ka.nodeType!=mxConstants.NODETYPE_ELEMENT;)ka=ka.nextSibling;null!=ka&&(new mxCodec(d.firstChild)).decode(ka,y)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(q.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||
-d.hasAttribute("dy"))q.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(F=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{y.endUpdate()}null!=F&&this.chromelessResize&&this.chromelessResize(!0,F)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var l=g.lastIndexOf(".");0<=l&&(d=g.substring(l),g=
-g.substring(0,l));if(f){f=g;var q=new Date;g=q.getFullYear();l=q.getMonth()+1;var y=q.getDate(),F=q.getHours(),C=q.getMinutes();q=q.getSeconds();g=f+(" "+(g+"-"+l+"-"+y+"-"+F+"-"+C+"-"+q))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var l=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());
+d.hasAttribute("dy"))q.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(F=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{y.endUpdate()}null!=F&&this.chromelessResize&&this.chromelessResize(!0,F)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var m=g.lastIndexOf(".");0<=m&&(d=g.substring(m),g=
+g.substring(0,m));if(f){f=g;var q=new Date;g=q.getFullYear();m=q.getMonth()+1;var y=q.getDate(),F=q.getHours(),C=q.getMinutes();q=q.getSeconds();g=f+(" "+(g+"-"+m+"-"+y+"-"+F+"-"+C+"-"+q))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var m=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());
this.editor.graph.model.clear();this.editor.undoManager.clear();var q=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&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();f||this.showSplash()});if(null!=d)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();
this.updateUi();d.isEditable()?d.isModified()?(d.addUnsavedStatus(),null!=d.backupPatch&&d.patch([d.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+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"));l=!0;if(!this.isOffline()&&null!=d.getMode()){var y="1"==urlParams.sketch?"sketch":uiTheme;if(null==y)y="default";else if("sketch"==y||"min"==y)y+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+y})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));
+this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));m=!0;if(!this.isOffline()&&null!=d.getMode()){var y="1"==urlParams.sketch?"sketch":uiTheme;if(null==y)y="default";else if("sketch"==y||"min"==y)y+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+y})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));
if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(F){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(F){}}catch(F){this.fileLoadedError=F;if(null!=d)try{d.close()}catch(C){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+F.message,label:"stack_"+
-F.stack})}catch(C){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||q():q()});f?d():this.handleError(F,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else q();return l};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,l=new mxGraphModel,q=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var y=0;y<d.length;y++){this.updatePageRoot(d[y]);
-var F=d[y].node.cloneNode(!1);F.removeAttribute("name");l.root=d[y].root;var C=q.encode(l);this.editor.graph.saveViewState(d[y].viewState,C,!0);C.removeAttribute("pageWidth");C.removeAttribute("pageHeight");F.appendChild(C);null!=f&&(f.eltCount+=F.getElementsByTagName("*").length,f.nodeCount+=F.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(F,function(H,G,aa,da){return!da||"mxGeometry"!=H.nodeName&&"mxPoint"!=H.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?da&&"mxCell"==H.nodeName&&
-"previous"==G?null:aa:Math.round(aa)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var l=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(l^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var q=0;q<d.attributes.length;q++){var y=d.attributes[q].name,F=null!=f?f(d,y,d.attributes[q].value,!0):d.attributes[q].value;null!=F&&(l^=this.hashValue(y,
-f,g)+this.hashValue(F,f,g))}}if(null!=d.childNodes)for(q=0;q<d.childNodes.length;q++)l=(l<<5)-l+this.hashValue(d.childNodes[q],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(q=0;q<d.length;q++)f=(f<<5)-f+d.charCodeAt(q)<<0;l^=f}return l};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,l,q,y,F){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
+F.stack})}catch(C){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||q():q()});f?d():this.handleError(F,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else q();return m};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,m=new mxGraphModel,q=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var y=0;y<d.length;y++){this.updatePageRoot(d[y]);
+var F=d[y].node.cloneNode(!1);F.removeAttribute("name");m.root=d[y].root;var C=q.encode(m);this.editor.graph.saveViewState(d[y].viewState,C,!0);C.removeAttribute("pageWidth");C.removeAttribute("pageHeight");F.appendChild(C);null!=f&&(f.eltCount+=F.getElementsByTagName("*").length,f.nodeCount+=F.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(F,function(H,G,aa,da){return!da||"mxGeometry"!=H.nodeName&&"mxPoint"!=H.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?da&&"mxCell"==H.nodeName&&
+"previous"==G?null:aa:Math.round(aa)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var m=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(m^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var q=0;q<d.attributes.length;q++){var y=d.attributes[q].name,F=null!=f?f(d,y,d.attributes[q].value,!0):d.attributes[q].value;null!=F&&(m^=this.hashValue(y,
+f,g)+this.hashValue(F,f,g))}}if(null!=d.childNodes)for(q=0;q<d.childNodes.length;q++)m=(m<<5)-m+this.hashValue(d.childNodes[q],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(q=0;q<d.length;q++)f=(f<<5)-f+d.charCodeAt(q)<<0;m^=f}return m};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,m,q,y,F){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){var f=mxUtils.createXmlDocument(),g=f.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(d));f.appendChild(g);
return mxUtils.getXml(f)};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var f=this.sidebar.palettes[d];if(null!=f){for(var g=0;g<f.length;g++)f[g].parentNode.removeChild(f[g]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d){var f=this.sidebar.container;
-if(null==d){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(d=g[g.length-1].nextSibling)}d=null!=d?d:f.firstChild.nextSibling.nextSibling;g=f.lastChild;var l=g.previousSibling;f.insertBefore(g,d);f.insertBefore(l,g)};EditorUi.prototype.loadLibrary=function(d,f){var g=mxUtils.parseXml(d.getData());if("mxlibrary"==g.documentElement.nodeName){var l=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(d,l,g.documentElement.getAttribute("title"),
-f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,l){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var q=this.sidebar.palettes[d.getHash()];q=null!=q?q[q.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var y=null,F=mxUtils.bind(this,function(ka,ja){0==ka.length&&d.isEditable()?
-(null==y&&(y=document.createElement("div"),y.className="geDropTarget",mxUtils.write(y,mxResources.get("dragElementsHere"))),ja.appendChild(y)):this.addLibraryEntries(ka,ja)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var C=this.sidebar.addPalette(d.getHash(),g,null!=l?l:!0,mxUtils.bind(this,function(ka){F(f,ka)}));this.repositionLibrary(q);var H=C.parentNode.previousSibling;l=H.getAttribute("title");
-null!=l&&0<l.length&&".scratchpad"!=d.title&&H.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+l);var G=document.createElement("div");G.style.position="absolute";G.style.right="0px";G.style.top="0px";G.style.padding="8px";G.style.backgroundColor="inherit";H.style.position="relative";var aa=document.createElement("img");aa.setAttribute("src",Editor.crossImage);aa.setAttribute("title",mxResources.get("close"));aa.setAttribute("valign","absmiddle");aa.setAttribute("border","0");aa.style.position=
+if(null==d){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(d=g[g.length-1].nextSibling)}d=null!=d?d:f.firstChild.nextSibling.nextSibling;g=f.lastChild;var m=g.previousSibling;f.insertBefore(g,d);f.insertBefore(m,g)};EditorUi.prototype.loadLibrary=function(d,f){var g=mxUtils.parseXml(d.getData());if("mxlibrary"==g.documentElement.nodeName){var m=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(d,m,g.documentElement.getAttribute("title"),
+f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,m){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var q=this.sidebar.palettes[d.getHash()];q=null!=q?q[q.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var y=null,F=mxUtils.bind(this,function(ka,ja){0==ka.length&&d.isEditable()?
+(null==y&&(y=document.createElement("div"),y.className="geDropTarget",mxUtils.write(y,mxResources.get("dragElementsHere"))),ja.appendChild(y)):this.addLibraryEntries(ka,ja)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var C=this.sidebar.addPalette(d.getHash(),g,null!=m?m:!0,mxUtils.bind(this,function(ka){F(f,ka)}));this.repositionLibrary(q);var H=C.parentNode.previousSibling;m=H.getAttribute("title");
+null!=m&&0<m.length&&".scratchpad"!=d.title&&H.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+m);var G=document.createElement("div");G.style.position="absolute";G.style.right="0px";G.style.top="0px";G.style.padding="8px";G.style.backgroundColor="inherit";H.style.position="relative";var aa=document.createElement("img");aa.setAttribute("src",Editor.crossImage);aa.setAttribute("title",mxResources.get("close"));aa.setAttribute("valign","absmiddle");aa.setAttribute("border","0");aa.style.position=
"relative";aa.style.top="2px";aa.style.width="14px";aa.style.cursor="pointer";aa.style.margin="0 3px";Editor.isDarkMode()&&(aa.style.filter="invert(100%)");var da=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(aa),mxEvent.addListener(aa,"click",mxUtils.bind(this,function(ka){if(!mxEvent.isConsumed(ka)){var ja=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=da?this.confirm(mxResources.get("allChangesLost"),null,ja,mxResources.get("cancel"),mxResources.get("discardChanges")):
ja();mxEvent.consume(ka)}}));if(d.isEditable()){var ba=this.editor.graph,Y=null,qa=mxUtils.bind(this,function(ka){this.showLibraryDialog(d.getTitle(),C,f,d,d.getMode());mxEvent.consume(ka)}),O=mxUtils.bind(this,function(ka){d.setModified(!0);d.isAutosave()?(null!=Y&&null!=Y.parentNode&&Y.parentNode.removeChild(Y),Y=aa.cloneNode(!1),Y.setAttribute("src",Editor.spinImage),Y.setAttribute("title",mxResources.get("saving")),Y.style.cursor="default",Y.style.marginRight="2px",Y.style.marginTop="-2px",G.insertBefore(Y,
G.firstChild),H.style.paddingRight=18*G.childNodes.length+"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=Y&&null!=Y.parentNode&&(Y.parentNode.removeChild(Y),H.style.paddingRight=18*G.childNodes.length+"px")})):null==da&&(da=aa.cloneNode(!1),da.setAttribute("src",Editor.saveImage),da.setAttribute("title",mxResources.get("save")),G.insertBefore(da,G.firstChild),mxEvent.addListener(da,"click",mxUtils.bind(this,function(ja){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==
@@ -3440,85 +3444,85 @@ this.maxImageSize,mxUtils.bind(this,function(ja,U,I,V,Q,R,fa,la,ra){if(null!=ja&
mxUtils.bind(this,function(N,W){null!=N&&"application/pdf"==W&&(W=Editor.extractGraphModelFromPdf(N),null!=W&&0<W.length&&(N=W));if(null!=N)if(N=mxUtils.parseXml(N),"mxlibrary"==N.documentElement.nodeName)try{var S=JSON.parse(mxUtils.getTextContent(N.documentElement));F(S,C);f=f.concat(S);O(ka);this.spinner.stop();u=!0}catch(va){}else if("mxfile"==N.documentElement.nodeName)try{var P=N.documentElement.getElementsByTagName("diagram");for(S=0;S<P.length;S++){var Z=this.stringToCells(Editor.getDiagramNodeXml(P[S])),
oa=this.editor.graph.getBoundingBoxFromGeometry(Z);X(Z,new mxRectangle(0,0,oa.width,oa.height),ka)}u=!0}catch(va){null!=window.console&&console.log("error in drop handler:",va)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null)});null!=ra&&null!=fa&&(/(\.v(dx|sdx?))($|\?)/i.test(fa)||/(\.vs(x|sx?))($|\?)/i.test(fa))?this.importVisio(ra,function(N){J(N,"text/xml")},null,fa):(new XMLHttpRequest).upload&&
this.isRemoteFileFormat(ja,fa)&&null!=ra?this.isExternalDataComms()?this.parseFile(ra,mxUtils.bind(this,function(N){4==N.readyState&&(this.spinner.stop(),200<=N.status&&299>=N.status?J(N.responseText,"text/xml"):this.handleError({message:mxResources.get(413==N.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):J(ja,U)}}));ka.stopPropagation();ka.preventDefault()})),
-mxEvent.addListener(C,"dragleave",function(ka){C.style.cursor="";C.style.backgroundColor="";ka.stopPropagation();ka.preventDefault()}));aa=aa.cloneNode(!1);aa.setAttribute("src",Editor.editImage);aa.setAttribute("title",mxResources.get("edit"));G.insertBefore(aa,G.firstChild);mxEvent.addListener(aa,"click",qa);mxEvent.addListener(C,"dblclick",function(ka){mxEvent.getSource(ka)==C&&qa(ka)});l=aa.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));G.insertBefore(l,
-G.firstChild);mxEvent.addListener(l,"click",ea);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(l=document.createElement("span"),l.setAttribute("title",mxResources.get("help")),l.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(l,"?"),mxEvent.addGestureListeners(l,mxUtils.bind(this,function(ka){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(ka)})),G.insertBefore(l,G.firstChild))}H.appendChild(G);H.style.paddingRight=
-18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=0;g<d.length;g++){var l=d[g],q=l.data;if(null!=q){q=this.convertDataUri(q);var y="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==l.aspect&&(y+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(y+"image="+q,l.w,l.h,"",l.title||"",!1,null,!0))}else null!=l.xml&&(q=this.stringToCells(Graph.decompress(l.xml)),0<q.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(q,
-l.w,l.h,l.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground=
+mxEvent.addListener(C,"dragleave",function(ka){C.style.cursor="";C.style.backgroundColor="";ka.stopPropagation();ka.preventDefault()}));aa=aa.cloneNode(!1);aa.setAttribute("src",Editor.editImage);aa.setAttribute("title",mxResources.get("edit"));G.insertBefore(aa,G.firstChild);mxEvent.addListener(aa,"click",qa);mxEvent.addListener(C,"dblclick",function(ka){mxEvent.getSource(ka)==C&&qa(ka)});m=aa.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",mxResources.get("add"));G.insertBefore(m,
+G.firstChild);mxEvent.addListener(m,"click",ea);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(m=document.createElement("span"),m.setAttribute("title",mxResources.get("help")),m.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(m,"?"),mxEvent.addGestureListeners(m,mxUtils.bind(this,function(ka){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(ka)})),G.insertBefore(m,G.firstChild))}H.appendChild(G);H.style.paddingRight=
+18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=0;g<d.length;g++){var m=d[g],q=m.data;if(null!=q){q=this.convertDataUri(q);var y="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==m.aspect&&(y+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(y+"image="+q,m.w,m.h,"",m.title||"",!1,null,!0))}else null!=m.xml&&(q=this.stringToCells(Graph.decompress(m.xml)),0<q.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(q,
+m.w,m.h,m.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground=
"rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor=
"#505759",BaseFormatPanel.prototype.buttonBackgroundColor=Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];"1"==urlParams.sketch&&("undefined"!==
typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,
-Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,f,g,l,q,y,F){d=new ImageDialog(this,d,f,g,l,q,y,F);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f){d=null!=d?d:mxUtils.bind(this,function(g,l){l||(g=new ChangePageSetup(this,null,g),
-g.ignoreColor=!0,this.editor.graph.model.execute(g))});d=new BackgroundImageDialog(this,d,f);this.showDialog(d.container,400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,l,q){d=new LibraryDialog(this,d,f,g,l,q);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(y){y&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var f=k.apply(this,arguments);
+Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,f,g,m,q,y,F){d=new ImageDialog(this,d,f,g,m,q,y,F);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f){d=null!=d?d:mxUtils.bind(this,function(g,m){m||(g=new ChangePageSetup(this,null,g),
+g.ignoreColor=!0,this.editor.graph.model.execute(g))});d=new BackgroundImageDialog(this,d,f);this.showDialog(d.container,400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,m,q){d=new LibraryDialog(this,d,f,g,m,q);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(y){y&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var f=k.apply(this,arguments);
this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){var d=this.createDiv("geSidebarContainer geSidebarFooter");d.style.position="absolute";d.style.overflow="hidden";var f=document.createElement("a");f.className="geTitle";f.style.color="#DF6C0C";f.style.fontWeight="bold";f.style.height="100%";f.style.paddingTop="9px";f.innerHTML="<span>+</span>";var g=
-f.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(l){l.preventDefault()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(l){this.actions.get("shapes").funct();mxEvent.consume(l)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,l,q,y,F){var C=null!=this.spinner&&null!=this.spinner.pause?
+f.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(m){m.preventDefault()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(m){this.actions.get("shapes").funct();mxEvent.consume(m)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,m,q,y,F){var C=null!=this.spinner&&null!=this.spinner.pause?
this.spinner.pause():function(){},H=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{F?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(Y){}if(null!=H||null!=f){F=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),aa=null;f=null!=f?f:mxResources.get("error");if(null!=H){null!=
H.retry&&(G=mxResources.get("cancel"),aa=function(){C();H.retry()});if(404==H.code||404==H.status||403==H.code){F=403==H.code?null!=H.message?mxUtils.htmlEntities(H.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=q?q:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var da=null!=q?null:null!=y?y:window.location.hash;if(null!=da&&("#G"==da.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==
da.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==H.code||404==H.status)){da="#U"==da.substring(0,2)?da.substring(45,da.lastIndexOf("%26ex")):da.substring(2);this.showError(f,F,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+da);this.handleError(d,f,g,
-l,q)}),aa,mxResources.get("changeUser"),mxUtils.bind(this,function(){function Y(){ea.innerHTML="";for(var ka=0;ka<qa.length;ka++){var ja=document.createElement("option");mxUtils.write(ja,qa[ka].displayName);ja.value=ka;ea.appendChild(ja);ja=document.createElement("option");ja.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(ja,"<"+qa[ka].email+">");ja.setAttribute("disabled","disabled");ea.appendChild(ja)}ja=document.createElement("option");mxUtils.write(ja,mxResources.get("addAccount"));ja.value=qa.length;
+m,q)}),aa,mxResources.get("changeUser"),mxUtils.bind(this,function(){function Y(){ea.innerHTML="";for(var ka=0;ka<qa.length;ka++){var ja=document.createElement("option");mxUtils.write(ja,qa[ka].displayName);ja.value=ka;ea.appendChild(ja);ja=document.createElement("option");ja.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(ja,"<"+qa[ka].email+">");ja.setAttribute("disabled","disabled");ea.appendChild(ja)}ja=document.createElement("option");mxUtils.write(ja,mxResources.get("addAccount"));ja.value=qa.length;
ea.appendChild(ja)}var qa=this.drive.getUsersList(),O=document.createElement("div"),X=document.createElement("span");X.style.marginTop="6px";mxUtils.write(X,mxResources.get("changeUser")+": ");O.appendChild(X);var ea=document.createElement("select");ea.style.width="200px";Y();mxEvent.addListener(ea,"change",mxUtils.bind(this,function(){var ka=ea.value,ja=qa.length!=ka;ja&&this.drive.setUser(qa[ka]);this.drive.authorize(ja,mxUtils.bind(this,function(){ja||(qa=this.drive.getUsersList(),Y())}),mxUtils.bind(this,
function(U){this.handleError(U)}),!0)}));O.appendChild(ea);O=new CustomDialog(this,O,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(O.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=H.message?F=""==H.message&&null!=H.name?mxUtils.htmlEntities(H.name):mxUtils.htmlEntities(H.message):null!=H.response&&null!=H.response.error?F=mxUtils.htmlEntities(H.response.error):
"undefined"!==typeof window.App&&(H.code==App.ERROR_TIMEOUT?F=mxUtils.htmlEntities(mxResources.get("timeout")):H.code==App.ERROR_BUSY?F=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof H&&0<H.length&&(F=mxUtils.htmlEntities(H)))}var ba=y=null;null!=H&&null!=H.helpLink?(y=mxResources.get("help"),ba=mxUtils.bind(this,function(){return this.editor.graph.openLink(H.helpLink)})):null!=H&&null!=H.ownerEmail&&(y=mxResources.get("contactOwner"),F+=mxUtils.htmlEntities(" ("+y+": "+H.ownerEmail+
-")"),ba=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(H.ownerEmail))}));this.showError(f,F,G,g,aa,null,null,y,ba,null,null,null,l?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(d,f,g){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,g||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,l,q,y){var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=Math.min(200,28*Math.ceil(d.length/
-50));d=new ConfirmDialog(this,d,function(){F();null!=f&&f()},function(){F();null!=g&&g()},l,q,null,null,null,null,C);this.showDialog(d.container,340,46+C,!0,y);d.init()};EditorUi.prototype.showBanner=function(d,f,g,l){var q=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var y=document.createElement("div");y.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+
+")"),ba=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(H.ownerEmail))}));this.showError(f,F,G,g,aa,null,null,y,ba,null,null,null,m?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(d,f,g){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,g||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,m,q,y){var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=Math.min(200,28*Math.ceil(d.length/
+50));d=new ConfirmDialog(this,d,function(){F();null!=f&&f()},function(){F();null!=g&&g()},m,q,null,null,null,null,C);this.showDialog(d.container,340,46+C,!0,y);d.init()};EditorUi.prototype.showBanner=function(d,f,g,m){var q=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var y=document.createElement("div");y.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+
mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(y.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(y.style,"transition","all 1s ease");y.className="geBtn gePrimaryBtn";q=document.createElement("img");q.setAttribute("src",IMAGE_PATH+"/logo.png");q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";y.appendChild(q);
-q=document.createElement("img");q.setAttribute("src",Dialog.prototype.closeImage);q.setAttribute("title",mxResources.get(l?"doNotShowAgain":"close"));q.setAttribute("border","0");q.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";y.appendChild(q);mxUtils.write(y,f);document.body.appendChild(y);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var F=document.createElement("input");
-F.setAttribute("type","checkbox");F.setAttribute("id","geDoNotShowAgainCheckbox");F.style.marginRight="6px";if(!l){f.appendChild(F);var C=document.createElement("label");C.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(C,mxResources.get("doNotShowAgain"));f.appendChild(C);y.style.paddingBottom="30px";y.appendChild(f)}var H=mxUtils.bind(this,function(){null!=y.parentNode&&(y.parentNode.removeChild(y),this.bannerShowing=!1,F.checked||l)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=
+q=document.createElement("img");q.setAttribute("src",Dialog.prototype.closeImage);q.setAttribute("title",mxResources.get(m?"doNotShowAgain":"close"));q.setAttribute("border","0");q.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";y.appendChild(q);mxUtils.write(y,f);document.body.appendChild(y);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var F=document.createElement("input");
+F.setAttribute("type","checkbox");F.setAttribute("id","geDoNotShowAgainCheckbox");F.style.marginRight="6px";if(!m){f.appendChild(F);var C=document.createElement("label");C.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(C,mxResources.get("doNotShowAgain"));f.appendChild(C);y.style.paddingBottom="30px";y.appendChild(f)}var H=mxUtils.bind(this,function(){null!=y.parentNode&&(y.parentNode.removeChild(y),this.bannerShowing=!1,F.checked||m)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=
mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(q,"click",mxUtils.bind(this,function(aa){mxEvent.consume(aa);H()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){H()}),1E3)});mxEvent.addListener(y,"click",mxUtils.bind(this,function(aa){var da=mxEvent.getSource(aa);da!=F&&da!=C?(null!=g&&g(),H(),mxEvent.consume(aa)):G()}));window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(G,3E4);q=!0}return q};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,l){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,
-"tEXt","mxfile",encodeURIComponent(f))),0<l&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",l));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,l,q){var y="jpeg"==g?"jpg":g;l=this.getBaseFilename(l)+(null!=f?".drawio":"")+"."+y;d=this.createImageDataUri(d,f,g,q);this.saveData(l,y,d.substring(d.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&
-"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,f){d=new TextareaDialog(this,d,f,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,f,g,l,q,y){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||
-/(\.html)$/i.test(f)||(f=f+"."+(null!=y?y:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=l?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d),g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,
-g,l);else{var F=document.createElement("a");y=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof F.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var C=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);y=65==(C?parseInt(C[2],10):!1)?!1:y}if(y||this.isOffline()){F.href=URL.createObjectURL(l?this.base64ToBlob(d,g):new Blob([d],{type:g}));y?F.download=f:F.setAttribute("target","_blank");document.body.appendChild(F);try{window.setTimeout(function(){URL.revokeObjectURL(F.href)},
-2E4),F.click(),F.parentNode.removeChild(F)}catch(H){}}else this.createEchoRequest(d,f,g,l,q).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,l,q,y){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=g?"&mime="+g:"")+(null!=q?"&format="+q:"")+(null!=y?"&base64="+y:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(l?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,l=Math.ceil(g/1024),q=Array(l),
-y=0;y<l;++y){for(var F=1024*y,C=Math.min(F+1024,g),H=Array(C-F),G=0;F<C;++G,++F)H[G]=d[F].charCodeAt(0);q[y]=new Uint8Array(H)}return new Blob(q,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,l,q,y,F,C){y=null!=y?y:!1;F=null!=F?F:"vsdx"!=q&&(!mxClient.IS_IOS||!navigator.standalone);q=this.getServiceCount(y);isLocalStorage&&q++;var H=4>=q?2:6<q?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,aa){try{if("_blank"==aa)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,
-g,l);else if(null!=g&&"text/html"==g.substring(0,9)){var da=new EmbedDialog(this,d);this.showDialog(da.container,450,240,!0,!0);da.init()}else{var ba=window.open("about:blank");null==ba?mxUtils.popup(d,!0):(ba.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),ba.document.close())}else aa==App.MODE_DEVICE||"download"==aa?this.doSaveLocalFile(d,G,g,l,null,C):null!=G&&0<G.length&&this.pickFolder(aa,mxUtils.bind(this,function(Y){try{this.exportFile(d,G,g,l,aa,Y)}catch(qa){this.handleError(qa)}}))}catch(Y){this.handleError(Y)}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,y,F,null,1<q,H,d,g,l);y=this.isServices(q)?q>H?390:280:160;this.showDialog(f.container,420,y,!0,!0);f.init()};EditorUi.prototype.openInNewWindow=function(d,f,g){var l=window.open("about:blank");null==l||null==l.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"==f?l.document.write("<html>"+d+"</html>"):(d=g?d:btoa(unescape(encodeURIComponent(d))),l.document.write('<html><img style="max-width:100%;" src="data:'+
-f+";base64,"+d+'"/></html>')):l.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),l.document.close())};var n=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;
-var f=d(mxUtils.bind(this,function(l){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding=
+function(){mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(G,3E4);q=!0}return q};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,m){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,
+"tEXt","mxfile",encodeURIComponent(f))),0<m&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",m));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,m,q){var y="jpeg"==g?"jpg":g;m=this.getBaseFilename(m)+(null!=f?".drawio":"")+"."+y;d=this.createImageDataUri(d,f,g,q);this.saveData(m,y,d.substring(d.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&
+"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,f){d=new TextareaDialog(this,d,f,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,f,g,m,q,y){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||
+/(\.html)$/i.test(f)||(f=f+"."+(null!=y?y:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=m?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d),g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,
+g,m);else{var F=document.createElement("a");y=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof F.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var C=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);y=65==(C?parseInt(C[2],10):!1)?!1:y}if(y||this.isOffline()){F.href=URL.createObjectURL(m?this.base64ToBlob(d,g):new Blob([d],{type:g}));y?F.download=f:F.setAttribute("target","_blank");document.body.appendChild(F);try{window.setTimeout(function(){URL.revokeObjectURL(F.href)},
+2E4),F.click(),F.parentNode.removeChild(F)}catch(H){}}else this.createEchoRequest(d,f,g,m,q).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,m,q,y){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=g?"&mime="+g:"")+(null!=q?"&format="+q:"")+(null!=y?"&base64="+y:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(m?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,m=Math.ceil(g/1024),q=Array(m),
+y=0;y<m;++y){for(var F=1024*y,C=Math.min(F+1024,g),H=Array(C-F),G=0;F<C;++G,++F)H[G]=d[F].charCodeAt(0);q[y]=new Uint8Array(H)}return new Blob(q,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,m,q,y,F,C){y=null!=y?y:!1;F=null!=F?F:"vsdx"!=q&&(!mxClient.IS_IOS||!navigator.standalone);q=this.getServiceCount(y);isLocalStorage&&q++;var H=4>=q?2:6<q?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,aa){try{if("_blank"==aa)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,
+g,m);else if(null!=g&&"text/html"==g.substring(0,9)){var da=new EmbedDialog(this,d);this.showDialog(da.container,450,240,!0,!0);da.init()}else{var ba=window.open("about:blank");null==ba?mxUtils.popup(d,!0):(ba.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),ba.document.close())}else aa==App.MODE_DEVICE||"download"==aa?this.doSaveLocalFile(d,G,g,m,null,C):null!=G&&0<G.length&&this.pickFolder(aa,mxUtils.bind(this,function(Y){try{this.exportFile(d,G,g,m,aa,Y)}catch(qa){this.handleError(qa)}}))}catch(Y){this.handleError(Y)}}),
+mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,y,F,null,1<q,H,d,g,m);y=this.isServices(q)?q>H?390:280:160;this.showDialog(f.container,420,y,!0,!0);f.init()};EditorUi.prototype.openInNewWindow=function(d,f,g){var m=window.open("about:blank");null==m||null==m.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"==f?m.document.write("<html>"+d+"</html>"):(d=g?d:btoa(unescape(encodeURIComponent(d))),m.document.write('<html><img style="max-width:100%;" src="data:'+
+f+";base64,"+d+'"/></html>')):m.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),m.document.close())};var n=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;
+var f=d(mxUtils.bind(this,function(m){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding=
"4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,
80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var q=f.getBoundingClientRect();this.tagsDialog.style.left=q.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+
-4+"px";q=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=q.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(l)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var l=this.editor.graph.getAllTags();f.style.display=0<l.length?"":"none"}))}n.apply(this,arguments);this.editor.addListener("tagsDialogShown",
+4+"px";q=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=q.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(m)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var m=this.editor.graph.getAllTags();f.style.display=0<m.length?"":"none"}))}n.apply(this,arguments);this.editor.addListener("tagsDialogShown",
mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&
(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=d(mxUtils.bind(this,
-function(l){var q=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",q);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)q.apply(this);else{this.exportDialog=document.createElement("div");var y=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";
+function(m){var q=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",q);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)q.apply(this);else{this.exportDialog=document.createElement("div");var y=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";
this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;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=y.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";y=mxUtils.getCurrentStyle(this.editor.graph.container);
this.exportDialog.style.zIndex=y.zIndex;var F=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});F.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(C){F.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var H=this.createImageDataUri(C,null,"png");C=document.createElement("img");C.style.maxWidth="140px";C.style.maxHeight=
"140px";C.style.cursor="pointer";C.style.backgroundColor="white";C.setAttribute("title",mxResources.get("openInNewWindow"));C.setAttribute("border","0");C.setAttribute("src",H);this.exportDialog.appendChild(C);mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.openInNewWindow(H.substring(H.indexOf(",")+1),"image/png",!0);q.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),null,null,null,null,null,null,null,
-Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",q);document.body.appendChild(this.exportDialog)}mxEvent.consume(l)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,l,q){this.isLocalFileSave()?this.saveLocalFile(g,d,l,q,f):this.saveRequest(d,f,mxUtils.bind(this,function(y,F){return this.createEchoRequest(g,y,l,q,f,F)}),g,q,l)};EditorUi.prototype.saveRequest=function(d,f,g,l,q,y,F){F=null!=F?F:!mxClient.IS_IOS||!navigator.standalone;
-var C=this.getServiceCount(!1);isLocalStorage&&C++;var H=4>=C?2:6<C?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,aa){if("_blank"==aa||null!=G&&0<G.length){var da=g("_blank"==aa?null:G,aa==App.MODE_DEVICE||"download"==aa||null==aa||"_blank"==aa?"0":"1");null!=da&&(aa==App.MODE_DEVICE||"download"==aa||"_blank"==aa?da.simulate(document,"_blank"):this.pickFolder(aa,mxUtils.bind(this,function(ba){y=null!=y?y:"pdf"==f?"application/pdf":"image/"+f;if(null!=l)try{this.exportFile(l,G,y,!0,aa,
+Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",q);document.body.appendChild(this.exportDialog)}mxEvent.consume(m)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,m,q){this.isLocalFileSave()?this.saveLocalFile(g,d,m,q,f):this.saveRequest(d,f,mxUtils.bind(this,function(y,F){return this.createEchoRequest(g,y,m,q,f,F)}),g,q,m)};EditorUi.prototype.saveRequest=function(d,f,g,m,q,y,F){F=null!=F?F:!mxClient.IS_IOS||!navigator.standalone;
+var C=this.getServiceCount(!1);isLocalStorage&&C++;var H=4>=C?2:6<C?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,aa){if("_blank"==aa||null!=G&&0<G.length){var da=g("_blank"==aa?null:G,aa==App.MODE_DEVICE||"download"==aa||null==aa||"_blank"==aa?"0":"1");null!=da&&(aa==App.MODE_DEVICE||"download"==aa||"_blank"==aa?da.simulate(document,"_blank"):this.pickFolder(aa,mxUtils.bind(this,function(ba){y=null!=y?y:"pdf"==f?"application/pdf":"image/"+f;if(null!=m)try{this.exportFile(m,G,y,!0,aa,
ba)}catch(Y){this.handleError(Y)}else this.spinner.spin(document.body,mxResources.get("saving"))&&da.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=da.getStatus()&&299>=da.getStatus())try{this.exportFile(da.getText(),G,y,!0,aa,ba)}catch(Y){this.handleError(Y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(Y){this.spinner.stop();this.handleError(Y)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),
-!1,!1,F,null,1<C,H,l,y,q);C=this.isServices(C)?4<C?390:280:160;this.showDialog(d.container,420,C,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,l,q,y){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,l,q,y,F,C,H,G,aa,da,ba,Y){if(this.spinner.spin(document.body,mxResources.get("export")))try{var qa=this.editor.graph.isSelectionEmpty();
-g=null!=g?g:qa;var O=f?null:this.editor.graph.background;O==mxConstants.NONE&&(O=null);null==O&&0==f&&(O=aa?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var X=this.editor.graph.getSvg(O,d,F,C,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!ba,aa,da);l&&this.editor.graph.addSvgShadow(X);var ea=this.getBaseFilename()+(q?".drawio":"")+".svg";Y=null!=Y?Y:mxUtils.bind(this,function(U){this.isLocalFileSave()||U.length<=MAX_REQUEST_SIZE?this.saveData(ea,"svg",U,"image/svg+xml"):
+!1,!1,F,null,1<C,H,m,y,q);C=this.isServices(C)?4<C?390:280:160;this.showDialog(d.container,420,C,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,m,q,y){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,m,q,y,F,C,H,G,aa,da,ba,Y){if(this.spinner.spin(document.body,mxResources.get("export")))try{var qa=this.editor.graph.isSelectionEmpty();
+g=null!=g?g:qa;var O=f?null:this.editor.graph.background;O==mxConstants.NONE&&(O=null);null==O&&0==f&&(O=aa?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var X=this.editor.graph.getSvg(O,d,F,C,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!ba,aa,da);m&&this.editor.graph.addSvgShadow(X);var ea=this.getBaseFilename()+(q?".drawio":"")+".svg";Y=null!=Y?Y:mxUtils.bind(this,function(U){this.isLocalFileSave()||U.length<=MAX_REQUEST_SIZE?this.saveData(ea,"svg",U,"image/svg+xml"):
this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(U)}))});var ka=mxUtils.bind(this,function(U){this.spinner.stop();q&&U.setAttribute("content",this.getFileData(!0,null,null,null,g,H,null,null,null,!1));Y(Graph.xmlDeclaration+"\n"+(q?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(U))});this.editor.graph.mathEnabled&&this.editor.addMathCss(X);var ja=mxUtils.bind(this,function(U){y?(null==this.thumbImageCache&&
-(this.thumbImageCache={}),this.editor.convertImages(U,ka,this.thumbImageCache)):ka(U)});ba?this.embedFonts(X,ja):(this.editor.addFontCss(X),ja(X))}catch(U){this.handleError(U)}};EditorUi.prototype.addRadiobox=function(d,f,g,l,q,y,F){return this.addCheckbox(d,g,l,q,y,F,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,l,q,y,F,C){y=null!=y?y:!0;var H=document.createElement("input");H.style.marginRight="8px";H.style.marginTop="16px";H.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();
-H.id=F;null!=C&&H.setAttribute("name",C);g&&(H.setAttribute("checked","checked"),H.defaultChecked=!0);l&&H.setAttribute("disabled","disabled");y&&(d.appendChild(H),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",F),d.appendChild(g),q||mxUtils.br(d));return H};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var l=this.getCurrentFile(),q="";null!=l&&l.getMode()!=App.MODE_DEVICE&&l.getMode()!=
-App.MODE_BROWSER&&(q=window.location.href);var y=document.createElement("select");y.style.maxWidth="200px";y.style.width="auto";y.style.marginLeft="8px";y.style.marginRight="10px";y.className="geBtn";l=document.createElement("option");l.setAttribute("value","blank");mxUtils.write(l,mxResources.get("makeCopy"));y.appendChild(l);l=document.createElement("option");l.setAttribute("value","custom");mxUtils.write(l,mxResources.get("custom")+"...");y.appendChild(l);d.appendChild(y);mxEvent.addListener(y,
+(this.thumbImageCache={}),this.editor.convertImages(U,ka,this.thumbImageCache)):ka(U)});ba?this.embedFonts(X,ja):(this.editor.addFontCss(X),ja(X))}catch(U){this.handleError(U)}};EditorUi.prototype.addRadiobox=function(d,f,g,m,q,y,F){return this.addCheckbox(d,g,m,q,y,F,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,m,q,y,F,C){y=null!=y?y:!0;var H=document.createElement("input");H.style.marginRight="8px";H.style.marginTop="16px";H.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();
+H.id=F;null!=C&&H.setAttribute("name",C);g&&(H.setAttribute("checked","checked"),H.defaultChecked=!0);m&&H.setAttribute("disabled","disabled");y&&(d.appendChild(H),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",F),d.appendChild(g),q||mxUtils.br(d));return H};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var m=this.getCurrentFile(),q="";null!=m&&m.getMode()!=App.MODE_DEVICE&&m.getMode()!=
+App.MODE_BROWSER&&(q=window.location.href);var y=document.createElement("select");y.style.maxWidth="200px";y.style.width="auto";y.style.marginLeft="8px";y.style.marginRight="10px";y.className="geBtn";m=document.createElement("option");m.setAttribute("value","blank");mxUtils.write(m,mxResources.get("makeCopy"));y.appendChild(m);m=document.createElement("option");m.setAttribute("value","custom");mxUtils.write(m,mxResources.get("custom")+"...");y.appendChild(m);d.appendChild(y);mxEvent.addListener(y,
"change",mxUtils.bind(this,function(){if("custom"==y.value){var F=new FilenameDialog(this,q,mxResources.get("ok"),function(C){null!=C?q=C:y.value="blank"},mxResources.get("url"),null,null,null,null,function(){y.value="blank"});this.showDialog(F.container,300,80,!0,!1);F.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?
"blank"===y.value?"_blank":q:null},getEditInput:function(){return g},getEditSelect:function(){return y}}};EditorUi.prototype.addLinkSection=function(d,f){function g(){var C=document.createElement("div");C.style.width="100%";C.style.height="100%";C.style.boxSizing="border-box";null!=y&&y!=mxConstants.NONE?(C.style.border="1px solid black",C.style.backgroundColor=y):(C.style.backgroundPosition="center center",C.style.backgroundRepeat="no-repeat",C.style.backgroundImage="url('"+Dialog.prototype.closeImage+
-"')");F.innerHTML="";F.appendChild(C)}mxUtils.write(d,mxResources.get("links")+":");var l=document.createElement("select");l.style.width="100px";l.style.padding="0px";l.style.marginLeft="8px";l.style.marginRight="10px";l.className="geBtn";var q=document.createElement("option");q.setAttribute("value","auto");mxUtils.write(q,mxResources.get("automatic"));l.appendChild(q);q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("openInNewWindow"));l.appendChild(q);
-q=document.createElement("option");q.setAttribute("value","self");mxUtils.write(q,mxResources.get("openInThisWindow"));l.appendChild(q);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),l.appendChild(f));d.appendChild(l);mxUtils.write(d,mxResources.get("borderColor")+":");var y="#0000ff",F=null;F=mxUtils.button("",mxUtils.bind(this,function(C){this.pickColor(y||"none",function(H){y=H;g()});
-mxEvent.consume(C)}));g();F.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";F.style.marginLeft="4px";F.style.height="22px";F.style.width="22px";F.style.position="relative";F.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";F.className="geColorBtn";d.appendChild(F);mxUtils.br(d);return{getColor:function(){return y},getTarget:function(){return l.value},focus:function(){l.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,l,q,y,F){F=null!=F?F:[];l&&("https://viewer.diagrams.net"==
-EditorUi.lightboxHost&&"1"!=urlParams.dev||F.push("lightbox=1"),"auto"!=d&&F.push("target="+d),null!=f&&f!=mxConstants.NONE&&F.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=q&&0<q.length&&F.push("edit="+encodeURIComponent(q)),y&&F.push("layers=1"),this.editor.graph.foldingEnabled&&F.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&F.push("page-id="+this.currentPage.getId());return F};EditorUi.prototype.createLink=function(d,f,g,l,q,y,F,C,
-H,G){H=this.createUrlParameters(d,f,g,l,q,y,H);d=this.getCurrentFile();f=!0;null!=F?g="#U"+encodeURIComponent(F):(d=this.getCurrentFile(),C||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&H.push("title="+encodeURIComponent(d.getTitle()));G&&1<g.length&&(H.push("open="+
-g.substring(1)),g="");return(l&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<H.length?"?"+H.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,l,q,y,F,C,H,G,aa,da){this.getBasenames();var ba={};""!=q&&q!=mxConstants.NONE&&(ba.highlight=q);"auto"!==l&&(ba.target=l);G||(ba.lightbox=!1);ba.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||
+"')");F.innerHTML="";F.appendChild(C)}mxUtils.write(d,mxResources.get("links")+":");var m=document.createElement("select");m.style.width="100px";m.style.padding="0px";m.style.marginLeft="8px";m.style.marginRight="10px";m.className="geBtn";var q=document.createElement("option");q.setAttribute("value","auto");mxUtils.write(q,mxResources.get("automatic"));m.appendChild(q);q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("openInNewWindow"));m.appendChild(q);
+q=document.createElement("option");q.setAttribute("value","self");mxUtils.write(q,mxResources.get("openInThisWindow"));m.appendChild(q);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),m.appendChild(f));d.appendChild(m);mxUtils.write(d,mxResources.get("borderColor")+":");var y="#0000ff",F=null;F=mxUtils.button("",mxUtils.bind(this,function(C){this.pickColor(y||"none",function(H){y=H;g()});
+mxEvent.consume(C)}));g();F.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";F.style.marginLeft="4px";F.style.height="22px";F.style.width="22px";F.style.position="relative";F.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";F.className="geColorBtn";d.appendChild(F);mxUtils.br(d);return{getColor:function(){return y},getTarget:function(){return m.value},focus:function(){m.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,m,q,y,F){F=null!=F?F:[];m&&("https://viewer.diagrams.net"==
+EditorUi.lightboxHost&&"1"!=urlParams.dev||F.push("lightbox=1"),"auto"!=d&&F.push("target="+d),null!=f&&f!=mxConstants.NONE&&F.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=q&&0<q.length&&F.push("edit="+encodeURIComponent(q)),y&&F.push("layers=1"),this.editor.graph.foldingEnabled&&F.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&F.push("page-id="+this.currentPage.getId());return F};EditorUi.prototype.createLink=function(d,f,g,m,q,y,F,C,
+H,G){H=this.createUrlParameters(d,f,g,m,q,y,H);d=this.getCurrentFile();f=!0;null!=F?g="#U"+encodeURIComponent(F):(d=this.getCurrentFile(),C||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&H.push("title="+encodeURIComponent(d.getTitle()));G&&1<g.length&&(H.push("open="+
+g.substring(1)),g="");return(m&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<H.length?"?"+H.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,m,q,y,F,C,H,G,aa,da){this.getBasenames();var ba={};""!=q&&q!=mxConstants.NONE&&(ba.highlight=q);"auto"!==m&&(ba.target=m);G||(ba.lightbox=!1);ba.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||
100==g||(ba.zoom=g/100);g=[];F&&(g.push("pages"),ba.resize=!0,null!=this.pages&&null!=this.currentPage&&(ba.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(g.push("zoom"),ba.resize=!0);C&&g.push("layers");H&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),ba.toolbar=g.join(" "));null!=aa&&0<aa.length&&(ba.edit=aa);null!=d?ba.url=d:ba.xml=this.getFileData(!0,null,null,null,null,!F);f='<div class="mxgraph" style="'+(y?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+
-mxUtils.htmlEntities(JSON.stringify(ba))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";da(f,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,l){var q=document.createElement("div");
+mxUtils.htmlEntities(JSON.stringify(ba))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";da(f,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,m){var q=document.createElement("div");
q.style.whiteSpace="nowrap";var y=document.createElement("h3");mxUtils.write(y,mxResources.get("html"));y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";q.appendChild(y);var F=document.createElement("div");F.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var C=document.createElement("input");C.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";C.setAttribute("value","url");C.setAttribute("type","radio");C.setAttribute("name",
"type-embedhtmldialog");y=C.cloneNode(!0);y.setAttribute("value","copy");F.appendChild(y);var H=document.createElement("span");mxUtils.write(H,mxResources.get("includeCopyOfMyDiagram"));F.appendChild(H);mxUtils.br(F);F.appendChild(C);H=document.createElement("span");mxUtils.write(H,mxResources.get("publicDiagramUrl"));F.appendChild(H);var G=this.getCurrentFile();null==g&&null!=G&&G.constructor==window.DriveFile&&(H=document.createElement("a"),H.style.paddingLeft="12px",H.style.color="gray",H.style.cursor=
"pointer",mxUtils.write(H,mxResources.get("share")),F.appendChild(H),mxEvent.addListener(H,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(G.getId())})));y.setAttribute("checked","checked");null==g&&C.setAttribute("disabled","disabled");q.appendChild(F);var aa=this.addLinkSection(q),da=this.addCheckbox(q,mxResources.get("zoom"),!0,null,!0);mxUtils.write(q,":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width=
"60px";ba.style.marginLeft="4px";ba.style.marginRight="12px";ba.value="100%";q.appendChild(ba);var Y=this.addCheckbox(q,mxResources.get("fit"),!0);F=null!=this.pages&&1<this.pages.length;var qa=qa=this.addCheckbox(q,mxResources.get("allPages"),F,!F),O=this.addCheckbox(q,mxResources.get("layers"),!0),X=this.addCheckbox(q,mxResources.get("tags"),!0),ea=this.addCheckbox(q,mxResources.get("lightbox"),!0),ka=null;F=380;if(EditorUi.enableHtmlEditOption){ka=this.addEditButton(q,ea);var ja=ka.getEditInput();
-ja.style.marginBottom="16px";F+=50;mxEvent.addListener(ea,"change",function(){ea.checked?ja.removeAttribute("disabled"):ja.setAttribute("disabled","disabled");ja.checked&&ea.checked?ka.getEditSelect().removeAttribute("disabled"):ka.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,q,mxUtils.bind(this,function(){l(C.checked?g:null,da.checked,ba.value,aa.getTarget(),aa.getColor(),Y.checked,qa.checked,O.checked,X.checked,ea.checked,null!=ka?ka.getLink():null)}),null,d,f);
-this.showDialog(d.container,340,F,!0,!0);y.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,g,l,q,y,F,C){var H=document.createElement("div");H.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";H.appendChild(G);var aa=this.getCurrentFile();d=0;if(null==aa||aa.constructor!=window.DriveFile||f)F=null!=F?F:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";
+ja.style.marginBottom="16px";F+=50;mxEvent.addListener(ea,"change",function(){ea.checked?ja.removeAttribute("disabled"):ja.setAttribute("disabled","disabled");ja.checked&&ea.checked?ka.getEditSelect().removeAttribute("disabled"):ka.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,q,mxUtils.bind(this,function(){m(C.checked?g:null,da.checked,ba.value,aa.getTarget(),aa.getColor(),Y.checked,qa.checked,O.checked,X.checked,ea.checked,null!=ka?ka.getLink():null)}),null,d,f);
+this.showDialog(d.container,340,F,!0,!0);y.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,g,m,q,y,F,C){var H=document.createElement("div");H.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";H.appendChild(G);var aa=this.getCurrentFile();d=0;if(null==aa||aa.constructor!=window.DriveFile||f)F=null!=F?F:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";
else{d=80;F=null!=F?F:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var da=document.createElement("div");da.style.whiteSpace="normal";mxUtils.write(da,mxResources.get("linkAccountRequired"));G.appendChild(da);da=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(aa.getId())}));
da.style.marginTop="12px";da.className="geBtn";G.appendChild(da);H.appendChild(G);da=document.createElement("a");da.style.paddingLeft="12px";da.style.color="gray";da.style.fontSize="11px";da.style.cursor="pointer";mxUtils.write(da,mxResources.get("check"));G.appendChild(da);mxEvent.addListener(da,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(I){this.spinner.stop();I=new ErrorDialog(this,
-null,mxResources.get(null!=I?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(I.container,300,80,!0,!1);I.init()}))}))}var ba=null,Y=null;if(null!=g||null!=l)d+=30,mxUtils.write(H,mxResources.get("width")+":"),ba=document.createElement("input"),ba.setAttribute("type","text"),ba.style.marginRight="16px",ba.style.width="50px",ba.style.marginLeft="6px",ba.style.marginRight="16px",ba.style.marginBottom="10px",ba.value="100%",H.appendChild(ba),mxUtils.write(H,mxResources.get("height")+
-":"),Y=document.createElement("input"),Y.setAttribute("type","text"),Y.style.width="50px",Y.style.marginLeft="6px",Y.style.marginBottom="10px",Y.value=l+"px",H.appendChild(Y),mxUtils.br(H);var qa=this.addLinkSection(H,y);g=null!=this.pages&&1<this.pages.length;var O=null;if(null==aa||aa.constructor!=window.DriveFile||f)O=this.addCheckbox(H,mxResources.get("allPages"),g,!g);var X=this.addCheckbox(H,mxResources.get("lightbox"),!0,null,null,!y),ea=this.addEditButton(H,X),ka=ea.getEditInput();y&&(ka.style.marginLeft=
+null,mxResources.get(null!=I?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(I.container,300,80,!0,!1);I.init()}))}))}var ba=null,Y=null;if(null!=g||null!=m)d+=30,mxUtils.write(H,mxResources.get("width")+":"),ba=document.createElement("input"),ba.setAttribute("type","text"),ba.style.marginRight="16px",ba.style.width="50px",ba.style.marginLeft="6px",ba.style.marginRight="16px",ba.style.marginBottom="10px",ba.value="100%",H.appendChild(ba),mxUtils.write(H,mxResources.get("height")+
+":"),Y=document.createElement("input"),Y.setAttribute("type","text"),Y.style.width="50px",Y.style.marginLeft="6px",Y.style.marginBottom="10px",Y.value=m+"px",H.appendChild(Y),mxUtils.br(H);var qa=this.addLinkSection(H,y);g=null!=this.pages&&1<this.pages.length;var O=null;if(null==aa||aa.constructor!=window.DriveFile||f)O=this.addCheckbox(H,mxResources.get("allPages"),g,!g);var X=this.addCheckbox(H,mxResources.get("lightbox"),!0,null,null,!y),ea=this.addEditButton(H,X),ka=ea.getEditInput();y&&(ka.style.marginLeft=
X.style.marginLeft,X.style.display="none",d-=20);var ja=this.addCheckbox(H,mxResources.get("layers"),!0);ja.style.marginLeft=ka.style.marginLeft;ja.style.marginTop="8px";var U=this.addCheckbox(H,mxResources.get("tags"),!0);U.style.marginLeft=ka.style.marginLeft;U.style.marginBottom="16px";U.style.marginTop="16px";mxEvent.addListener(X,"change",function(){X.checked?(ja.removeAttribute("disabled"),ka.removeAttribute("disabled")):(ja.setAttribute("disabled","disabled"),ka.setAttribute("disabled","disabled"));
ka.checked&&X.checked?ea.getEditSelect().removeAttribute("disabled"):ea.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,H,mxUtils.bind(this,function(){q(qa.getTarget(),qa.getColor(),null==O?!0:O.checked,X.checked,ea.getLink(),ja.checked,null!=ba?ba.value:null,null!=Y?Y.value:null,U.checked)}),null,mxResources.get("create"),F,C);this.showDialog(f.container,340,300+d,!0,!0);null!=ba?(ba.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",
-!1,null)):qa.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,l,q){var y=document.createElement("div");y.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:"+(q?"10":"4")+"px";y.appendChild(F);if(q){mxUtils.write(y,mxResources.get("zoom")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";
-C.style.marginLeft="4px";C.style.marginRight="12px";C.value=this.lastExportZoom||"100%";y.appendChild(C);mxUtils.write(y,mxResources.get("borderWidth")+":");var H=document.createElement("input");H.setAttribute("type","text");H.style.marginRight="16px";H.style.width="60px";H.style.marginLeft="4px";H.value=this.lastExportBorder||"0";y.appendChild(H);mxUtils.br(y)}var G=this.addCheckbox(y,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),aa=l?null:this.addCheckbox(y,mxResources.get("includeCopyOfMyDiagram"),
-Editor.defaultIncludeDiagram);F=this.editor.graph;var da=l?null:this.addCheckbox(y,mxResources.get("transparentBackground"),F.background==mxConstants.NONE||null==F.background);null!=da&&(da.style.marginBottom="16px");d=new CustomDialog(this,y,mxUtils.bind(this,function(){var ba=parseInt(C.value)/100||1,Y=parseInt(H.value)||0;g(!G.checked,null!=aa?aa.checked:!1,null!=da?da.checked:!1,ba,Y)}),null,d,f);this.showDialog(d.container,300,(q?25:0)+(l?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
-function(d,f,g,l,q,y,F,C,H){F=null!=F?F:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var aa=this.editor.graph,da="jpeg"==C?220:300,ba=document.createElement("h3");mxUtils.write(ba,d);ba.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(ba);mxUtils.write(G,mxResources.get("zoom")+":");var Y=document.createElement("input");Y.setAttribute("type","text");Y.style.marginRight="16px";Y.style.width="60px";Y.style.marginLeft=
+!1,null)):qa.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,m,q){var y=document.createElement("div");y.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:"+(q?"10":"4")+"px";y.appendChild(F);if(q){mxUtils.write(y,mxResources.get("zoom")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";
+C.style.marginLeft="4px";C.style.marginRight="12px";C.value=this.lastExportZoom||"100%";y.appendChild(C);mxUtils.write(y,mxResources.get("borderWidth")+":");var H=document.createElement("input");H.setAttribute("type","text");H.style.marginRight="16px";H.style.width="60px";H.style.marginLeft="4px";H.value=this.lastExportBorder||"0";y.appendChild(H);mxUtils.br(y)}var G=this.addCheckbox(y,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),aa=m?null:this.addCheckbox(y,mxResources.get("includeCopyOfMyDiagram"),
+Editor.defaultIncludeDiagram);F=this.editor.graph;var da=m?null:this.addCheckbox(y,mxResources.get("transparentBackground"),F.background==mxConstants.NONE||null==F.background);null!=da&&(da.style.marginBottom="16px");d=new CustomDialog(this,y,mxUtils.bind(this,function(){var ba=parseInt(C.value)/100||1,Y=parseInt(H.value)||0;g(!G.checked,null!=aa?aa.checked:!1,null!=da?da.checked:!1,ba,Y)}),null,d,f);this.showDialog(d.container,300,(q?25:0)+(m?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
+function(d,f,g,m,q,y,F,C,H){F=null!=F?F:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var aa=this.editor.graph,da="jpeg"==C?220:300,ba=document.createElement("h3");mxUtils.write(ba,d);ba.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(ba);mxUtils.write(G,mxResources.get("zoom")+":");var Y=document.createElement("input");Y.setAttribute("type","text");Y.style.marginRight="16px";Y.style.width="60px";Y.style.marginLeft=
"4px";Y.style.marginRight="12px";Y.value=this.lastExportZoom||"100%";G.appendChild(Y);mxUtils.write(G,mxResources.get("borderWidth")+":");var qa=document.createElement("input");qa.setAttribute("type","text");qa.style.marginRight="16px";qa.style.width="60px";qa.style.marginLeft="4px";qa.value=this.lastExportBorder||"0";G.appendChild(qa);mxUtils.br(G);var O=this.addCheckbox(G,mxResources.get("selectionOnly"),!1,aa.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");var ea=document.createElement("select");ea.style.marginTop="16px";ea.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var ka={};for(ba=0;ba<d.length;ba++)if(!aa.isSelectionEmpty()||"selectionOnly"!=d[ba]){var ja=document.createElement("option");mxUtils.write(ja,mxResources.get(d[ba]));ja.setAttribute("value",d[ba]);ea.appendChild(ja);ka[d[ba]]=ja}H?(mxUtils.write(G,mxResources.get("size")+
":"),G.appendChild(ea),mxUtils.br(G),da+=26,mxEvent.addListener(ea,"change",function(){"selectionOnly"==ea.value&&(O.checked=!0)})):y&&(G.appendChild(X),mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),da+=30,mxEvent.addListener(O,"change",function(){O.checked?X.removeAttribute("disabled"):X.setAttribute("disabled","disabled")}));aa.isSelectionEmpty()?H&&(O.style.display="none",O.nextSibling.style.display="none",O.nextSibling.nextSibling.style.display="none",da-=30):(ea.value="diagram",X.setAttribute("checked",
@@ -3528,81 +3532,81 @@ y.setAttribute("value","none");mxUtils.write(y,mxResources.get("noChange"));la.a
fa.setAttribute("disabled","disabled"),ka.page.style.display="none","page"==ea.value&&(ea.value="diagram"),V.checked=!1,V.setAttribute("disabled","disabled"),u.style.display="inline-block",ra.style.display="none"):"disabled"==fa.getAttribute("disabled")&&(fa.checked=!1,fa.removeAttribute("disabled"),V.removeAttribute("disabled"),ka.page.style.display="",u.style.display="none",ra.style.display="")}));f&&(G.appendChild(fa),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,
mxResources.get("txtSettings")+":"),G.appendChild(la),mxUtils.br(G),da+=60);var ra=document.createElement("select");ra.style.maxWidth="260px";ra.style.marginLeft="8px";ra.style.marginRight="10px";ra.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));ra.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));ra.appendChild(f);f=document.createElement("option");
f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));ra.appendChild(f);var u=document.createElement("div");mxUtils.write(u,mxResources.get("LinksLost"));u.style.margin="7px";u.style.display="none";"svg"==C&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(ra),G.appendChild(u),mxUtils.br(G),mxUtils.br(G),da+=50);g=new CustomDialog(this,G,mxUtils.bind(this,function(){this.lastExportBorder=qa.value;this.lastExportZoom=Y.value;q(Y.value,U.checked,!O.checked,
-V.checked,R.checked,fa.checked,qa.value,X.checked,!1,ra.value,null!=Q?Q.checked:null,null!=I?I.checked:null,ea.value,"embedFonts"==la.value,"lblToSvg"==la.value)}),null,g,l);this.showDialog(g.container,340,da,!0,!0,null,null,null,null,!0);Y.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,l,q){var y=document.createElement("div");y.style.whiteSpace="nowrap";var F=this.editor.graph;
-if(null!=f){var C=document.createElement("h3");mxUtils.write(C,f);C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";y.appendChild(C)}var H=this.addCheckbox(y,mxResources.get("fit"),!0),G=this.addCheckbox(y,mxResources.get("shadow"),F.shadowVisible&&l,!l),aa=this.addCheckbox(y,g),da=this.addCheckbox(y,mxResources.get("lightbox"),!0),ba=this.addEditButton(y,da),Y=ba.getEditInput(),qa=1<F.model.getChildCount(F.model.getRoot()),O=this.addCheckbox(y,mxResources.get("layers"),
+V.checked,R.checked,fa.checked,qa.value,X.checked,!1,ra.value,null!=Q?Q.checked:null,null!=I?I.checked:null,ea.value,"embedFonts"==la.value,"lblToSvg"==la.value)}),null,g,m);this.showDialog(g.container,340,da,!0,!0,null,null,null,null,!0);Y.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,m,q){var y=document.createElement("div");y.style.whiteSpace="nowrap";var F=this.editor.graph;
+if(null!=f){var C=document.createElement("h3");mxUtils.write(C,f);C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";y.appendChild(C)}var H=this.addCheckbox(y,mxResources.get("fit"),!0),G=this.addCheckbox(y,mxResources.get("shadow"),F.shadowVisible&&m,!m),aa=this.addCheckbox(y,g),da=this.addCheckbox(y,mxResources.get("lightbox"),!0),ba=this.addEditButton(y,da),Y=ba.getEditInput(),qa=1<F.model.getChildCount(F.model.getRoot()),O=this.addCheckbox(y,mxResources.get("layers"),
qa,!qa);O.style.marginLeft=Y.style.marginLeft;O.style.marginBottom="12px";O.style.marginTop="8px";mxEvent.addListener(da,"change",function(){da.checked?(qa&&O.removeAttribute("disabled"),Y.removeAttribute("disabled")):(O.setAttribute("disabled","disabled"),Y.setAttribute("disabled","disabled"));Y.checked&&da.checked?ba.getEditSelect().removeAttribute("disabled"):ba.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,y,mxUtils.bind(this,function(){d(H.checked,G.checked,aa.checked,
-da.checked,ba.getLink(),O.checked)}),null,mxResources.get("embed"),q);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,l,q,y,F,C){function H(Y){var qa=" ",O="";l&&(qa=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=aa?"&page="+aa:"")+(q?"&edit=_blank":"")+(y?"&layers=1":"")+"');}})(this);\"",O+="cursor:pointer;");d&&(O+="max-width:100%;");var X="";g&&(X=' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');F('<img src="'+Y+'"'+X+(""!=O?' style="'+O+'"':"")+qa+"/>")}var G=this.editor.graph.getGraphBounds(),aa=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(Y){var qa=l?this.getFileData(!0):null;
-Y=this.createImageDataUri(Y,qa,"png");H(Y)}),null,null,null,mxUtils.bind(this,function(Y){C({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),G.width*G.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var da="";g&&(da="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var ba=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(l?"1":"0")+da+"&xml="+encodeURIComponent(f));ba.send(mxUtils.bind(this,function(){200<=
-ba.getStatus()&&299>=ba.getStatus()?H("data:image/png;base64,"+ba.getText()):C({message:mxResources.get("unknownError")})}))}else C({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,f,g,l,q,y,F){var C=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),H=C.getElementsByTagName("a");if(null!=H)for(var G=0;G<H.length;G++){var aa=H[G].getAttribute("href");null!=aa&&"#"==aa.charAt(0)&&"_blank"==H[G].getAttribute("target")&&H[G].removeAttribute("target")}l&&
-C.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(C);if(g){var da=" ",ba="";l&&(da="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(q?"&edit=_blank":"")+(y?"&layers=1":
-"")+"');}})(this);\"",ba+="cursor:pointer;");d&&(ba+="max-width:100%;");this.editor.convertImages(C,mxUtils.bind(this,function(Y){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(Y))+'"'+(""!=ba?' style="'+ba+'"':"")+da+"/>")}))}else ba="",l&&(f=this.getSelectedPageIndex(),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('"+
+da.checked,ba.getLink(),O.checked)}),null,mxResources.get("embed"),q);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,m,q,y,F,C){function H(Y){var qa=" ",O="";m&&(qa=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=aa?"&page="+aa:"")+(q?"&edit=_blank":"")+(y?"&layers=1":"")+"');}})(this);\"",O+="cursor:pointer;");d&&(O+="max-width:100%;");var X="";g&&(X=' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');F('<img src="'+Y+'"'+X+(""!=O?' style="'+O+'"':"")+qa+"/>")}var G=this.editor.graph.getGraphBounds(),aa=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(Y){var qa=m?this.getFileData(!0):null;
+Y=this.createImageDataUri(Y,qa,"png");H(Y)}),null,null,null,mxUtils.bind(this,function(Y){C({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),G.width*G.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var da="";g&&(da="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var ba=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(m?"1":"0")+da+"&xml="+encodeURIComponent(f));ba.send(mxUtils.bind(this,function(){200<=
+ba.getStatus()&&299>=ba.getStatus()?H("data:image/png;base64,"+ba.getText()):C({message:mxResources.get("unknownError")})}))}else C({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,f,g,m,q,y,F){var C=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),H=C.getElementsByTagName("a");if(null!=H)for(var G=0;G<H.length;G++){var aa=H[G].getAttribute("href");null!=aa&&"#"==aa.charAt(0)&&"_blank"==H[G].getAttribute("target")&&H[G].removeAttribute("target")}m&&
+C.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(C);if(g){var da=" ",ba="";m&&(da="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(q?"&edit=_blank":"")+(y?"&layers=1":
+"")+"');}})(this);\"",ba+="cursor:pointer;");d&&(ba+="max-width:100%;");this.editor.convertImages(C,mxUtils.bind(this,function(Y){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(Y))+'"'+(""!=ba?' style="'+ba+'"':"")+da+"/>")}))}else ba="",m&&(f=this.getSelectedPageIndex(),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.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(q?"&edit=_blank":"")+(y?"&layers=1":"")+"');}}})(this);"),ba+="cursor:pointer;"),d&&(d=parseInt(C.getAttribute("width")),q=parseInt(C.getAttribute("height")),C.setAttribute("viewBox","-0.5 -0.5 "+d+" "+q),ba+="max-width:100%;max-height:"+q+"px;",C.removeAttribute("height")),""!=ba&&C.setAttribute("style",ba),this.editor.addFontCss(C),this.editor.graph.mathEnabled&&this.editor.addMathCss(C),F(mxUtils.getXml(C))};EditorUi.prototype.timeSince=
function(d){d=Math.floor((new Date-d)/1E3);var f=Math.floor(d/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(d/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(d/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(d/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(d/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,f){if(null!=d){var g=null;if("diagram"==
-d.nodeName)g=d;else if("mxfile"==d.nodeName){var l=d.getElementsByTagName("diagram");if(0<l.length){g=l[0];var q=f.getGlobalVariable;f.getGlobalVariable=function(y){return"page"==y?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==y?1:q.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}l=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(y){}finally{this.editor.graph=l}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=
-1,g=0;if(null!=d){if(d.hasAttribute("scale")){var l=parseFloat(d.getAttribute("scale"));!isNaN(l)&&0<l&&(f=l)}d.hasAttribute("border")&&(l=parseInt(d.getAttribute("border")),!isNaN(l)&&0<l&&(g=l))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,l,q){try{var y=this.editor.graph,F=null!=y.themes&&"darkTheme"==y.defaultThemeName,C=null;if(null!=g&&0<g.length)y=this.createTemporaryGraph(F?y.getDefaultStylesheet():y.getStylesheet()),document.body.appendChild(y.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
+d.nodeName)g=d;else if("mxfile"==d.nodeName){var m=d.getElementsByTagName("diagram");if(0<m.length){g=m[0];var q=f.getGlobalVariable;f.getGlobalVariable=function(y){return"page"==y?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==y?1:q.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}m=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(y){}finally{this.editor.graph=m}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=
+1,g=0;if(null!=d){if(d.hasAttribute("scale")){var m=parseFloat(d.getAttribute("scale"));!isNaN(m)&&0<m&&(f=m)}d.hasAttribute("border")&&(m=parseInt(d.getAttribute("border")),!isNaN(m)&&0<m&&(g=m))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,m,q){try{var y=this.editor.graph,F=null!=y.themes&&"darkTheme"==y.defaultThemeName,C=null;if(null!=g&&0<g.length)y=this.createTemporaryGraph(F?y.getDefaultStylesheet():y.getStylesheet()),document.body.appendChild(y.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
!0),y),C=g;else if(F||null!=this.pages&&this.currentPage!=this.pages[0]){y=this.createTemporaryGraph(F?y.getDefaultStylesheet():y.getStylesheet());var H=y.getGlobalVariable;y.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?y.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&y.setBackgroundImage(G.viewState.backgroundImage);y.getGlobalVariable=function(aa){return"page"==aa?G.getName():"pagenumber"==aa?1:H.apply(this,
arguments)};document.body.appendChild(y.container);y.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(aa){try{null==C&&(C=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var da=aa.toDataURL("image/png");da=Editor.writeGraphModelToPng(da,"tEXt","mxfile",encodeURIComponent(C));d(da.substring(da.lastIndexOf(",")+1));y!=this.editor.graph&&y.container.parentNode.removeChild(y.container)}catch(ba){null!=f&&f(ba)}}),null,null,null,mxUtils.bind(this,function(aa){null!=
-f&&f(aa)}),null,null,l,null,y.shadowVisible,null,y,q,null,null,null,"diagram",null)}catch(aa){null!=f&&f(aa)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,l,q,y,F,C,H,G,aa,da,ba){C=null!=C?C:!0;aa=null!=aa?aa:0;F=null!=H?H:f.background;F==mxConstants.NONE&&(F=null);y=f.getSvg(F,G,aa,null,null,y,null,null,null,f.shadowVisible||da,null,ba,"diagram");(f.shadowVisible||da)&&f.addSvgShadow(y,null,null,0==aa);null!=d&&y.setAttribute("content",d);null!=g&&y.setAttribute("resource",g);var Y=mxUtils.bind(this,
-function(qa){qa=(l?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(qa);null!=q&&q(qa);return qa});f.mathEnabled&&this.editor.addMathCss(y);if(null!=q)this.embedFonts(y,mxUtils.bind(this,function(qa){C?this.editor.convertImages(qa,mxUtils.bind(this,function(O){Y(O)})):Y(qa)}));else return Y(y)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
-this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(l){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,l,q,y,F,C,H,G,aa,da,ba){H=null!=H?H:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var Y=this.editor.graph.isSelectionEmpty();g=null!=g?g:Y;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(qa){this.spinner.stop();try{this.saveCanvas(qa,
-q?this.getFileData(!0,null,null,null,g,C):null,H,null==this.pages||0==this.pages.length,aa)}catch(O){this.handleError(O)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(qa){this.spinner.stop();this.handleError(qa)}),null,g,d||1,f,l,null,null,y,F,G,da,ba)}catch(qa){this.spinner.stop(),this.handleError(qa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,l,q,y,F){f=null!=f?f:0;g=null!=g?g:0;var C=
+f&&f(aa)}),null,null,m,null,y.shadowVisible,null,y,q,null,null,null,"diagram",null)}catch(aa){null!=f&&f(aa)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,m,q,y,F,C,H,G,aa,da,ba){C=null!=C?C:!0;aa=null!=aa?aa:0;F=null!=H?H:f.background;F==mxConstants.NONE&&(F=null);y=f.getSvg(F,G,aa,null,null,y,null,null,null,f.shadowVisible||da,null,ba,"diagram");(f.shadowVisible||da)&&f.addSvgShadow(y,null,null,0==aa);null!=d&&y.setAttribute("content",d);null!=g&&y.setAttribute("resource",g);var Y=mxUtils.bind(this,
+function(qa){qa=(m?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(qa);null!=q&&q(qa);return qa});f.mathEnabled&&this.editor.addMathCss(y);if(null!=q)this.embedFonts(y,mxUtils.bind(this,function(qa){C?this.editor.convertImages(qa,mxUtils.bind(this,function(O){Y(O)})):Y(qa)}));else return Y(y)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
+this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(m){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,m,q,y,F,C,H,G,aa,da,ba){H=null!=H?H:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var Y=this.editor.graph.isSelectionEmpty();g=null!=g?g:Y;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(qa){this.spinner.stop();try{this.saveCanvas(qa,
+q?this.getFileData(!0,null,null,null,g,C):null,H,null==this.pages||0==this.pages.length,aa)}catch(O){this.handleError(O)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(qa){this.spinner.stop();this.handleError(qa)}),null,g,d||1,f,m,null,null,y,F,G,da,ba)}catch(qa){this.spinner.stop(),this.handleError(qa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,m,q,y,F){f=null!=f?f:0;g=null!=g?g:0;var C=
[];try{var H=this.editor.graph;if(null!=d&&0<d.length){H.model.beginUpdate();try{var G=mxUtils.parseXml(d);d={};var aa=this.editor.extractGraphModel(G.documentElement,null!=this.pages);if(null!=aa&&"mxfile"==aa.nodeName&&null!=this.pages){var da=aa.getElementsByTagName("diagram");if(1==da.length&&!y){if(aa=Editor.parseDiagramNode(da[0]),null!=this.currentPage&&(d[da[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ba=da[0].getAttribute("name");null!=ba&&""!=ba&&this.editor.graph.model.execute(new RenamePage(this,
-this.currentPage,ba))}}else if(0<da.length){y=[];var Y=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[da[0].getAttribute("id")]=this.pages[0].getId(),aa=Editor.parseDiagramNode(da[0]),l=!1,Y=1);for(;Y<da.length;Y++){var qa=da[Y].getAttribute("id");da[Y].removeAttribute("id");var O=this.updatePageRoot(new DiagramPage(da[Y]));d[qa]=da[Y].getAttribute("id");var X=this.pages.length;null==O.getName()&&O.setName(mxResources.get("pageWithNumber",[X+1]));H.model.execute(new ChangePage(this,
-O,O,X,!0));y.push(O)}this.updatePageLinks(d,y)}}if(null!=aa&&"mxGraphModel"===aa.nodeName){C=H.importGraphModel(aa,f,g,l);if(null!=C)for(Y=0;Y<C.length;Y++)this.updatePageLinksForCell(d,C[Y]);var ea=H.parseBackgroundImage(aa.getAttribute("backgroundImage"));if(null!=ea&&null!=ea.originalSrc){this.updateBackgroundPageLink(d,ea);var ka=new ChangePageSetup(this,null,ea);ka.ignoreColor=!0;H.model.execute(ka)}}F&&this.insertHandler(C,null,null,H.defaultVertexStyle,H.defaultEdgeStyle,!1,!0)}finally{H.model.endUpdate()}}}catch(ja){if(q)throw ja;
-this.handleError(ja)}return C};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc="data:page/id,"+g)}}catch(l){}};EditorUi.prototype.updatePageLinksForCell=
-function(d,f){var g=document.createElement("div"),l=this.editor.graph,q=l.getLinkForCell(f);null!=q&&l.setLinkForCell(f,this.updatePageLink(d,q));if(l.isHtmlLabel(f)){g.innerHTML=l.sanitizeHtml(l.getLabel(f));for(var y=g.getElementsByTagName("a"),F=!1,C=0;C<y.length;C++)q=y[C].getAttribute("href"),null!=q&&(y[C].setAttribute("href",this.updatePageLink(d,q)),F=!0);F&&l.labelChanged(f,g.innerHTML)}for(C=0;C<l.model.getChildCount(f);C++)this.updatePageLinksForCell(d,l.model.getChildAt(f,C))};EditorUi.prototype.updatePageLink=
-function(d,f){if(Graph.isPageLink(f)){var g=d[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var l=JSON.parse(f.substring(17));if(null!=l.actions){for(var q=0;q<l.actions.length;q++){var y=l.actions[q];if(null!=y.open&&Graph.isPageLink(y.open)){var F=y.open.substring(y.open.indexOf(",")+1);g=d[F];null!=g?y.open="data:page/id,"+g:null==this.getPageById(F)&&delete y.open}}f="data:action/json,"+JSON.stringify(l)}}catch(C){}return f};
-EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,g,l,q){l=null!=l?l:d.name;g=null!=g?g:mxUtils.bind(this,function(F){this.handleError(F)});var y=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var F=this.isRemoteVisioFormat(l);try{var C="UNKNOWN-VISIO",H=l.lastIndexOf(".");if(0<=H&&H<l.length)C=l.substring(H+1).toUpperCase();else{var G=l.lastIndexOf("/");0<=
-G&&G<l.length&&(l=l.substring(G+1))}EditorUi.logEvent({category:C+"-MS-IMPORT-FILE",action:"filename_"+l,label:F?"remote":"local"})}catch(da){}if(F)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{F=new FormData;F.append("file1",d,l);var aa=new XMLHttpRequest;aa.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(l)?"?stencil=1":""));aa.responseType="blob";this.addRemoteServiceSecurityCheck(aa);
-null!=q&&aa.setRequestHeader("x-convert-custom",q);aa.onreadystatechange=mxUtils.bind(this,function(){if(4==aa.readyState)if(200<=aa.status&&299>=aa.status)try{var da=aa.response;if("text/xml"==da.type){var ba=new FileReader;ba.onload=mxUtils.bind(this,function(Y){try{f(Y.target.result)}catch(qa){g({message:mxResources.get("errorLoadingFile")})}});ba.readAsText(da)}else this.doImportVisio(da,f,g,l)}catch(Y){g(Y)}else try{""==aa.responseType||"text"==aa.responseType?g({message:aa.responseText}):(ba=
-new FileReader,ba.onload=function(){g({message:JSON.parse(ba.result).Message})},ba.readAsText(aa.response))}catch(Y){g({})}});aa.send(F)}else try{this.doImportVisio(d,f,g,l)}catch(da){g(da)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?y():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",y))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,
-function(q){this.handleError(q)});var l=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,f,g)}catch(q){g(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?l():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",l))};EditorUi.prototype.exportVisio=function(d){var f=mxUtils.bind(this,function(){this.loadingExtensions=
-!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)||this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(d,f,g){var l=mxUtils.bind(this,
+this.currentPage,ba))}}else if(0<da.length){y=[];var Y=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[da[0].getAttribute("id")]=this.pages[0].getId(),aa=Editor.parseDiagramNode(da[0]),m=!1,Y=1);for(;Y<da.length;Y++){var qa=da[Y].getAttribute("id");da[Y].removeAttribute("id");var O=this.updatePageRoot(new DiagramPage(da[Y]));d[qa]=da[Y].getAttribute("id");var X=this.pages.length;null==O.getName()&&O.setName(mxResources.get("pageWithNumber",[X+1]));H.model.execute(new ChangePage(this,
+O,O,X,!0));y.push(O)}this.updatePageLinks(d,y)}}if(null!=aa&&"mxGraphModel"===aa.nodeName){C=H.importGraphModel(aa,f,g,m);if(null!=C)for(Y=0;Y<C.length;Y++)this.updatePageLinksForCell(d,C[Y]);var ea=H.parseBackgroundImage(aa.getAttribute("backgroundImage"));if(null!=ea&&null!=ea.originalSrc){this.updateBackgroundPageLink(d,ea);var ka=new ChangePageSetup(this,null,ea);ka.ignoreColor=!0;H.model.execute(ka)}}F&&this.insertHandler(C,null,null,H.defaultVertexStyle,H.defaultEdgeStyle,!1,!0)}finally{H.model.endUpdate()}}}catch(ja){if(q)throw ja;
+this.handleError(ja)}return C};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc="data:page/id,"+g)}}catch(m){}};EditorUi.prototype.updatePageLinksForCell=
+function(d,f){var g=document.createElement("div"),m=this.editor.graph,q=m.getLinkForCell(f);null!=q&&m.setLinkForCell(f,this.updatePageLink(d,q));if(m.isHtmlLabel(f)){g.innerHTML=m.sanitizeHtml(m.getLabel(f));for(var y=g.getElementsByTagName("a"),F=!1,C=0;C<y.length;C++)q=y[C].getAttribute("href"),null!=q&&(y[C].setAttribute("href",this.updatePageLink(d,q)),F=!0);F&&m.labelChanged(f,g.innerHTML)}for(C=0;C<m.model.getChildCount(f);C++)this.updatePageLinksForCell(d,m.model.getChildAt(f,C))};EditorUi.prototype.updatePageLink=
+function(d,f){if(Graph.isPageLink(f)){var g=d[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var m=JSON.parse(f.substring(17));if(null!=m.actions){for(var q=0;q<m.actions.length;q++){var y=m.actions[q];if(null!=y.open&&Graph.isPageLink(y.open)){var F=y.open.substring(y.open.indexOf(",")+1);g=d[F];null!=g?y.open="data:page/id,"+g:null==this.getPageById(F)&&delete y.open}}f="data:action/json,"+JSON.stringify(m)}}catch(C){}return f};
+EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,g,m,q){m=null!=m?m:d.name;g=null!=g?g:mxUtils.bind(this,function(F){this.handleError(F)});var y=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var F=this.isRemoteVisioFormat(m);try{var C="UNKNOWN-VISIO",H=m.lastIndexOf(".");if(0<=H&&H<m.length)C=m.substring(H+1).toUpperCase();else{var G=m.lastIndexOf("/");0<=
+G&&G<m.length&&(m=m.substring(G+1))}EditorUi.logEvent({category:C+"-MS-IMPORT-FILE",action:"filename_"+m,label:F?"remote":"local"})}catch(da){}if(F)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{F=new FormData;F.append("file1",d,m);var aa=new XMLHttpRequest;aa.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(m)?"?stencil=1":""));aa.responseType="blob";this.addRemoteServiceSecurityCheck(aa);
+null!=q&&aa.setRequestHeader("x-convert-custom",q);aa.onreadystatechange=mxUtils.bind(this,function(){if(4==aa.readyState)if(200<=aa.status&&299>=aa.status)try{var da=aa.response;if("text/xml"==da.type){var ba=new FileReader;ba.onload=mxUtils.bind(this,function(Y){try{f(Y.target.result)}catch(qa){g({message:mxResources.get("errorLoadingFile")})}});ba.readAsText(da)}else this.doImportVisio(da,f,g,m)}catch(Y){g(Y)}else try{""==aa.responseType||"text"==aa.responseType?g({message:aa.responseText}):(ba=
+new FileReader,ba.onload=function(){g({message:JSON.parse(ba.result).Message})},ba.readAsText(aa.response))}catch(Y){g({})}});aa.send(F)}else try{this.doImportVisio(d,f,g,m)}catch(da){g(da)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?y():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",y))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,
+function(q){this.handleError(q)});var m=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,f,g)}catch(q){g(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?m():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",m))};EditorUi.prototype.exportVisio=function(d){var f=mxUtils.bind(this,function(){this.loadingExtensions=
+!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)||this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(d,f,g){var m=mxUtils.bind(this,
function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var q=JSON.parse(d);f(LucidImporter.importState(q));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var y=[(new Date).toISOString(),"convertLucidChart",q];null!=q.state&&y.push(JSON.parse(q.state));if(null!=q.svgThumbs)for(var F=0;F<q.svgThumbs.length;F++)y.push(Editor.createSvgDataUri(q.svgThumbs[F]));null!=q.thumb&&y.push(q.thumb);
-console.log.apply(console,y)}}catch(C){}}catch(C){null!=window.console&&console.error(C),g(C)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(l,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",
-function(){mxscript("js/orgchart/mxOrgChartLayout.js",l)})})})}):mxscript("js/extensions.min.js",l))};EditorUi.prototype.generateMermaidImage=function(d,f,g,l){var q=this,y=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(F){try{if(mxClient.IS_IE||mxClient.IS_IE11)F=
-F.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var C=mxUtils.parseXml(F).getElementsByTagName("svg");if(0<C.length){var H=parseFloat(C[0].getAttribute("width")),G=parseFloat(C[0].getAttribute("height"));if(isNaN(H)||isNaN(G))try{var aa=C[0].getAttribute("viewBox").split(/\s+/);H=parseFloat(aa[2]);G=parseFloat(aa[3])}catch(da){H=H||100,G=G||100}g(q.convertDataUri(Editor.createSvgDataUri(F)),H,G)}else l({message:mxResources.get("invalidInput")})}catch(da){l(da)}})}catch(F){l(F)}};
-"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?y():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",y):mxscript("js/extensions.min.js",y))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,l){function q(C,H,G){c1=C>>2;c2=(C&3)<<4|H>>4;c3=(H&15)<<2|G>>6;c4=G&63;r="";r+=y(c1&63);r+=y(c2&63);r+=y(c3&63);return r+=y(c4&63)}function y(C){if(10>C)return String.fromCharCode(48+C);C-=10;if(26>C)return String.fromCharCode(65+C);C-=26;if(26>C)return String.fromCharCode(97+
+console.log.apply(console,y)}}catch(C){}}catch(C){null!=window.console&&console.error(C),g(C)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(m,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",
+function(){mxscript("js/orgchart/mxOrgChartLayout.js",m)})})})}):mxscript("js/extensions.min.js",m))};EditorUi.prototype.generateMermaidImage=function(d,f,g,m){var q=this,y=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(F){try{if(mxClient.IS_IE||mxClient.IS_IE11)F=
+F.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var C=mxUtils.parseXml(F).getElementsByTagName("svg");if(0<C.length){var H=parseFloat(C[0].getAttribute("width")),G=parseFloat(C[0].getAttribute("height"));if(isNaN(H)||isNaN(G))try{var aa=C[0].getAttribute("viewBox").split(/\s+/);H=parseFloat(aa[2]);G=parseFloat(aa[3])}catch(da){H=H||100,G=G||100}g(q.convertDataUri(Editor.createSvgDataUri(F)),H,G)}else m({message:mxResources.get("invalidInput")})}catch(da){m(da)}})}catch(F){m(F)}};
+"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?y():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",y):mxscript("js/extensions.min.js",y))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,m){function q(C,H,G){c1=C>>2;c2=(C&3)<<4|H>>4;c3=(H&15)<<2|G>>6;c4=G&63;r="";r+=y(c1&63);r+=y(c2&63);r+=y(c3&63);return r+=y(c4&63)}function y(C){if(10>C)return String.fromCharCode(48+C);C-=10;if(26>C)return String.fromCharCode(65+C);C-=26;if(26>C)return String.fromCharCode(97+
C);C-=26;return 0==C?"-":1==C?"_":"?"}var F=new XMLHttpRequest;F.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(C){r="";for(i=0;i<C.length;i+=3)r=i+2==C.length?r+q(C.charCodeAt(i),C.charCodeAt(i+1),0):i+1==C.length?r+q(C.charCodeAt(i),0,0):r+q(C.charCodeAt(i),C.charCodeAt(i+1),C.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(F.responseType="blob");F.onload=function(C){if(200<=this.status&&300>this.status)if("txt"==
-f)g(this.response);else{var H=new FileReader;H.readAsDataURL(this.response);H.onloadend=function(G){var aa=new Image;aa.onload=function(){try{var da=aa.width,ba=aa.height;if(0==da&&0==ba){var Y=H.result,qa=Y.indexOf(","),O=decodeURIComponent(escape(atob(Y.substring(qa+1)))),X=mxUtils.parseXml(O).getElementsByTagName("svg");0<X.length&&(da=parseFloat(X[0].getAttribute("width")),ba=parseFloat(X[0].getAttribute("height")))}g(H.result,da,ba)}catch(ea){l(ea)}};aa.src=H.result};H.onerror=function(G){l(G)}}else l(C)};
-F.onerror=function(C){l(C)};F.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var l=this.editor.graph,q=null;l.getModel().beginUpdate();try{q=l.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),l.updateCellSize(q,!0)}finally{l.getModel().endUpdate()}return q};EditorUi.prototype.insertTextAt=function(d,f,g,l,q,y,F,C){y=null!=y?y:!0;F=null!=F?F:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?
+f)g(this.response);else{var H=new FileReader;H.readAsDataURL(this.response);H.onloadend=function(G){var aa=new Image;aa.onload=function(){try{var da=aa.width,ba=aa.height;if(0==da&&0==ba){var Y=H.result,qa=Y.indexOf(","),O=decodeURIComponent(escape(atob(Y.substring(qa+1)))),X=mxUtils.parseXml(O).getElementsByTagName("svg");0<X.length&&(da=parseFloat(X[0].getAttribute("width")),ba=parseFloat(X[0].getAttribute("height")))}g(H.result,da,ba)}catch(ea){m(ea)}};aa.src=H.result};H.onerror=function(G){m(G)}}else m(C)};
+F.onerror=function(C){m(C)};F.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var m=this.editor.graph,q=null;m.getModel().beginUpdate();try{q=m.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),m.updateCellSize(q,!0)}finally{m.getModel().endUpdate()}return q};EditorUi.prototype.insertTextAt=function(d,f,g,m,q,y,F,C){y=null!=y?y:!0;F=null!=F?F:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?
this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(ba){4==ba.readyState&&200<=ba.status&&299>=ba.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ba.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(q||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var H=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var G=Editor.extractGraphModelFromPdf(d);if(null!=
G&&0<G.length)return this.importXml(G,f,g,y,!0,C)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d),null!=G&&0<G.length))return this.importXml(G,f,g,y,!0,C);if("data:image/svg+xml;"==d.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(G=d.substring(d.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(d.substring(d.indexOf(",")+1));var aa=this.importXml(G,f,g,y,!0,C);if(0<aa.length)return aa}catch(ba){}this.loadImage(d,
mxUtils.bind(this,function(ba){if("data:"==d.substring(0,5))this.resizeImage(ba,d,mxUtils.bind(this,function(O,X,ea){H.setSelectionCell(H.insertVertex(null,null,"",H.snap(f),H.snap(g),X,ea,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(O)+";"))}),F,this.maxImageSize);else{var Y=Math.min(1,Math.min(this.maxImageSize/ba.width,this.maxImageSize/ba.height)),qa=Math.round(ba.width*Y);ba=Math.round(ba.height*
-Y);H.setSelectionCell(H.insertVertex(null,null,"",H.snap(f),H.snap(g),qa,ba,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";"))}}),mxUtils.bind(this,function(){var ba=null;H.getModel().beginUpdate();try{ba=H.insertVertex(H.getDefaultParent(),null,d,H.snap(f),H.snap(g),1,1,"text;"+(l?"html=1;":"")),H.updateCellSize(ba),H.fireEvent(new mxEventObject("textInserted","cells",[ba]))}finally{H.getModel().endUpdate()}H.setSelectionCell(ba)}))}else{d=
-Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,y,null,C);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,function(ba){this.editor.graph.setSelectionCells(this.importXml(ba,f,g,y,null,C))}),mxUtils.bind(this,function(ba){this.handleError(ba)}));else{H=this.editor.graph;q=null;H.getModel().beginUpdate();try{q=H.insertVertex(H.getDefaultParent(),null,"",H.snap(f),H.snap(g),1,1,"text;whiteSpace=wrap;"+(l?"html=1;":""));
+Y);H.setSelectionCell(H.insertVertex(null,null,"",H.snap(f),H.snap(g),qa,ba,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";"))}}),mxUtils.bind(this,function(){var ba=null;H.getModel().beginUpdate();try{ba=H.insertVertex(H.getDefaultParent(),null,d,H.snap(f),H.snap(g),1,1,"text;"+(m?"html=1;":"")),H.updateCellSize(ba),H.fireEvent(new mxEventObject("textInserted","cells",[ba]))}finally{H.getModel().endUpdate()}H.setSelectionCell(ba)}))}else{d=
+Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,y,null,C);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,function(ba){this.editor.graph.setSelectionCells(this.importXml(ba,f,g,y,null,C))}),mxUtils.bind(this,function(ba){this.handleError(ba)}));else{H=this.editor.graph;q=null;H.getModel().beginUpdate();try{q=H.insertVertex(H.getDefaultParent(),null,"",H.snap(f),H.snap(g),1,1,"text;whiteSpace=wrap;"+(m?"html=1;":""));
H.fireEvent(new mxEventObject("textInserted","cells",[q]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+"...");q.value=d;H.updateCellSize(q);if(0<this.maxTextWidth&&q.geometry.width>this.maxTextWidth){var da=H.getPreferredSizeForCell(q,this.maxTextWidth);q.geometry.width=da.width;q.geometry.height=da.height}Graph.isLink(q.value)&&H.setLinkForCell(q,q.value);q.geometry.width+=H.gridSize;q.geometry.height+=
H.gridSize}finally{H.getModel().endUpdate()}return[q]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var f=d.indexOf(";");0<f&&(d=d.substring(0,f)+d.substring(d.indexOf(",",f+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,f){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};
EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,f){if(d&&Graph.fileSupport){if(null==this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display=
-"none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(F,C){StorageFile.listFiles(this,"F",F,C)});window.openBrowserFile=mxUtils.bind(this,function(F,C,H){StorageFile.getFileContent(this,F,C,H)});window.deleteBrowserFile=mxUtils.bind(this,function(F,C,H){StorageFile.deleteFile(this,F,C,H)});if(!f){var l=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=
+"none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(F,C){StorageFile.listFiles(this,"F",F,C)});window.openBrowserFile=mxUtils.bind(this,function(F,C,H){StorageFile.getFileContent(this,F,C,H)});window.deleteBrowserFile=mxUtils.bind(this,function(F,C,H){StorageFile.deleteFile(this,F,C,H)});if(!f){var m=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=
new OpenFile(mxUtils.bind(this,function(F){this.hideDialog(F)}));window.openFile.setConsumer(mxUtils.bind(this,function(F,C){null!=C&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(C)?(F=new Blob([F],{type:"application/octet-stream"}),this.importVisio(F,mxUtils.bind(this,function(H){this.importXml(H,0,0,!0)}),null,C)):this.editor.graph.setSelectionCells(this.importXml(F,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,
-function(){window.openFile=null});if(!f){var q=this.dialog,y=q.close;this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=l;y.apply(q,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(d,f,g){var l=this,q=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(y){if(mxUtils.isEmptyObject(y.files))g();else{var F=0,C,H=!1;y.forEach(function(G,aa){G=
-aa.name.toLowerCase();"diagram/diagram.xml"==G?(H=!0,aa.async("string").then(function(da){0==da.indexOf("<mxfile ")?f(da):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>F&&(F=G,C=aa))});0<F?C.async("string").then(function(G){(new XMLHttpRequest).upload&&l.isRemoteFileFormat(G,d.name)?l.isOffline()?l.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):l.parseFileData(G,mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status?f(aa.responseText):
-g())}),d.name):g()}):H||g()}},function(y){g(y)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importFile=function(d,f,g,l,q,y,F,C,H,G,aa,da){G=null!=G?G:!0;var ba=!1,Y=null,qa=mxUtils.bind(this,function(O){var X=null;null!=O&&"<mxlibrary"==O.substring(0,10)?this.loadLibrary(new LocalLibrary(this,O,F)):X=this.importXml(O,g,l,G,null,null!=da?mxEvent.isControlDown(da):null);null!=C&&
-C(X)});"image"==f.substring(0,5)?(H=!1,"image/png"==f.substring(0,9)&&(f=aa?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(Y=this.importXml(f,g,l,G,null,null!=da?mxEvent.isControlDown(da):null),H=!0)),H||(f=this.editor.graph,H=d.indexOf(";"),0<H&&(d=d.substring(0,H)+d.substring(d.indexOf(",",H+1))),G&&f.isGridEnabled()&&(g=f.snap(g),l=f.snap(l)),Y=[f.insertVertex(null,null,"",g,l,q,y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+function(){window.openFile=null});if(!f){var q=this.dialog,y=q.close;this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=m;y.apply(q,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(d,f,g){var m=this,q=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(y){if(mxUtils.isEmptyObject(y.files))g();else{var F=0,C,H=!1;y.forEach(function(G,aa){G=
+aa.name.toLowerCase();"diagram/diagram.xml"==G?(H=!0,aa.async("string").then(function(da){0==da.indexOf("<mxfile ")?f(da):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>F&&(F=G,C=aa))});0<F?C.async("string").then(function(G){(new XMLHttpRequest).upload&&m.isRemoteFileFormat(G,d.name)?m.isOffline()?m.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):m.parseFileData(G,mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status?f(aa.responseText):
+g())}),d.name):g()}):H||g()}},function(y){g(y)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importFile=function(d,f,g,m,q,y,F,C,H,G,aa,da){G=null!=G?G:!0;var ba=!1,Y=null,qa=mxUtils.bind(this,function(O){var X=null;null!=O&&"<mxlibrary"==O.substring(0,10)?this.loadLibrary(new LocalLibrary(this,O,F)):X=this.importXml(O,g,m,G,null,null!=da?mxEvent.isControlDown(da):null);null!=C&&
+C(X)});"image"==f.substring(0,5)?(H=!1,"image/png"==f.substring(0,9)&&(f=aa?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(Y=this.importXml(f,g,m,G,null,null!=da?mxEvent.isControlDown(da):null),H=!0)),H||(f=this.editor.graph,H=d.indexOf(";"),0<H&&(d=d.substring(0,H)+d.substring(d.indexOf(",",H+1))),G&&f.isGridEnabled()&&(g=f.snap(g),m=f.snap(m)),Y=[f.insertVertex(null,null,"",g,m,q,y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
d+";")])):/(\.*<graphml )/.test(d)?(ba=!0,this.importGraphML(d,qa)):null!=H&&null!=F&&(/(\.v(dx|sdx?))($|\?)/i.test(F)||/(\.vs(x|sx?))($|\?)/i.test(F))?(ba=!0,this.importVisio(H,qa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,F)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ba=!0,q=mxUtils.bind(this,function(O){4==O.readyState&&(200<=O.status&&299>=O.status?qa(O.responseText):null!=C&&C(null))}),null!=d?this.parseFileData(d,q,F):this.parseFile(H,
-q,F)):0==d.indexOf("PK")&&null!=H?(ba=!0,this.importZipFile(H,qa,mxUtils.bind(this,function(){Y=this.insertTextAt(this.validateFileData(d),g,l,!0,null,G);C(Y)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(Y=this.insertTextAt(this.validateFileData(d),g,l,!0,null,G,null,null!=da?mxEvent.isControlDown(da):null));ba||null==C||C(Y);return Y};EditorUi.prototype.importFiles=function(d,f,g,l,q,y,F,C,H,G,aa,da,ba){l=null!=l?l:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var Y=null!=
+q,F)):0==d.indexOf("PK")&&null!=H?(ba=!0,this.importZipFile(H,qa,mxUtils.bind(this,function(){Y=this.insertTextAt(this.validateFileData(d),g,m,!0,null,G);C(Y)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(Y=this.insertTextAt(this.validateFileData(d),g,m,!0,null,G,null,null!=da?mxEvent.isControlDown(da):null));ba||null==C||C(Y);return Y};EditorUi.prototype.importFiles=function(d,f,g,m,q,y,F,C,H,G,aa,da,ba){m=null!=m?m:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var Y=null!=
f&&null!=g,qa=!0;f=null!=f?f:0;g=null!=g?g:0;var O=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var X=aa||this.resampleThreshold,ea=0;ea<d.length;ea++)if("image/svg"!==d[ea].type.substring(0,9)&&"image/"===d[ea].type.substring(0,6)&&d[ea].size>X){O=!0;break}var ka=mxUtils.bind(this,function(){var ja=this.editor.graph,U=ja.gridSize;q=null!=q?q:mxUtils.bind(this,function(la,ra,u,J,N,W,S,P,Z){try{return null!=la&&"<mxlibrary"==la.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,
la,S)),null):this.importFile(la,ra,u,J,N,W,S,P,Z,Y,da,ba)}catch(oa){return this.handleError(oa),null}});y=null!=y?y:mxUtils.bind(this,function(la){ja.setSelectionCells(la)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var I=d.length,V=I,Q=[],R=mxUtils.bind(this,function(la,ra){Q[la]=ra;if(0==--V){this.spinner.stop();if(null!=C)C(Q);else{var u=[];ja.getModel().beginUpdate();try{for(la=0;la<Q.length;la++){var J=Q[la]();null!=J&&(u=u.concat(J))}}finally{ja.getModel().endUpdate()}}y(u)}}),
fa=0;fa<I;fa++)mxUtils.bind(this,function(la){var ra=d[la];if(null!=ra){var u=new FileReader;u.onload=mxUtils.bind(this,function(J){if(null==F||F(ra))if("image/"==ra.type.substring(0,6))if("image/svg"==ra.type.substring(0,9)){var N=Graph.clipSvgDataUri(J.target.result),W=N.indexOf(",");W=decodeURIComponent(escape(atob(N.substring(W+1))));var S=mxUtils.parseXml(W);W=S.getElementsByTagName("svg");if(0<W.length){W=W[0];var P=da?null:W.getAttribute("content");null!=P&&"<"!=P.charAt(0)&&"%"!=P.charAt(0)&&
(P=unescape(window.atob?atob(P):Base64.decode(P,!0)));null!=P&&"%"==P.charAt(0)&&(P=decodeURIComponent(P));null==P||"<mxfile "!==P.substring(0,8)&&"<mxGraphModel "!==P.substring(0,14)?R(la,mxUtils.bind(this,function(){try{if(null!=S){var va=S.getElementsByTagName("svg");if(0<va.length){var Aa=va[0],sa=Aa.getAttribute("width"),Ba=Aa.getAttribute("height");sa=null!=sa&&"%"!=sa.charAt(sa.length-1)?parseFloat(sa):NaN;Ba=null!=Ba&&"%"!=Ba.charAt(Ba.length-1)?parseFloat(Ba):NaN;var ta=Aa.getAttribute("viewBox");
-if(null==ta||0==ta.length)Aa.setAttribute("viewBox","0 0 "+sa+" "+Ba);else if(isNaN(sa)||isNaN(Ba)){var Na=ta.split(" ");3<Na.length&&(sa=parseFloat(Na[2]),Ba=parseFloat(Na[3]))}N=Editor.createSvgDataUri(mxUtils.getXml(Aa));var Ca=Math.min(1,Math.min(l/Math.max(1,sa)),l/Math.max(1,Ba)),Qa=q(N,ra.type,f+la*U,g+la*U,Math.max(1,Math.round(sa*Ca)),Math.max(1,Math.round(Ba*Ca)),ra.name);if(isNaN(sa)||isNaN(Ba)){var Ua=new Image;Ua.onload=mxUtils.bind(this,function(){sa=Math.max(1,Ua.width);Ba=Math.max(1,
+if(null==ta||0==ta.length)Aa.setAttribute("viewBox","0 0 "+sa+" "+Ba);else if(isNaN(sa)||isNaN(Ba)){var Na=ta.split(" ");3<Na.length&&(sa=parseFloat(Na[2]),Ba=parseFloat(Na[3]))}N=Editor.createSvgDataUri(mxUtils.getXml(Aa));var Ca=Math.min(1,Math.min(m/Math.max(1,sa)),m/Math.max(1,Ba)),Qa=q(N,ra.type,f+la*U,g+la*U,Math.max(1,Math.round(sa*Ca)),Math.max(1,Math.round(Ba*Ca)),ra.name);if(isNaN(sa)||isNaN(Ba)){var Ua=new Image;Ua.onload=mxUtils.bind(this,function(){sa=Math.max(1,Ua.width);Ba=Math.max(1,
Ua.height);Qa[0].geometry.width=sa;Qa[0].geometry.height=Ba;Aa.setAttribute("viewBox","0 0 "+sa+" "+Ba);N=Editor.createSvgDataUri(mxUtils.getXml(Aa));var Ka=N.indexOf(";");0<Ka&&(N=N.substring(0,Ka)+N.substring(N.indexOf(",",Ka+1)));ja.setCellStyles("image",N,[Qa[0]])});Ua.src=Editor.createSvgDataUri(mxUtils.getXml(Aa))}return Qa}}}catch(Ka){}return null})):R(la,mxUtils.bind(this,function(){return q(P,"text/xml",f+la*U,g+la*U,0,0,ra.name)}))}else R(la,mxUtils.bind(this,function(){return null}))}else{W=
!1;if("image/png"==ra.type){var Z=da?null:this.extractGraphModelFromPng(J.target.result);if(null!=Z&&0<Z.length){var oa=new Image;oa.src=J.target.result;R(la,mxUtils.bind(this,function(){return q(Z,"text/xml",f+la*U,g+la*U,oa.width,oa.height,ra.name)}));W=!0}}W||(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(J.target.result,mxUtils.bind(this,function(va){this.resizeImage(va,J.target.result,mxUtils.bind(this,function(Aa,sa,Ba){R(la,mxUtils.bind(this,function(){if(null!=Aa&&Aa.length<G){var ta=qa&&this.isResampleImageSize(ra.size,aa)?Math.min(1,Math.min(l/sa,l/Ba)):1;return q(Aa,ra.type,f+la*U,g+la*U,Math.round(sa*ta),Math.round(Ba*ta),ra.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),qa,l,aa,ra.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else N=
+this.loadImage(J.target.result,mxUtils.bind(this,function(va){this.resizeImage(va,J.target.result,mxUtils.bind(this,function(Aa,sa,Ba){R(la,mxUtils.bind(this,function(){if(null!=Aa&&Aa.length<G){var ta=qa&&this.isResampleImageSize(ra.size,aa)?Math.min(1,Math.min(m/sa,m/Ba)):1;return q(Aa,ra.type,f+la*U,g+la*U,Math.round(sa*ta),Math.round(Ba*ta),ra.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),qa,m,aa,ra.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else N=
J.target.result,q(N,ra.type,f+la*U,g+la*U,240,160,ra.name,function(va){R(la,function(){return va})},ra)});/(\.v(dx|sdx?))($|\?)/i.test(ra.name)||/(\.vs(x|sx?))($|\?)/i.test(ra.name)?q(null,ra.type,f+la*U,g+la*U,240,160,ra.name,function(J){R(la,function(){return J})},ra):"image"==ra.type.substring(0,5)||"application/pdf"==ra.type?u.readAsDataURL(ra):u.readAsText(ra)}})(fa)});if(O){O=[];for(ea=0;ea<d.length;ea++)O.push(d[ea]);d=O;this.confirmImageResize(function(ja){qa=ja;ka()},H)}else ka()};EditorUi.prototype.isBlankFile=
-function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,q=function(y,F){if(y||f)mxSettings.setResizeImages(y?F:null),mxSettings.save();g();d(F)};null==l||f?this.showDialog((new ConfirmDialog(this,
-mxResources.get("resizeLargeImages"),function(y){q(y,!0)},function(y){q(y,!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):q(!1,l)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var l=new FileReader;l.onload=mxUtils.bind(this,function(){this.parseFileData(l.result,
-f,g)});l.readAsText(d)};EditorUi.prototype.parseFileData=function(d,f,g){var l=new XMLHttpRequest;l.open("POST",OPEN_URL);l.setRequestHeader("Content-Type","application/x-www-form-urlencoded");l.onreadystatechange=function(){f(l)};l.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>
-f};EditorUi.prototype.resizeImage=function(d,f,g,l,q,y,F){q=null!=q?q:this.maxImageSize;var C=Math.max(1,d.width),H=Math.max(1,d.height);if(l&&this.isResampleImageSize(null!=F?F:f.length,y))try{var G=Math.max(C/q,H/q);if(1<G){var aa=Math.round(C/G),da=Math.round(H/G),ba=document.createElement("canvas");ba.width=aa;ba.height=da;ba.getContext("2d").drawImage(d,0,0,aa,da);var Y=ba.toDataURL();if(Y.length<f.length){var qa=document.createElement("canvas");qa.width=aa;qa.height=da;var O=qa.toDataURL();
-Y!==O&&(f=Y,C=aa,H=da)}}}catch(X){}g(f,C,H)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var l=new Image;l.onload=function(){l.width=0<l.width?l.width:120;l.height=0<l.height?l.height:120;f(l)};null!=g&&(l.onerror=g);l.src=d}catch(q){if(null!=g)g(q);else throw q;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?
+function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},m=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,q=function(y,F){if(y||f)mxSettings.setResizeImages(y?F:null),mxSettings.save();g();d(F)};null==m||f?this.showDialog((new ConfirmDialog(this,
+mxResources.get("resizeLargeImages"),function(y){q(y,!0)},function(y){q(y,!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):q(!1,m)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var m=new FileReader;m.onload=mxUtils.bind(this,function(){this.parseFileData(m.result,
+f,g)});m.readAsText(d)};EditorUi.prototype.parseFileData=function(d,f,g){var m=new XMLHttpRequest;m.open("POST",OPEN_URL);m.setRequestHeader("Content-Type","application/x-www-form-urlencoded");m.onreadystatechange=function(){f(m)};m.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>
+f};EditorUi.prototype.resizeImage=function(d,f,g,m,q,y,F){q=null!=q?q:this.maxImageSize;var C=Math.max(1,d.width),H=Math.max(1,d.height);if(m&&this.isResampleImageSize(null!=F?F:f.length,y))try{var G=Math.max(C/q,H/q);if(1<G){var aa=Math.round(C/G),da=Math.round(H/G),ba=document.createElement("canvas");ba.width=aa;ba.height=da;ba.getContext("2d").drawImage(d,0,0,aa,da);var Y=ba.toDataURL();if(Y.length<f.length){var qa=document.createElement("canvas");qa.width=aa;qa.height=da;var O=qa.toDataURL();
+Y!==O&&(f=Y,C=aa,H=da)}}}catch(X){}g(f,C,H)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var m=new Image;m.onload=function(){m.width=0<m.width?m.width:120;m.height=0<m.height?m.height:120;f(m)};null!=g&&(m.onerror=g);m.src=d}catch(q){if(null!=g)g(q);else throw q;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?
urlParams.rough:d)};var D=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());
var d=this,f=this.editor.graph;Editor.isDarkMode()&&(f.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(X){var ea=X.getEvent();return null==X.getState()&&!mxEvent.isMouseEvent(ea)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(ea)&&(null==X.getState()||mxEvent.isControlDown(ea)||mxEvent.isShiftDown(ea))});f.cellEditor.editPlantUmlData=function(X,ea,ka){var ja=JSON.parse(ka);ea=new TextareaDialog(d,mxResources.get("plantUml")+
":",ja.data,function(U){null!=U&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(U,ja.format,function(I,V,Q){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==ja.format)f.labelChanged(X,"<pre>"+I+"</pre>"),f.updateCellSize(X,!0);else{f.setCellStyles("image",d.convertDataUri(I),[X]);var R=f.model.getGeometry(X);null!=R&&(R=R.clone(),R.width=V,R.height=Q,f.cellsResized([X],[R],!1))}f.setAttributeForCell(X,"plantUmlData",JSON.stringify({data:U,format:ja.format}))}finally{f.getModel().endUpdate()}},
function(I){d.handleError(I)})},null,null,400,220);d.showDialog(ea.container,420,300,!0,!0);ea.init()};f.cellEditor.editMermaidData=function(X,ea,ka){var ja=JSON.parse(ka);ea=new TextareaDialog(d,mxResources.get("mermaid")+":",ja.data,function(U){null!=U&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(U,ja.config,function(I,V,Q){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",I,[X]);var R=f.model.getGeometry(X);null!=R&&(R=R.clone(),R.width=
Math.max(R.width,V),R.height=Math.max(R.height,Q),f.cellsResized([X],[R],!1));f.setAttributeForCell(X,"mermaidData",JSON.stringify({data:U,config:ja.config},null,2))}finally{f.getModel().endUpdate()}},function(I){d.handleError(I)})},null,null,400,220);d.showDialog(ea.container,420,300,!0,!0);ea.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(X,ea){try{var ka=this.graph.getAttributeForCell(X,"plantUmlData");if(null!=ka)this.editPlantUmlData(X,ea,ka);else if(ka=this.graph.getAttributeForCell(X,
-"mermaidData"),null!=ka)this.editMermaidData(X,ea,ka);else{var ja=f.getCellStyle(X);"1"==mxUtils.getValue(ja,"metaEdit","0")?d.showDataDialog(X):g.apply(this,arguments)}}catch(U){d.handleError(U)}};f.getLinkTitle=function(X){return d.getLinkTitle(X)};f.customLinkClicked=function(X){var ea=!1;try{d.handleCustomLink(X),ea=!0}catch(ka){d.handleError(ka)}return ea};var l=f.parseBackgroundImage;f.parseBackgroundImage=function(X){var ea=l.apply(this,arguments);null!=ea&&null!=ea.src&&Graph.isPageLink(ea.src)&&
+"mermaidData"),null!=ka)this.editMermaidData(X,ea,ka);else{var ja=f.getCellStyle(X);"1"==mxUtils.getValue(ja,"metaEdit","0")?d.showDataDialog(X):g.apply(this,arguments)}}catch(U){d.handleError(U)}};f.getLinkTitle=function(X){return d.getLinkTitle(X)};f.customLinkClicked=function(X){var ea=!1;try{d.handleCustomLink(X),ea=!0}catch(ka){d.handleError(ka)}return ea};var m=f.parseBackgroundImage;f.parseBackgroundImage=function(X){var ea=m.apply(this,arguments);null!=ea&&null!=ea.src&&Graph.isPageLink(ea.src)&&
(ea={originalSrc:ea.src});return ea};var q=f.setBackgroundImage;f.setBackgroundImage=function(X){null!=X&&null!=X.originalSrc&&(X=d.createImageForPageLink(X.originalSrc,d.currentPage,this));q.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(X,ea){X=null!=f.backgroundImage?
f.backgroundImage.originalSrc:null;if(null!=X){var ka=X.indexOf(",");if(0<ka)for(X=X.substring(ka+1),ea=ea.getProperty("patches"),ka=0;ka<ea.length;ka++)if(null!=ea[ka][EditorUi.DIFF_UPDATE]&&null!=ea[ka][EditorUi.DIFF_UPDATE][X]||null!=ea[ka][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(ea[ka][EditorUi.DIFF_REMOVE],X)){f.refreshBackgroundImage();break}}}));var y=f.getBackgroundImageObject;f.getBackgroundImageObject=function(X,ea){var ka=y.apply(this,arguments);if(null!=ka&&null!=ka.originalSrc)if(!ea)ka=
{src:ka.originalSrc};else if(ea&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var ja=this.stylesheet,U=this.shapeForegroundColor,I=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";ka=d.createImageForPageLink(ka.originalSrc);this.shapeBackgroundColor=I;this.shapeForegroundColor=U;this.stylesheet=ja}return ka};var F=this.clearDefaultStyle;this.clearDefaultStyle=function(){F.apply(this,arguments)};
@@ -3625,15 +3629,15 @@ mxUtils.convertPoint(f.container,mxEvent.getClientX(X),mxEvent.getClientY(X)),ka
ka=document.createElement("div");ka.innerHTML=f.sanitizeHtml(R);var fa=null;ea=ka.getElementsByTagName("img");null!=ea&&1==ea.length?(R=ea[0].getAttribute("src"),null==R&&(R=ea[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(R)||(fa=!0)):(ea=ka.getElementsByTagName("a"),null!=ea&&1==ea.length?R=ea[0].getAttribute("href"):(ka=ka.getElementsByTagName("pre"),null!=ka&&1==ka.length&&(R=mxUtils.getTextContent(ka[0]))));var la=!0,ra=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(R,
I,V,!0,fa,null,la,mxEvent.isControlDown(X)))});fa&&null!=R&&R.length>this.resampleThreshold?this.confirmImageResize(function(u){la=u;ra()},mxEvent.isControlDown(X)):ra()}else null!=Q&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Q)?this.loadImage(decodeURIComponent(Q),mxUtils.bind(this,function(u){var J=Math.max(1,u.width);u=Math.max(1,u.height);var N=this.maxImageSize;N=Math.min(1,Math.min(N/Math.max(1,J)),N/Math.max(1,u));f.setSelectionCell(f.insertVertex(null,null,"",I,V,J*N,u*N,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
Q+";"))}),mxUtils.bind(this,function(u){f.setSelectionCells(this.insertTextAt(Q,I,V,!0))})):0<=mxUtils.indexOf(X.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(X.dataTransfer.getData("text/plain"),I,V,!0))}}X.stopPropagation();X.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",
-mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,l=!1,q=0;q<g.types.length;q++)if("text/"===g.types[q].substring(0,5)){l=!0;break}if(!l){var y=g.items;for(index in y){var F=y[index];if("file"===F.kind){if(d.isEditing())this.importFiles([F.getAsFile()],0,0,this.maxImageSize,function(H,G,aa,da,ba,Y){d.insertImage(H,ba,Y)},function(){},function(H){return"image/"==H.type.substring(0,6)},function(H){for(var G=0;G<H.length;G++)H[G]()});
+mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,m=!1,q=0;q<g.types.length;q++)if("text/"===g.types[q].substring(0,5)){m=!0;break}if(!m){var y=g.items;for(index in y){var F=y[index];if("file"===F.kind){if(d.isEditing())this.importFiles([F.getAsFile()],0,0,this.maxImageSize,function(H,G,aa,da,ba,Y){d.insertImage(H,ba,Y)},function(){},function(H){return"image/"==H.type.substring(0,6)},function(H){for(var G=0;G<H.length;G++)H[G]()});
else{var C=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],C.x,C.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(H){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck",
-"false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var l=!1;this.keyHandler.bindControlKey(88,
-null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(y){var F=mxEvent.getSource(y);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==F.nodeName||"TEXTAREA"==F.nodeName||224!=y.keyCode&&(mxClient.IS_MAC||17!=y.keyCode)&&(!mxClient.IS_MAC||91!=y.keyCode&&93!=y.keyCode)||l||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",
-f.container.appendChild(g),l=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(y){var F=y.keyCode;window.setTimeout(mxUtils.bind(this,function(){!l||224!=F&&17!=F&&91!=F&&93!=F||(l=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(y){if(f.isEnabled())try{mxClipboard.copy(f),
+"false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var m=!1;this.keyHandler.bindControlKey(88,
+null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(y){var F=mxEvent.getSource(y);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==F.nodeName||"TEXTAREA"==F.nodeName||224!=y.keyCode&&(mxClient.IS_MAC||17!=y.keyCode)&&(!mxClient.IS_MAC||91!=y.keyCode&&93!=y.keyCode)||m||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",
+f.container.appendChild(g),m=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(y){var F=y.keyCode;window.setTimeout(mxUtils.bind(this,function(){!m||224!=F&&17!=F&&91!=F&&93!=F||(m=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(y){if(f.isEnabled())try{mxClipboard.copy(f),
this.copyCells(g),d()}catch(F){this.handleError(F)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(y){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),d()}catch(F){this.handleError(F)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(y){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=y.clipboardData&&this.pasteCells(y,g,!0,!0),mxEvent.isConsumed(y)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(y,g,!1,
!0)}),0))}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(y){return mxEvent.getSource(y)==g?!0:q.apply(this,arguments)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setPagesVisible=
function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,f){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=
-d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=d){var f=function(l,q,y){null==l[q]&&(l[q]=y)},g=this.editor.graph;
+d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=d){var f=function(m,q,y){null==m[q]&&(m[q]=y)},g=this.editor.graph;
Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);f(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);f(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);f(g.defaultEdgeStyle,"edgeStyle","none");f(g.defaultEdgeStyle,"rounded","0");f(g.defaultEdgeStyle,"curved","1");f(g.defaultEdgeStyle,"jettySize","auto");f(g.defaultEdgeStyle,"orthogonalLoop",
"1");f(g.defaultEdgeStyle,"endArrow","open");f(g.defaultEdgeStyle,"endSize","14");f(g.defaultEdgeStyle,"startSize","14");d&&(f(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),f(g.defaultVertexStyle,"hachureGap","4"),f(g.defaultVertexStyle,"sketch","1"),f(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),f(g.defaultEdgeStyle,"sketch","1"),f(g.defaultEdgeStyle,"hachureGap",
"4"),f(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),f(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var g=d.indexOf(",");0<g&&(f=this.getPageById(d.substring(g+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==
@@ -3643,142 +3647,142 @@ mxUtils.bind(this,function(d,f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustom
mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);
this.addListener("gridColorChanged",mxUtils.bind(this,function(d,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
-this.editor.exportToCanvas(mxUtils.bind(this,function(l,q){try{this.spinner.stop();var y=this.createImageDataUri(l,f,"png"),F=parseInt(q.getAttribute("width")),C=parseInt(q.getAttribute("height"));this.writeImageToClipboard(y,F,C,mxUtils.bind(this,function(H){this.handleError(H)}))}catch(H){this.handleError(H)}}),null,null,null,mxUtils.bind(this,function(l){this.spinner.stop();this.handleError(l)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
-null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(l){this.handleError(l)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,l){var q=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":q,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](l)};EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerHTML="";else{var l=
-mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),q=mxUtils.getXml(g.encodeCells(l));mxUtils.setTextContent(d,encodeURIComponent(q));f?(g.removeCells(l,!1),g.lastPasteXml=null):(g.lastPasteXml=q,g.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),
-f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,l){var q=this.editor.graph,y=null;q.lastPasteXml==d?q.pasteCounter++:(q.lastPasteXml=d,q.pasteCounter=0);var F=q.pasteCounter*q.gridSize;if(g||this.isCompatibleString(d))y=this.importXml(d,F,F),q.setSelectionCells(y);else if(f&&1==q.getSelectionCount()){F=q.getStartEditingCell(q.getSelectionCell(),l);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==q.getCurrentCellStyle(F)[mxConstants.STYLE_SHAPE])q.setCellStyles(mxConstants.STYLE_IMAGE,
+this.editor.exportToCanvas(mxUtils.bind(this,function(m,q){try{this.spinner.stop();var y=this.createImageDataUri(m,f,"png"),F=parseInt(q.getAttribute("width")),C=parseInt(q.getAttribute("height"));this.writeImageToClipboard(y,F,C,mxUtils.bind(this,function(H){this.handleError(H)}))}catch(H){this.handleError(H)}}),null,null,null,mxUtils.bind(this,function(m){this.spinner.stop();this.handleError(m)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
+null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(m){this.handleError(m)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,m){var q=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":q,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](m)};EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerHTML="";else{var m=
+mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),q=mxUtils.getXml(g.encodeCells(m));mxUtils.setTextContent(d,encodeURIComponent(q));f?(g.removeCells(m,!1),g.lastPasteXml=null):(g.lastPasteXml=q,g.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),
+f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,m){var q=this.editor.graph,y=null;q.lastPasteXml==d?q.pasteCounter++:(q.lastPasteXml=d,q.pasteCounter=0);var F=q.pasteCounter*q.gridSize;if(g||this.isCompatibleString(d))y=this.importXml(d,F,F),q.setSelectionCells(y);else if(f&&1==q.getSelectionCount()){F=q.getStartEditingCell(q.getSelectionCell(),m);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==q.getCurrentCellStyle(F)[mxConstants.STYLE_SHAPE])q.setCellStyles(mxConstants.STYLE_IMAGE,
d,[F]);else{q.model.beginUpdate();try{q.labelChanged(F,d),Graph.isLink(d)&&q.setLinkForCell(F,d)}finally{q.model.endUpdate()}}q.setSelectionCell(F)}else y=q.getInsertPoint(),q.isMouseInsertPoint()&&(F=0,q.lastPasteXml==d&&0<q.pasteCounter&&q.pasteCounter--),y=this.insertTextAt(d,y.x+F,y.y+F,!0),q.setSelectionCells(y);q.isSelectionEmpty()||(q.scrollCellToVisible(q.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));return y};EditorUi.prototype.pasteCells=
-function(d,f,g,l){if(!mxEvent.isConsumed(d)){var q=f,y=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var F=d.clipboardData.getData("text/plain"),C=!1;if(null!=F&&0<F.length&&"%3CmxGraphModel%3E"==F.substring(0,18))try{var H=decodeURIComponent(F);this.isCompatibleString(H)&&(C=!0,F=H)}catch(da){}C=C?null:d.clipboardData.getData("text/html");null!=C&&0<C.length?(q=this.parseHtmlData(C),y="text/plain"!=q.getAttribute("data-type")):null!=F&&0<F.length&&(q=document.createElement("div"),mxUtils.setTextContent(q,
+function(d,f,g,m){if(!mxEvent.isConsumed(d)){var q=f,y=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var F=d.clipboardData.getData("text/plain"),C=!1;if(null!=F&&0<F.length&&"%3CmxGraphModel%3E"==F.substring(0,18))try{var H=decodeURIComponent(F);this.isCompatibleString(H)&&(C=!0,F=H)}catch(da){}C=C?null:d.clipboardData.getData("text/html");null!=C&&0<C.length?(q=this.parseHtmlData(C),y="text/plain"!=q.getAttribute("data-type")):null!=F&&0<F.length&&(q=document.createElement("div"),mxUtils.setTextContent(q,
C))}F=q.getElementsByTagName("span");if(null!=F&&0<F.length&&"application/vnd.lucid.chart.objects"===F[0].getAttribute("data-lucid-type"))g=F[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(da){var ba=this.editor.graph;ba.lastPasteXml==da?ba.pasteCounter++:(ba.lastPasteXml=da,ba.pasteCounter=0);var Y=ba.pasteCounter*ba.gridSize;ba.setSelectionCells(this.importXml(da,Y,Y));ba.scrollCellToVisible(ba.getSelectionCell())}),mxUtils.bind(this,
function(da){this.handleError(da)})),mxEvent.consume(d));else{y=y?q.innerHTML:mxUtils.trim(null==q.innerText?mxUtils.getTextContent(q):q.innerText);C=!1;try{var G=y.lastIndexOf("%3E");0<=G&&G<y.length-3&&(y=y.substring(0,G+3))}catch(da){}try{F=q.getElementsByTagName("span"),(H=null!=F&&0<F.length?mxUtils.trim(decodeURIComponent(F[0].textContent)):decodeURIComponent(y))&&(this.isCompatibleString(H)||0==H.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(C=!0,y=H)}catch(da){}try{if(null!=
-y&&0<y.length){if(0==y.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))try{"undefined"!==typeof MiroImporter&&(y=(new MiroImporter).importMiroJson(JSON.parse(y)))}catch(da){console.log("Miro import error:",da)}this.pasteXml(y,l,C,d);try{mxEvent.consume(d)}catch(da){}}else if(!g){var aa=this.editor.graph;aa.lastPasteXml=null;aa.pasteCounter=0}}catch(da){this.handleError(da)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=
-0;g<d.length;g++)mxEvent.addListener(d[g],"dragleave",function(l){null!=f&&(f.parentNode.removeChild(f),f=null);l.stopPropagation();l.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(l){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());l.stopPropagation();l.preventDefault()})),mxEvent.addListener(d[g],"drop",mxUtils.bind(this,function(l){null!=f&&(f.parentNode.removeChild(f),
-f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<l.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(l.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(l)&&!mxEvent.isShiftDown(l)):this.openFiles(l.dataTransfer.files,!0);else{var q=this.extractGraphModelFromEvent(l);if(null==q){var y=null!=l.dataTransfer?l.dataTransfer:l.clipboardData;null!=y&&(10==document.documentMode||11==document.documentMode?q=y.getData("Text"):
-(q=null,q=0<=mxUtils.indexOf(y.types,"text/uri-list")?l.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(y.types,"text/html")?y.getData("text/html"):null,null!=q&&0<q.length?(y=document.createElement("div"),y.innerHTML=this.editor.graph.sanitizeHtml(q),y=y.getElementsByTagName("img"),0<y.length&&(q=y[0].getAttribute("src"))):0<=mxUtils.indexOf(y.types,"text/plain")&&(q=y.getData("text/plain"))),null!=q&&(Editor.isPngDataUrl(q)?(q=Editor.extractGraphModelFromPng(q),null!=q&&0<q.length&&this.openLocalFile(q,
+y&&0<y.length){if(0==y.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))try{"undefined"!==typeof MiroImporter&&(y=(new MiroImporter).importMiroJson(JSON.parse(y)))}catch(da){console.log("Miro import error:",da)}this.pasteXml(y,m,C,d);try{mxEvent.consume(d)}catch(da){}}else if(!g){var aa=this.editor.graph;aa.lastPasteXml=null;aa.pasteCounter=0}}catch(da){this.handleError(da)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=
+0;g<d.length;g++)mxEvent.addListener(d[g],"dragleave",function(m){null!=f&&(f.parentNode.removeChild(f),f=null);m.stopPropagation();m.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(m){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());m.stopPropagation();m.preventDefault()})),mxEvent.addListener(d[g],"drop",mxUtils.bind(this,function(m){null!=f&&(f.parentNode.removeChild(f),
+f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<m.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(m.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(m)&&!mxEvent.isShiftDown(m)):this.openFiles(m.dataTransfer.files,!0);else{var q=this.extractGraphModelFromEvent(m);if(null==q){var y=null!=m.dataTransfer?m.dataTransfer:m.clipboardData;null!=y&&(10==document.documentMode||11==document.documentMode?q=y.getData("Text"):
+(q=null,q=0<=mxUtils.indexOf(y.types,"text/uri-list")?m.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(y.types,"text/html")?y.getData("text/html"):null,null!=q&&0<q.length?(y=document.createElement("div"),y.innerHTML=this.editor.graph.sanitizeHtml(q),y=y.getElementsByTagName("img"),0<y.length&&(q=y[0].getAttribute("src"))):0<=mxUtils.indexOf(y.types,"text/plain")&&(q=y.getData("text/plain"))),null!=q&&(Editor.isPngDataUrl(q)?(q=Editor.extractGraphModelFromPng(q),null!=q&&0<q.length&&this.openLocalFile(q,
null,!0)):this.isRemoteFileFormat(q)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(q))).send(mxUtils.bind(this,function(F){200<=F.getStatus()&&299>=F.getStatus()&&this.openLocalFile(F.getText(),null,!0)})):/^https?:\/\//.test(q)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(q):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+
-"/")+window.location.search+"#U"+encodeURIComponent(q)))))}else this.openLocalFile(q,null,!0)}l.stopPropagation();l.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var l=document.body;var q=document.documentElement;var y=(l.clientWidth||q.clientWidth)-3;l=Math.max(l.clientHeight||0,q.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,y=d.clientWidth,l=d.clientHeight;q=document.createElement("div");q.style.zIndex=mxPopupMenu.prototype.zIndex+2;q.style.border=
-"3px dotted rgb(254, 137, 12)";q.style.pointerEvents="none";q.style.position="absolute";q.style.top=f+"px";q.style.left=g+"px";q.style.width=Math.max(0,y-3)+"px";q.style.height=Math.max(0,l-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(q):document.body.appendChild(q);return q};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=f){var g=new mxCodec(f.ownerDocument),
-l=new mxGraphModel;g.decode(f,l);f=l.getChildAt(l.getRoot(),0);for(g=0;g<l.getChildCount(f);g++)d.push(l.getChildAt(f,g))}return d};EditorUi.prototype.openFileHandle=function(d,f,g,l,q){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var y=mxUtils.bind(this,function(C){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==C.substring(0,
-10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,l);try{this.loadLibrary(new LocalLibrary(this,C,f))}catch(H){this.handleError(H,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(C,f,l)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(C){this.spinner.stop();y(C)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(C){this.spinner.stop();
+"/")+window.location.search+"#U"+encodeURIComponent(q)))))}else this.openLocalFile(q,null,!0)}m.stopPropagation();m.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var m=document.body;var q=document.documentElement;var y=(m.clientWidth||q.clientWidth)-3;m=Math.max(m.clientHeight||0,q.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,y=d.clientWidth,m=d.clientHeight;q=document.createElement("div");q.style.zIndex=mxPopupMenu.prototype.zIndex+2;q.style.border=
+"3px dotted rgb(254, 137, 12)";q.style.pointerEvents="none";q.style.position="absolute";q.style.top=f+"px";q.style.left=g+"px";q.style.width=Math.max(0,y-3)+"px";q.style.height=Math.max(0,m-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(q):document.body.appendChild(q);return q};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=f){var g=new mxCodec(f.ownerDocument),
+m=new mxGraphModel;g.decode(f,m);f=m.getChildAt(m.getRoot(),0);for(g=0;g<m.getChildCount(f);g++)d.push(m.getChildAt(f,g))}return d};EditorUi.prototype.openFileHandle=function(d,f,g,m,q){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var y=mxUtils.bind(this,function(C){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==C.substring(0,
+10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,C,f))}catch(H){this.handleError(H,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(C,f,m)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(C){this.spinner.stop();y(C)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(C){this.spinner.stop();
y(C)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(C){4==C.readyState&&(this.spinner.stop(),200<=C.status&&299>=C.status?y(C.responseText):this.handleError({message:mxResources.get(413==C.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(C){this.spinner.stop();this.openLocalFile(C,f,l)}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,l);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else if(0==
-d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(C){this.spinner.stop();y(C)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,l)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==g.type){var F=Editor.extractGraphModelFromPdf(d);null!=F&&(q=null,l=!0,d=F)}this.spinner.stop();this.openLocalFile(d,f,l,q,null!=q?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=
-0;g<d.length;g++)mxUtils.bind(this,function(l){var q=new FileReader;q.onload=mxUtils.bind(this,function(y){try{this.openFileHandle(y.target.result,l.name,l,f)}catch(F){this.handleError(F)}});q.onerror=mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y);window.openFile=null});"image"!==l.type.substring(0,5)&&"application/pdf"!==l.type||"image/svg"===l.type.substring(0,9)?q.readAsText(l):q.readAsDataURL(l)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,l,q){var y=this.getCurrentFile(),
-F=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var C=mxUtils.parseXml(d);null!=C&&(this.editor.setGraphXml(C.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,d,f||this.defaultFilename,g,l,q))});if(null!=d&&0<d.length)null==y||!y.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=l)?F():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=l)&&null!=y&&y.isModified()?this.confirm(mxResources.get("allChangesLost"),
+(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(C){this.spinner.stop();this.openLocalFile(C,f,m)}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else if(0==
+d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(C){this.spinner.stop();y(C)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,m)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==g.type){var F=Editor.extractGraphModelFromPdf(d);null!=F&&(q=null,m=!0,d=F)}this.spinner.stop();this.openLocalFile(d,f,m,q,null!=q?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=
+0;g<d.length;g++)mxUtils.bind(this,function(m){var q=new FileReader;q.onload=mxUtils.bind(this,function(y){try{this.openFileHandle(y.target.result,m.name,m,f)}catch(F){this.handleError(F)}});q.onerror=mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y);window.openFile=null});"image"!==m.type.substring(0,5)&&"application/pdf"!==m.type||"image/svg"===m.type.substring(0,9)?q.readAsText(m):q.readAsDataURL(m)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,m,q){var y=this.getCurrentFile(),
+F=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var C=mxUtils.parseXml(d);null!=C&&(this.editor.setGraphXml(C.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,d,f||this.defaultFilename,g,m,q))});if(null!=d&&0<d.length)null==y||!y.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)?F():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)&&null!=y&&y.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(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=y&&y.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 d={};if(null!=this.pages)for(var f=
-0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=function(d,f){function g(F){if(null!=F){var C=F.lastIndexOf(".");0<C&&(F=F.substring(C+1,F.length));null==f[F]&&(f[F]=!0)}}var l=this.editor.graph,q=l.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(q[mxConstants.STYLE_SHAPE]));l.model.isEdge(d)&&
-(g(mxMarker.getPackageForType(q[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(q[mxConstants.STYLE_ENDARROW])));q=l.model.getChildCount(d);for(var y=0;y<q;y++)this.addBasenamesForCell(l.model.getChildAt(d,y),f)};EditorUi.prototype.setGraphEnabled=function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=
+0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=function(d,f){function g(F){if(null!=F){var C=F.lastIndexOf(".");0<C&&(F=F.substring(C+1,F.length));null==f[F]&&(f[F]=!0)}}var m=this.editor.graph,q=m.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(q[mxConstants.STYLE_SHAPE]));m.model.isEdge(d)&&
+(g(mxMarker.getPackageForType(q[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(q[mxConstants.STYLE_ENDARROW])));q=m.model.getChildCount(d);for(var y=0;y<q;y++)this.addBasenamesForCell(m.model.getChildAt(d,y),f)};EditorUi.prototype.setGraphEnabled=function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=
d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden");d||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=
-this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,l,q){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));
+this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,m,q){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));
if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(q)try{var y=this.editor.graph;y.setGridEnabled(!1);y.pageVisible=!1;var F=y.model.cells,C;for(C in F){var H=F[C];null!=H&&null!=H.style&&(H.style+=";sketch=1;"+(-1==H.style.indexOf("fontFamily=")||-1<H.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
-""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=l?l:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
+""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=m?m:!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(d,f){null!=d?d.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(d){var f=this.editor.graph;return{event:d,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var f=this.editor.graph;
-f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var l=f.background;if(null==l||l==mxConstants.NONE)l=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(q){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(q)}),"*")}),null,null,!0,l,1,this.embedExportBorder)}else d||
-g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,l=!1,q=null,y=mxUtils.bind(this,function(H,G){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&
+f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var m=f.background;if(null==m||m==mxConstants.NONE)m=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(q){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(q)}),"*")}),null,null,!0,m,1,this.embedExportBorder)}else d||
+g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,m=!1,q=null,y=mxUtils.bind(this,function(H,G){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,y);mxEvent.addListener(window,"message",mxUtils.bind(this,function(H){if(H.source==(window.opener||window.parent)){var G=H.data,aa=null,da=mxUtils.bind(this,function(P){if(null!=P&&"function"===typeof P.charAt&&"<"!=P.charAt(0))try{Editor.isPngDataUrl(P)?P=Editor.extractGraphModelFromPng(P):"data:image/svg+xml;base64,"==P.substring(0,26)?P=
atob(P.substring(26)):"data:image/svg+xml;utf8,"==P.substring(0,24)&&(P=P.substring(24)),null!=P&&("%"==P.charAt(0)?P=decodeURIComponent(P):"<"!=P.charAt(0)&&(P=Graph.decompress(P)))}catch(Z){}return P});if("json"==urlParams.proto){var ba=!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[H],"data",[G])}catch(P){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("layout"==G.action){this.executeLayoutList(G.layouts);return}if("prompt"==G.action){this.spinner.stop();var Y=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(P){null!=P?F.postMessage(JSON.stringify({event:"prompt",value:P,message:G}),"*"):F.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?
-mxResources.get(G.titleKey):G.title);this.showDialog(Y.container,300,80,!0,!1);Y.init();return}if("draft"==G.action){var qa=da(G.xml);this.spinner.stop();Y=new DraftDialog(this,mxResources.get("draftFound",[G.name||this.defaultFilename]),qa,mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();F.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();F.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),"*")}):null);this.showDialog(Y.container,640,480,!0,!1,mxUtils.bind(this,function(P){P&&this.actions.get("exit").funct()}));try{Y.init()}catch(P){F.postMessage(JSON.stringify({event:"draft",error:P.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var O=1==G.enableRecent,
-X=1==G.enableSearch,ea=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var ka=this.getCurrentUser(),ja=new TemplatesDialog(this,function(P,Z,oa){P=P||this.emptyDiagramXml;F.postMessage(JSON.stringify({event:"template",xml:P,blank:P==this.emptyDiagramXml,name:Z,tempUrl:oa.url,libs:oa.libs,builtIn:null!=oa.info&&null!=oa.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=ka?ka.id:null,O?mxUtils.bind(this,
-function(P,Z,oa){this.remoteInvoke("getRecentDiagrams",[oa],null,P,Z)}):null,X?mxUtils.bind(this,function(P,Z,oa,va){this.remoteInvoke("searchDiagrams",[P,va],null,Z,oa)}):null,mxUtils.bind(this,function(P,Z,oa){this.remoteInvoke("getFileContent",[P.url],null,Z,oa)}),null,ea?mxUtils.bind(this,function(P){this.remoteInvoke("getCustomTemplates",null,null,P,function(){P({},0)})}):null,!1,!1,!0,!0);this.showDialog(ja.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}Y=new NewDialog(this,
-!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(P,Z,oa,va){P=P||this.emptyDiagramXml;null!=G.callback?F.postMessage(JSON.stringify({event:"template",xml:P,blank:P==this.emptyDiagramXml,name:Z,tempUrl:oa,libs:va,builtIn:!0,message:G}),"*"):(d(P,H,P!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,O?mxUtils.bind(this,function(P){this.remoteInvoke("getRecentDiagrams",[null],null,P,function(){P(null,"Network Error!")})}):
-null,X?mxUtils.bind(this,function(P,Z){this.remoteInvoke("searchDiagrams",[P,null],null,Z,function(){Z(null,"Network Error!")})}):null,mxUtils.bind(this,function(P,Z,oa){F.postMessage(JSON.stringify({event:"template",docUrl:P,info:Z,name:oa}),"*")}),null,null,ea?mxUtils.bind(this,function(P){this.remoteInvoke("getCustomTemplates",null,null,P,function(){P({},0)})}):null,1==G.withoutType);this.showDialog(Y.container,620,460,!0,!1,mxUtils.bind(this,function(P){this.sidebar.hideTooltip();P&&this.actions.get("exit").funct()}));
-Y.init();return}if("textContent"==G.action){var U=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",data:U,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 I=null!=G.messageKey?mxResources.get(G.messageKey):G.message;null==
-G.show||G.show?this.spinner.spin(document.body,I):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct();return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=G.viewport);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);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 V=null!=G.xml?G.xml:this.getFileData(!0);
-this.editor.graph.setEnabled(!1);var Q=this.editor.graph,R=mxUtils.bind(this,function(P){this.editor.graph.setEnabled(!0);this.spinner.stop();var Z=this.createLoadMessage("export");Z.format=G.format;Z.message=G;Z.data=P;Z.xml=V;F.postMessage(JSON.stringify(Z),"*")}),fa=mxUtils.bind(this,function(P){null==P&&(P=Editor.blankImage);"xmlpng"==G.format&&(P=Editor.writeGraphModelToPng(P,"tEXt","mxfile",encodeURIComponent(V)));Q!=this.editor.graph&&Q.container.parentNode.removeChild(Q.container);R(P)}),
-la=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var ra=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=la){var P=Q.getGlobalVariable;Q=this.createTemporaryGraph(Q.getStylesheet());for(var Z,oa=0;oa<this.pages.length;oa++)if(this.pages[oa].getId()==la){Z=this.updatePageRoot(this.pages[oa]);break}null==Z&&(Z=this.currentPage);Q.getGlobalVariable=function(Ba){return"page"==Ba?Z.getName():"pagenumber"==
-Ba?1:P.apply(this,arguments)};document.body.appendChild(Q.container);Q.model.setRoot(Z.root)}if(null!=G.layerIds){var va=Q.model,Aa=va.getChildCells(va.getRoot()),sa={};for(oa=0;oa<G.layerIds.length;oa++)sa[G.layerIds[oa]]=!0;for(oa=0;oa<Aa.length;oa++)va.setVisible(Aa[oa],sa[Aa[oa].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ba){fa(Ba.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){fa(null)}),null,null,G.scale,G.transparent,G.shadow,null,Q,G.border,
-null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length?(g=!0,this.setFileData(V),g=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(ra)},0):ra()):ra()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=la?"&pageId="+la:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(V))).send(mxUtils.bind(this,
+G.message,null!=G.buttonKey?mxResources.get(G.buttonKey):G.button);null!=G.modified&&(this.editor.modified=G.modified);return}if("layout"==G.action){this.executeLayouts(this.editor.graph.createLayouts(G.layouts));return}if("prompt"==G.action){this.spinner.stop();var Y=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(P){null!=P?F.postMessage(JSON.stringify({event:"prompt",value:P,message:G}),"*"):F.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),
+"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title);this.showDialog(Y.container,300,80,!0,!1);Y.init();return}if("draft"==G.action){var qa=da(G.xml);this.spinner.stop();Y=new DraftDialog(this,mxResources.get("draftFound",[G.name||this.defaultFilename]),qa,mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();F.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();F.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),"*")}):null);this.showDialog(Y.container,640,480,!0,!1,mxUtils.bind(this,function(P){P&&this.actions.get("exit").funct()}));try{Y.init()}catch(P){F.postMessage(JSON.stringify({event:"draft",error:P.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();
+var O=1==G.enableRecent,X=1==G.enableSearch,ea=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var ka=this.getCurrentUser(),ja=new TemplatesDialog(this,function(P,Z,oa){P=P||this.emptyDiagramXml;F.postMessage(JSON.stringify({event:"template",xml:P,blank:P==this.emptyDiagramXml,name:Z,tempUrl:oa.url,libs:oa.libs,builtIn:null!=oa.info&&null!=oa.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=
+ka?ka.id:null,O?mxUtils.bind(this,function(P,Z,oa){this.remoteInvoke("getRecentDiagrams",[oa],null,P,Z)}):null,X?mxUtils.bind(this,function(P,Z,oa,va){this.remoteInvoke("searchDiagrams",[P,va],null,Z,oa)}):null,mxUtils.bind(this,function(P,Z,oa){this.remoteInvoke("getFileContent",[P.url],null,Z,oa)}),null,ea?mxUtils.bind(this,function(P){this.remoteInvoke("getCustomTemplates",null,null,P,function(){P({},0)})}):null,!1,!1,!0,!0);this.showDialog(ja.container,window.innerWidth,window.innerHeight,!0,
+!1,null,!1,!0);return}Y=new NewDialog(this,!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(P,Z,oa,va){P=P||this.emptyDiagramXml;null!=G.callback?F.postMessage(JSON.stringify({event:"template",xml:P,blank:P==this.emptyDiagramXml,name:Z,tempUrl:oa,libs:va,builtIn:!0,message:G}),"*"):(d(P,H,P!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,O?mxUtils.bind(this,function(P){this.remoteInvoke("getRecentDiagrams",[null],
+null,P,function(){P(null,"Network Error!")})}):null,X?mxUtils.bind(this,function(P,Z){this.remoteInvoke("searchDiagrams",[P,null],null,Z,function(){Z(null,"Network Error!")})}):null,mxUtils.bind(this,function(P,Z,oa){F.postMessage(JSON.stringify({event:"template",docUrl:P,info:Z,name:oa}),"*")}),null,null,ea?mxUtils.bind(this,function(P){this.remoteInvoke("getCustomTemplates",null,null,P,function(){P({},0)})}):null,1==G.withoutType);this.showDialog(Y.container,620,460,!0,!1,mxUtils.bind(this,function(P){this.sidebar.hideTooltip();
+P&&this.actions.get("exit").funct()}));Y.init();return}if("textContent"==G.action){var U=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",data:U,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 I=null!=G.messageKey?mxResources.get(G.messageKey):
+G.message;null==G.show||G.show?this.spinner.spin(document.body,I):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct();return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=G.viewport);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);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 V=null!=G.xml?G.xml:
+this.getFileData(!0);this.editor.graph.setEnabled(!1);var Q=this.editor.graph,R=mxUtils.bind(this,function(P){this.editor.graph.setEnabled(!0);this.spinner.stop();var Z=this.createLoadMessage("export");Z.format=G.format;Z.message=G;Z.data=P;Z.xml=V;F.postMessage(JSON.stringify(Z),"*")}),fa=mxUtils.bind(this,function(P){null==P&&(P=Editor.blankImage);"xmlpng"==G.format&&(P=Editor.writeGraphModelToPng(P,"tEXt","mxfile",encodeURIComponent(V)));Q!=this.editor.graph&&Q.container.parentNode.removeChild(Q.container);
+R(P)}),la=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var ra=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=la){var P=Q.getGlobalVariable;Q=this.createTemporaryGraph(Q.getStylesheet());for(var Z,oa=0;oa<this.pages.length;oa++)if(this.pages[oa].getId()==la){Z=this.updatePageRoot(this.pages[oa]);break}null==Z&&(Z=this.currentPage);Q.getGlobalVariable=function(Ba){return"page"==Ba?Z.getName():
+"pagenumber"==Ba?1:P.apply(this,arguments)};document.body.appendChild(Q.container);Q.model.setRoot(Z.root)}if(null!=G.layerIds){var va=Q.model,Aa=va.getChildCells(va.getRoot()),sa={};for(oa=0;oa<G.layerIds.length;oa++)sa[G.layerIds[oa]]=!0;for(oa=0;oa<Aa.length;oa++)va.setVisible(Aa[oa],sa[Aa[oa].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ba){fa(Ba.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){fa(null)}),null,null,G.scale,G.transparent,G.shadow,
+null,Q,G.border,null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length?(g=!0,this.setFileData(V),g=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(ra)},0):ra()):ra()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=la?"&pageId="+la:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(V))).send(mxUtils.bind(this,
function(P){200<=P.getStatus()&&299>=P.getStatus()?R("data:image/png;base64,"+P.getText()):fa(null)}),mxUtils.bind(this,function(){fa(null)}))}}else ra=mxUtils.bind(this,function(){var P=this.createLoadMessage("export");P.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Z=this.getXmlFileData();P.xml=mxUtils.getXml(Z);P.data=this.getFileData(null,null,!0,null,null,null,Z);P.format=G.format}else if("html"==G.format)Z=this.editor.getGraphXml(),
P.data=this.getHtml(Z,this.editor.graph),P.xml=mxUtils.getXml(Z),P.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;Z=null!=G.background?G.background:this.editor.graph.background;Z==mxConstants.NONE&&(Z=null);P.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);P.format="svg";var oa=mxUtils.bind(this,function(va){this.editor.graph.setEnabled(!0);this.spinner.stop();P.data=Editor.createSvgDataUri(va);F.postMessage(JSON.stringify(P),"*")});if("xmlsvg"==G.format)(null==G.spin&&
null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))&&this.getEmbeddedSvg(P.xml,this.editor.graph,null,!0,oa,null,null,G.embedImages,Z,G.scale,G.border,G.shadow,G.keepTheme);else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))this.editor.graph.setEnabled(!1),Z=this.editor.graph.getSvg(Z,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,null,G.keepTheme),
(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(Z),this.embedFonts(Z,mxUtils.bind(this,function(va){G.embedImages||null==G.embedImages?this.editor.convertImages(va,mxUtils.bind(this,function(Aa){oa(mxUtils.getXml(Aa))})):oa(mxUtils.getXml(va))}));return}F.postMessage(JSON.stringify(P),"*")}),null!=G.xml&&0<G.xml.length?(g=!0,this.setFileData(G.xml),g=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(ra)},0):ra()):ra();return}if("load"==
-G.action){ba=G.toSketch;l=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.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var u=Editor.sketchMode;this.doSetSketchMode(G.rough);u!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=G.dark&&(u=Editor.darkMode,this.doSetDarkMode(G.dark),
+G.action){ba=G.toSketch;m=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.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var u=Editor.sketchMode;this.doSetSketchMode(G.rough);u!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=G.dark&&(u=Editor.darkMode,this.doSetDarkMode(G.dark),
u!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=G.border&&(this.embedExportBorder=G.border);null!=G.background&&(this.embedExportBackground=G.background);null!=G.viewport&&(this.embedViewport=G.viewport);this.embedExitPoint=null;if(null!=G.rect){var J=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=G.rect.top+"px";this.diagramContainer.style.left=G.rect.left+"px";this.diagramContainer.style.height=G.rect.height+
"px";this.diagramContainer.style.width=G.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";aa=mxUtils.bind(this,function(){var P=this.editor.graph,Z=P.maxFitScale;P.maxFitScale=G.maxFitScale;P.fit(2*J);P.maxFitScale=Z;P.container.scrollTop-=2*J;P.container.scrollLeft-=2*J;this.fireEvent(new mxEventObject("editInlineStart","data",[G]))})}null!=G.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=G.noExitBtn);null!=G.title&&null!=this.buttonContainer&&
(qa=document.createElement("span"),mxUtils.write(qa,G.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(qa),this.embedFilenameSpan=qa);try{G.libs&&this.sidebar.showEntries(G.libs)}catch(P){}G=null!=G.xmlpng?this.extractGraphModelFromPng(G.xmlpng):null!=G.descriptor?G.descriptor:G.xml}else{if("merge"==G.action){var N=this.getCurrentFile();null!=N&&(qa=da(G.xml),null!=qa&&""!=qa&&N.mergeFile(new LocalFile(this,
qa),function(){F.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(P){F.postMessage(JSON.stringify({event:"merge",message:G,error:P}),"*")}))}else"remoteInvokeReady"==G.action?this.handleRemoteInvokeReady(F):"remoteInvoke"==G.action?this.handleRemoteInvoke(G,H.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):F.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(P){this.handleError(P)}}var W=mxUtils.bind(this,
-function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),S=mxUtils.bind(this,function(P,Z){g=!0;try{d(P,Z,null,ba)}catch(oa){this.handleError(oa)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");q=W();l&&null==f&&(f=mxUtils.bind(this,function(oa,va){oa=W();oa==q||g||(va=this.createLoadMessage("autosave"),va.xml=oa,(window.opener||window.parent).postMessage(JSON.stringify(va),"*"));q=oa}),this.editor.graph.model.addListener(mxEvent.CHANGE,
+function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),S=mxUtils.bind(this,function(P,Z){g=!0;try{d(P,Z,null,ba)}catch(oa){this.handleError(oa)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");q=W();m&&null==f&&(f=mxUtils.bind(this,function(oa,va){oa=W();oa==q||g||(va=this.createLoadMessage("autosave"),va.xml=oa,(window.opener||window.parent).postMessage(JSON.stringify(va),"*"));q=oa}),this.editor.graph.model.addListener(mxEvent.CHANGE,
f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||
"json"==urlParams.proto)Z=this.createLoadMessage("load"),Z.xml=P,F.postMessage(JSON.stringify(Z),"*");null!=aa&&aa()});null!=G&&"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,34)?(da="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(P){S(P,H)},mxUtils.bind(this,function(P){this.handleError(P)}),da)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,
"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G,mxUtils.bind(this,function(P){4==P.readyState&&200<=P.status&&299>=P.status&&"<mxGraphModel"==P.responseText.substring(0,13)&&S(P.responseText,H)}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(P){S(P)}),mxUtils.bind(this,function(P){this.handleError(P)})):null==G||"object"!==typeof G||null==G.format||null==
G.data&&null==G.url?(G=da(G),S(G,H)):this.loadDescriptor(G,mxUtils.bind(this,function(P){S(W(),H)}),mxUtils.bind(this,function(P){this.handleError(P,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;y="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(y,"*");if("json"==urlParams.proto){var C=this.editor.graph.openLink;this.editor.graph.openLink=function(H,G,aa){C.apply(this,arguments);F.postMessage(JSON.stringify({event:"openLink",
-href:H,target:G,allowOpener:aa}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"2px":"0px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";var f=document.createElement("button");f.className="geBigButton";var g=f;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var l="1"==
-urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(f,l);f.setAttribute("title",l);mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),d.appendChild(f),"1"==urlParams.saveAndExit&&
+href:H,target:G,allowOpener:aa}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"2px":"0px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";var f=document.createElement("button");f.className="geBigButton";var g=f;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var m="1"==
+urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(f,m);f.setAttribute("title",m);mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),d.appendChild(f),"1"==urlParams.saveAndExit&&
(f=document.createElement("a"),mxUtils.write(f,mxResources.get("saveAndExit")),f.setAttribute("title",mxResources.get("saveAndExit")),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(f),g=f);"1"!=urlParams.noExitBtn&&(f=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(f,g),f.setAttribute("title",
g),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(f),g=f);g.style.marginRight="20px";this.toolbar.container.appendChild(d);this.toolbar.staticElements.push(d);d.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"42px":"52px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+
-":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(d,f){for(var g=this.editor.graph,l=g.getSelectionCells(),q=0;q<d.length;q++){var y=new window[d[q].layout](g);if(null!=d[q].config)for(var F in d[q].config)y[F]=
-d[q].config[F];this.executeLayout(function(){y.execute(g.getDefaultParent(),0==l.length?null:l)},q==d.length-1,f)}};EditorUi.prototype.importCsv=function(d,f){try{var g=d.split("\n"),l=[],q=[],y=[],F={};if(0<g.length){var C={},H=this.editor.graph,G=null,aa=null,da=null,ba=null,Y=null,qa=null,O=null,X="whiteSpace=wrap;html=1;",ea=null,ka=null,ja="",U="auto",I="auto",V=null,Q=null,R=40,fa=40,la=100,ra=0,u=function(){null!=f?f(ma):(H.setSelectionCells(ma),H.scrollCellToVisible(H.getSelectionCell()))},
-J=H.getFreeInsertPoint(),N=J.x,W=J.y;J=W;var S=null,P="auto";ka=null;for(var Z=[],oa=null,va=null,Aa=0;Aa<g.length&&"#"==g[Aa].charAt(0);){d=g[Aa].replace(/\r$/,"");for(Aa++;Aa<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Aa].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Aa].substring(1)),Aa++;if("#"!=d.charAt(1)){var sa=d.indexOf(":");if(0<sa){var Ba=mxUtils.trim(d.substring(1,sa)),ta=mxUtils.trim(d.substring(sa+1));"label"==Ba?S=H.sanitizeHtml(ta):"labelname"==Ba&&0<ta.length&&"-"!=ta?Y=
-ta:"labels"==Ba&&0<ta.length&&"-"!=ta?O=JSON.parse(ta):"style"==Ba?aa=ta:"parentstyle"==Ba?X=ta:"unknownStyle"==Ba&&"-"!=ta?qa=ta:"stylename"==Ba&&0<ta.length&&"-"!=ta?ba=ta:"styles"==Ba&&0<ta.length&&"-"!=ta?da=JSON.parse(ta):"vars"==Ba&&0<ta.length&&"-"!=ta?G=JSON.parse(ta):"identity"==Ba&&0<ta.length&&"-"!=ta?ea=ta:"parent"==Ba&&0<ta.length&&"-"!=ta?ka=ta:"namespace"==Ba&&0<ta.length&&"-"!=ta?ja=ta:"width"==Ba?U=ta:"height"==Ba?I=ta:"left"==Ba&&0<ta.length?V=ta:"top"==Ba&&0<ta.length?Q=ta:"ignore"==
-Ba?va=ta.split(","):"connect"==Ba?Z.push(JSON.parse(ta)):"link"==Ba?oa=ta:"padding"==Ba?ra=parseFloat(ta):"edgespacing"==Ba?R=parseFloat(ta):"nodespacing"==Ba?fa=parseFloat(ta):"levelspacing"==Ba?la=parseFloat(ta):"layout"==Ba&&(P=ta)}}}if(null==g[Aa])throw Error(mxResources.get("invalidOrMissingFile"));var Na=this.editor.csvToArray(g[Aa].replace(/\r$/,""));sa=d=null;Ba=[];for(ta=0;ta<Na.length;ta++)ea==Na[ta]&&(d=ta),ka==Na[ta]&&(sa=ta),Ba.push(mxUtils.trim(Na[ta]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,
-"").replace(/_+$/,""));null==S&&(S="%"+Ba[0]+"%");if(null!=Z)for(var Ca=0;Ca<Z.length;Ca++)null==C[Z[Ca].to]&&(C[Z[Ca].to]={});ea=[];for(ta=Aa+1;ta<g.length;ta++){var Qa=this.editor.csvToArray(g[ta].replace(/\r$/,""));if(null==Qa){var Ua=40<g[ta].length?g[ta].substring(0,40)+"...":g[ta];throw Error(Ua+" ("+ta+"):\n"+mxResources.get("containsValidationErrors"));}0<Qa.length&&ea.push(Qa)}H.model.beginUpdate();try{for(ta=0;ta<ea.length;ta++){Qa=ea[ta];var Ka=null,bb=null!=d?ja+Qa[d]:null;null!=bb&&(Ka=
-H.model.getCell(bb));g=null!=Ka;var Va=new mxCell(S,new mxGeometry(N,J,0,0),aa||"whiteSpace=wrap;html=1;");Va.vertex=!0;Va.id=bb;Ua=null!=Ka?Ka:Va;for(var $a=0;$a<Qa.length;$a++)H.setAttributeForCell(Ua,Ba[$a],Qa[$a]);if(null!=Y&&null!=O){var z=O[Ua.getAttribute(Y)];null!=z&&H.labelChanged(Ua,z)}if(null!=ba&&null!=da){var L=da[Ua.getAttribute(ba)];null!=L&&(Ua.style=L)}H.setAttributeForCell(Ua,"placeholders","1");Ua.style=H.replacePlaceholders(Ua,Ua.style,G);g?(0>mxUtils.indexOf(y,Ka)&&y.push(Ka),
-H.fireEvent(new mxEventObject("cellsInserted","cells",[Ka]))):H.fireEvent(new mxEventObject("cellsInserted","cells",[Va]));Ka=Va;if(!g)for(Ca=0;Ca<Z.length;Ca++)C[Z[Ca].to][Ka.getAttribute(Z[Ca].to)]=Ka;null!=oa&&"link"!=oa&&(H.setLinkForCell(Ka,Ka.getAttribute(oa)),H.setAttributeForCell(Ka,oa,null));var M=this.editor.graph.getPreferredSizeForCell(Ka);ka=null!=sa?H.model.getCell(ja+Qa[sa]):null;if(Ka.vertex){Ua=null!=ka?0:N;Aa=null!=ka?0:W;null!=V&&null!=Ka.getAttribute(V)&&(Ka.geometry.x=Ua+parseFloat(Ka.getAttribute(V)));
-null!=Q&&null!=Ka.getAttribute(Q)&&(Ka.geometry.y=Aa+parseFloat(Ka.getAttribute(Q)));var T="@"==U.charAt(0)?Ka.getAttribute(U.substring(1)):null;Ka.geometry.width=null!=T&&"auto"!=T?parseFloat(Ka.getAttribute(U.substring(1))):"auto"==U||"auto"==T?M.width+ra:parseFloat(U);var ca="@"==I.charAt(0)?Ka.getAttribute(I.substring(1)):null;Ka.geometry.height=null!=ca&&"auto"!=ca?parseFloat(ca):"auto"==I||"auto"==ca?M.height+ra:parseFloat(I);J+=Ka.geometry.height+fa}g?(null==F[bb]&&(F[bb]=[]),F[bb].push(Ka)):
-(l.push(Ka),null!=ka?(ka.style=H.replacePlaceholders(ka,X,G),H.addCell(Ka,ka),q.push(ka)):y.push(H.addCell(Ka)))}for(ta=0;ta<q.length;ta++)T="@"==U.charAt(0)?q[ta].getAttribute(U.substring(1)):null,ca="@"==I.charAt(0)?q[ta].getAttribute(I.substring(1)):null,"auto"!=U&&"auto"!=T||"auto"!=I&&"auto"!=ca||H.updateGroupBounds([q[ta]],ra,!0);var ia=y.slice(),ma=y.slice();for(Ca=0;Ca<Z.length;Ca++){var pa=Z[Ca];for(ta=0;ta<l.length;ta++){Ka=l[ta];var ua=mxUtils.bind(this,function(Ea,La,Ta){var Wa=La.getAttribute(Ta.from);
-if(null!=Wa&&""!=Wa){Wa=Wa.split(",");for(var fb=0;fb<Wa.length;fb++){var gb=C[Ta.to][Wa[fb]];if(null==gb&&null!=qa){gb=new mxCell(Wa[fb],new mxGeometry(N,W,0,0),qa);gb.style=H.replacePlaceholders(La,gb.style,G);var ib=this.editor.graph.getPreferredSizeForCell(gb);gb.geometry.width=ib.width+ra;gb.geometry.height=ib.height+ra;C[Ta.to][Wa[fb]]=gb;gb.vertex=!0;gb.id=Wa[fb];y.push(H.addCell(gb))}if(null!=gb){ib=Ta.label;null!=Ta.fromlabel&&(ib=(La.getAttribute(Ta.fromlabel)||"")+(ib||""));null!=Ta.sourcelabel&&
-(ib=H.replacePlaceholders(La,Ta.sourcelabel,G)+(ib||""));null!=Ta.tolabel&&(ib=(ib||"")+(gb.getAttribute(Ta.tolabel)||""));null!=Ta.targetlabel&&(ib=(ib||"")+H.replacePlaceholders(gb,Ta.targetlabel,G));var tb="target"==Ta.placeholders==!Ta.invert?gb:Ea;tb=null!=Ta.style?H.replacePlaceholders(tb,Ta.style,G):H.createCurrentEdgeStyle();ib=H.insertEdge(null,null,ib||"",Ta.invert?gb:Ea,Ta.invert?Ea:gb,tb);if(null!=Ta.labels)for(tb=0;tb<Ta.labels.length;tb++){var qb=Ta.labels[tb],cb=new mxCell(qb.label||
-tb,new mxGeometry(null!=qb.x?qb.x:0,null!=qb.y?qb.y:0,0,0),"resizable=0;html=1;");cb.vertex=!0;cb.connectable=!1;cb.geometry.relative=!0;null!=qb.placeholders&&(cb.value=H.replacePlaceholders("target"==qb.placeholders==!Ta.invert?gb:Ea,cb.value,G));if(null!=qb.dx||null!=qb.dy)cb.geometry.offset=new mxPoint(null!=qb.dx?qb.dx:0,null!=qb.dy?qb.dy:0);ib.insert(cb)}ma.push(ib);mxUtils.remove(Ta.invert?Ea:gb,ia)}}}});ua(Ka,Ka,pa);if(null!=F[Ka.id])for($a=0;$a<F[Ka.id].length;$a++)ua(Ka,F[Ka.id][$a],pa)}}if(null!=
-va)for(ta=0;ta<l.length;ta++)for(Ka=l[ta],$a=0;$a<va.length;$a++)H.setAttributeForCell(Ka,mxUtils.trim(va[$a]),null);if(0<y.length){var ya=new mxParallelEdgeLayout(H);ya.spacing=R;ya.checkOverlap=!0;var Fa=function(){0<ya.spacing&&ya.execute(H.getDefaultParent());for(var Ea=0;Ea<y.length;Ea++){var La=H.getCellGeometry(y[Ea]);La.x=Math.round(H.snap(La.x));La.y=Math.round(H.snap(La.y));"auto"==U&&(La.width=Math.round(H.snap(La.width)));"auto"==I&&(La.height=Math.round(H.snap(La.height)))}};if("["==
-P.charAt(0)){var Ma=u;H.view.validate();this.executeLayoutList(JSON.parse(P),function(){Fa();Ma()});u=null}else if("circle"==P){var Oa=new mxCircleLayout(H);Oa.disableEdgeStyle=!1;Oa.resetEdges=!1;var Pa=Oa.isVertexIgnored;Oa.isVertexIgnored=function(Ea){return Pa.apply(this,arguments)||0>mxUtils.indexOf(y,Ea)};this.executeLayout(function(){Oa.execute(H.getDefaultParent());Fa()},!0,u);u=null}else if("horizontaltree"==P||"verticaltree"==P||"auto"==P&&ma.length==2*y.length-1&&1==ia.length){H.view.validate();
-var Sa=new mxCompactTreeLayout(H,"horizontaltree"==P);Sa.levelDistance=fa;Sa.edgeRouting=!1;Sa.resetEdges=!1;this.executeLayout(function(){Sa.execute(H.getDefaultParent(),0<ia.length?ia[0]:null)},!0,u);u=null}else if("horizontalflow"==P||"verticalflow"==P||"auto"==P&&1==ia.length){H.view.validate();var za=new mxHierarchicalLayout(H,"horizontalflow"==P?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);za.intraCellSpacing=fa;za.parallelEdgeSpacing=R;za.interRankCellSpacing=la;za.disableEdgeStyle=
-!1;this.executeLayout(function(){za.execute(H.getDefaultParent(),ma);H.moveCells(ma,N,W)},!0,u);u=null}else if("organic"==P||"auto"==P&&ma.length>y.length){H.view.validate();var wa=new mxFastOrganicLayout(H);wa.forceConstant=3*fa;wa.disableEdgeStyle=!1;wa.resetEdges=!1;var Da=wa.isVertexIgnored;wa.isVertexIgnored=function(Ea){return Da.apply(this,arguments)||0>mxUtils.indexOf(y,Ea)};this.executeLayout(function(){wa.execute(H.getDefaultParent());Fa()},!0,u);u=null}}this.hideDialog()}finally{H.model.endUpdate()}null!=
-u&&u()}}catch(Ea){this.handleError(Ea)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",l;for(l in urlParams)0>mxUtils.indexOf(d,l)&&null!=urlParams[l]&&(f+=g+l+"="+urlParams[l],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
-l;for(l in urlParams)0>mxUtils.indexOf(g,l)&&(d=0==f?d+"?":d+"&",null!=urlParams[l]&&(d+=l+"="+urlParams[l],f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,l,q){d=new LinkDialog(this,d,f,g,!0,l,q);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
-f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;d&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);
-this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);
-this.actions.get("resetView").setEnabled(f);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};
-EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var t=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){t.apply(this,arguments);var d=this.editor.graph,
-f=this.getCurrentFile(),g=this.getSelectionState(),l=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(l);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(l);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(l);this.actions.get("connectionArrows").setEnabled(l);this.actions.get("connectionPoints").setEnabled(l);this.actions.get("copyStyle").setEnabled(l&&!d.isSelectionEmpty());
-this.actions.get("pasteStyle").setEnabled(l&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(l);this.actions.get("createRevision").setEnabled(l);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(l&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=
-this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);
-f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"")+"...";d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(l&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var E=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);E.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=
-!1,ExportDialog.exportFile=function(d,f,g,l,q,y,F,C){var H=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,"svg",mxUtils.getXml(H.getSvg(l,q,y)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),aa=H.getGraphBounds(),da=Math.floor(aa.width*q/H.view.scale),ba=Math.floor(aa.height*q/H.view.scale);if(G.length<=MAX_REQUEST_SIZE&&da*ba<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=
-g&&"jpeg"!=g||!d.isExportToCanvas()){var Y={globalVars:H.getExportVariables()};C&&(Y.grid={size:H.gridSize,steps:H.view.gridSteps,color:H.view.gridColor});d.saveRequest(f,g,function(qa,O){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(O||"0")+(null!=qa?"&filename="+encodeURIComponent(qa):"")+"&extras="+encodeURIComponent(JSON.stringify(Y))+(0<F?"&dpi="+F:"")+"&bg="+(null!=l?l:"none")+"&w="+da+"&h="+ba+"&border="+y+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(q,null==l||
-"none"==l,!0,!1,!1,y,!0,!1,null,C,F):d.exportImage(q,!1,!0,!1,!1,y,!0,!1,"jpeg",C);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var l=d;this.currentPage!=this.pages[g]&&(l=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),l.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+
-l.getIndexableText()+" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l,mxUtils.htmlEntities(d));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(l);var q=document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";
-q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var y={};try{var F=mxSettings.getCustomLibraries();for(d=0;d<F.length;d++){var C=F[d];if("R"==C.substring(0,1)){var H=JSON.parse(decodeURIComponent(C.substring(1)));y[H[0]]={id:H[0],title:H[1],downloadUrl:H[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){q.innerHTML="";if(0==G.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+
-"</div>";else for(var aa=0;aa<G.length;aa++){var da=G[aa];y[da.id]&&(f[da.id]=da);var ba=this.addCheckbox(q,da.title,y[da.id]);(function(Y,qa){mxEvent.addListener(qa,"change",function(){this.checked?f[Y.id]=Y:delete f[Y.id]})})(da,ba)}},mxUtils.bind(this,function(G){q.innerHTML="";var aa=document.createElement("div");aa.style.padding="8px";aa.style.textAlign="center";mxUtils.write(aa,mxResources.get("error")+": ");mxUtils.write(aa,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));
-q.appendChild(aa)}));g.appendChild(q);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,aa;for(aa in f)null==y[aa]&&(G++,mxUtils.bind(this,function(da){this.remoteInvoke("getFileContent",[da.downloadUrl],null,mxUtils.bind(this,function(ba){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ba,da))}catch(Y){this.handleError(Y,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&
-this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[aa]));for(aa in y)f[aa]||this.closeLibrary(new RemoteLibrary(this,null,y[aa]));0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,
-allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==
-g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,l,q){var y=!0,F=window.setTimeout(mxUtils.bind(this,function(){y=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),C=mxUtils.bind(this,function(){window.clearTimeout(F);y&&l.apply(this,arguments)}),H=mxUtils.bind(this,function(){window.clearTimeout(F);
-y&&q.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:C,error:H});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,aa){var da={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=aa?da.error={errResp:aa}:null!=G&&
-(da.resp=G);this.remoteWin.postMessage(JSON.stringify(da),"*")});try{var l=d.funtionName,q=this.remoteInvokableFns[l];if(null!=q&&"function"===typeof this[l]){if(q.allowedDomains){for(var y=!1,F=0;F<q.allowedDomains.length;F++)if(f=="https://"+q.allowedDomains[F]){y=!0;break}if(!y){g(null,"Invalid Call: "+l+" is not allowed.");return}}var C=d.functionArgs;Array.isArray(C)||(C=[]);if(q.isAsync)C.push(function(){g(Array.prototype.slice.apply(arguments))}),C.push(function(G){g(null,G||"Unkown Error")}),
-this[l].apply(this,C);else{var H=this[l].apply(this,C);g([H])}}else g(null,"Invalid Call: "+l+" is not found.")}catch(G){g(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var l=g.open("database",2);l.onupgradeneeded=function(q){try{var y=l.result;1>q.oldVersion&&y.createObjectStore("objects",{keyPath:"key"});2>q.oldVersion&&(y.createObjectStore("files",
-{keyPath:"title"}),y.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(F){null!=f&&f(F)}};l.onsuccess=mxUtils.bind(this,function(q){var y=l.result;this.database=y;EditorUi.migrateStorageFiles&&(StorageFile.migrate(y),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(F){if(!F||"1"==urlParams.forceMigration){var C=
-document.createElement("iframe");C.style.display="none";C.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(C);var H=!0,G=!1,aa,da=0,ba=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),Y=mxUtils.bind(this,function(){da++;qa()}),qa=mxUtils.bind(this,function(){try{if(da>=aa.length)ba();else{var X=
-aa[da];StorageFile.getFileContent(this,X,mxUtils.bind(this,function(ea){null==ea||".scratchpad"==X&&ea==this.emptyLibraryXml?C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[X]}),"*"):Y()}),Y)}}catch(ea){console.log(ea)}}),O=mxUtils.bind(this,function(X){try{this.setDatabaseItem(null,[{title:X.title,size:X.data.length,lastModified:Date.now(),type:X.isLib?"L":"F"},{title:X.title,data:X.data}],Y,Y,["filesInfo","files"])}catch(ea){console.log(ea)}});
-F=mxUtils.bind(this,function(X){try{if(X.source==C.contentWindow){var ea={};try{ea=JSON.parse(X.data)}catch(ka){}"init"==ea.event?(C.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=ea.event||G||(H?null!=ea.resp&&0<ea.resp.length&&null!=ea.resp[0]?(aa=ea.resp[0],H=!1,qa()):ba():null!=ea.resp&&0<ea.resp.length&&null!=ea.resp[0]?O(ea.resp[0]):
-Y())}}catch(ka){console.log(ka)}});window.addEventListener("message",F)}})));d(y);y.onversionchange=function(){y.close()}});l.onerror=f;l.onblocked=function(){}}catch(q){null!=f&&f(q)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,f,g,l,q){this.openDatabase(mxUtils.bind(this,function(y){try{q=q||"objects";Array.isArray(q)||(q=[q],d=[d],f=[f]);var F=y.transaction(q,"readwrite");F.oncomplete=g;F.onerror=l;for(y=0;y<q.length;y++)F.objectStore(q[y]).put(null!=d&&
-null!=d[y]?{key:d[y],data:f[y]}:f[y])}catch(C){null!=l&&l(C)}}),l)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,l){this.openDatabase(mxUtils.bind(this,function(q){l=l||"objects";Array.isArray(l)||(l=[l],d=[d]);q=q.transaction(l,"readwrite");q.oncomplete=f;q.onerror=g;for(var y=0;y<l.length;y++)q.objectStore(l[y]).delete(d[y])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,l){this.openDatabase(mxUtils.bind(this,function(q){try{l=l||"objects";var y=q.transaction([l],"readonly").objectStore(l).get(d);
-y.onsuccess=function(){f(y.result)};y.onerror=g}catch(F){null!=g&&g(F)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(l){try{g=g||"objects";var q=l.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),y=[];q.onsuccess=function(F){null==F.target.result?d(y):(y.push(F.target.result.value),F.target.result.continue())};q.onerror=f}catch(F){null!=f&&f(F)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,
-function(l){try{g=g||"objects";var q=l.transaction([g],"readonly").objectStore(g).getAllKeys();q.onsuccess=function(){d(q.result)};q.onerror=f}catch(y){null!=f&&f(y)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=
-d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var l=this.getCurrentFile();null!=l?l.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=
-function(d,f){var g=this.getCurrentFile();return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();
-return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,f,g,l,q,y,F,C){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,l,q,y,F,C)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");
-return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,
-f,g,l,q,y,F,C,H,G,aa,da,ba,Y,qa,O){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,l,q,y,F,C,H,G,aa,da,ba,Y,qa,O)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,f,g,l){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,l)};EditorUi.prototype.convertImageToDataUri=
-function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,f,g,l){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,f,g,l)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};
-EditorUi.prototype.writeGraphModelToPng=function(d,f,g,l,q){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,l,q)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g=localStorage.key(f),l=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<l.length){var q="<mxfile "===
-l.substring(0,8)||"<?xml"===l.substring(0,5)||"\x3c!--[if IE]>"===l.substring(0,12);l="<mxlibrary>"===l.substring(0,11);(q||l)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(d,f){try{var g=d.split("\n"),m=[],q=[],y=[],F={};if(0<g.length){var C={},H=this.editor.graph,G=null,aa=null,da=null,ba=null,Y=null,qa=null,O=
+null,X="whiteSpace=wrap;html=1;",ea=null,ka=null,ja="",U="auto",I="auto",V=null,Q=null,R=40,fa=40,la=100,ra=0,u=function(){null!=f?f(ma):(H.setSelectionCells(ma),H.scrollCellToVisible(H.getSelectionCell()))},J=H.getFreeInsertPoint(),N=J.x,W=J.y;J=W;var S=null,P="auto";ka=null;for(var Z=[],oa=null,va=null,Aa=0;Aa<g.length&&"#"==g[Aa].charAt(0);){d=g[Aa].replace(/\r$/,"");for(Aa++;Aa<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Aa].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Aa].substring(1)),
+Aa++;if("#"!=d.charAt(1)){var sa=d.indexOf(":");if(0<sa){var Ba=mxUtils.trim(d.substring(1,sa)),ta=mxUtils.trim(d.substring(sa+1));"label"==Ba?S=H.sanitizeHtml(ta):"labelname"==Ba&&0<ta.length&&"-"!=ta?Y=ta:"labels"==Ba&&0<ta.length&&"-"!=ta?O=JSON.parse(ta):"style"==Ba?aa=ta:"parentstyle"==Ba?X=ta:"unknownStyle"==Ba&&"-"!=ta?qa=ta:"stylename"==Ba&&0<ta.length&&"-"!=ta?ba=ta:"styles"==Ba&&0<ta.length&&"-"!=ta?da=JSON.parse(ta):"vars"==Ba&&0<ta.length&&"-"!=ta?G=JSON.parse(ta):"identity"==Ba&&0<ta.length&&
+"-"!=ta?ea=ta:"parent"==Ba&&0<ta.length&&"-"!=ta?ka=ta:"namespace"==Ba&&0<ta.length&&"-"!=ta?ja=ta:"width"==Ba?U=ta:"height"==Ba?I=ta:"left"==Ba&&0<ta.length?V=ta:"top"==Ba&&0<ta.length?Q=ta:"ignore"==Ba?va=ta.split(","):"connect"==Ba?Z.push(JSON.parse(ta)):"link"==Ba?oa=ta:"padding"==Ba?ra=parseFloat(ta):"edgespacing"==Ba?R=parseFloat(ta):"nodespacing"==Ba?fa=parseFloat(ta):"levelspacing"==Ba?la=parseFloat(ta):"layout"==Ba&&(P=ta)}}}if(null==g[Aa])throw Error(mxResources.get("invalidOrMissingFile"));
+var Na=this.editor.csvToArray(g[Aa].replace(/\r$/,""));sa=d=null;Ba=[];for(ta=0;ta<Na.length;ta++)ea==Na[ta]&&(d=ta),ka==Na[ta]&&(sa=ta),Ba.push(mxUtils.trim(Na[ta]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==S&&(S="%"+Ba[0]+"%");if(null!=Z)for(var Ca=0;Ca<Z.length;Ca++)null==C[Z[Ca].to]&&(C[Z[Ca].to]={});ea=[];for(ta=Aa+1;ta<g.length;ta++){var Qa=this.editor.csvToArray(g[ta].replace(/\r$/,""));if(null==Qa){var Ua=40<g[ta].length?g[ta].substring(0,40)+"...":g[ta];throw Error(Ua+
+" ("+ta+"):\n"+mxResources.get("containsValidationErrors"));}0<Qa.length&&ea.push(Qa)}H.model.beginUpdate();try{for(ta=0;ta<ea.length;ta++){Qa=ea[ta];var Ka=null,bb=null!=d?ja+Qa[d]:null;null!=bb&&(Ka=H.model.getCell(bb));g=null!=Ka;var Va=new mxCell(S,new mxGeometry(N,J,0,0),aa||"whiteSpace=wrap;html=1;");Va.vertex=!0;Va.id=bb;Ua=null!=Ka?Ka:Va;for(var $a=0;$a<Qa.length;$a++)H.setAttributeForCell(Ua,Ba[$a],Qa[$a]);if(null!=Y&&null!=O){var z=O[Ua.getAttribute(Y)];null!=z&&H.labelChanged(Ua,z)}if(null!=
+ba&&null!=da){var L=da[Ua.getAttribute(ba)];null!=L&&(Ua.style=L)}H.setAttributeForCell(Ua,"placeholders","1");Ua.style=H.replacePlaceholders(Ua,Ua.style,G);g?(0>mxUtils.indexOf(y,Ka)&&y.push(Ka),H.fireEvent(new mxEventObject("cellsInserted","cells",[Ka]))):H.fireEvent(new mxEventObject("cellsInserted","cells",[Va]));Ka=Va;if(!g)for(Ca=0;Ca<Z.length;Ca++)C[Z[Ca].to][Ka.getAttribute(Z[Ca].to)]=Ka;null!=oa&&"link"!=oa&&(H.setLinkForCell(Ka,Ka.getAttribute(oa)),H.setAttributeForCell(Ka,oa,null));var M=
+this.editor.graph.getPreferredSizeForCell(Ka);ka=null!=sa?H.model.getCell(ja+Qa[sa]):null;if(Ka.vertex){Ua=null!=ka?0:N;Aa=null!=ka?0:W;null!=V&&null!=Ka.getAttribute(V)&&(Ka.geometry.x=Ua+parseFloat(Ka.getAttribute(V)));null!=Q&&null!=Ka.getAttribute(Q)&&(Ka.geometry.y=Aa+parseFloat(Ka.getAttribute(Q)));var T="@"==U.charAt(0)?Ka.getAttribute(U.substring(1)):null;Ka.geometry.width=null!=T&&"auto"!=T?parseFloat(Ka.getAttribute(U.substring(1))):"auto"==U||"auto"==T?M.width+ra:parseFloat(U);var ca="@"==
+I.charAt(0)?Ka.getAttribute(I.substring(1)):null;Ka.geometry.height=null!=ca&&"auto"!=ca?parseFloat(ca):"auto"==I||"auto"==ca?M.height+ra:parseFloat(I);J+=Ka.geometry.height+fa}g?(null==F[bb]&&(F[bb]=[]),F[bb].push(Ka)):(m.push(Ka),null!=ka?(ka.style=H.replacePlaceholders(ka,X,G),H.addCell(Ka,ka),q.push(ka)):y.push(H.addCell(Ka)))}for(ta=0;ta<q.length;ta++)T="@"==U.charAt(0)?q[ta].getAttribute(U.substring(1)):null,ca="@"==I.charAt(0)?q[ta].getAttribute(I.substring(1)):null,"auto"!=U&&"auto"!=T||"auto"!=
+I&&"auto"!=ca||H.updateGroupBounds([q[ta]],ra,!0);var ia=y.slice(),ma=y.slice();for(Ca=0;Ca<Z.length;Ca++){var pa=Z[Ca];for(ta=0;ta<m.length;ta++){Ka=m[ta];var ua=mxUtils.bind(this,function(Ea,La,Ta){var Wa=La.getAttribute(Ta.from);if(null!=Wa&&""!=Wa){Wa=Wa.split(",");for(var fb=0;fb<Wa.length;fb++){var gb=C[Ta.to][Wa[fb]];if(null==gb&&null!=qa){gb=new mxCell(Wa[fb],new mxGeometry(N,W,0,0),qa);gb.style=H.replacePlaceholders(La,gb.style,G);var ib=this.editor.graph.getPreferredSizeForCell(gb);gb.geometry.width=
+ib.width+ra;gb.geometry.height=ib.height+ra;C[Ta.to][Wa[fb]]=gb;gb.vertex=!0;gb.id=Wa[fb];y.push(H.addCell(gb))}if(null!=gb){ib=Ta.label;null!=Ta.fromlabel&&(ib=(La.getAttribute(Ta.fromlabel)||"")+(ib||""));null!=Ta.sourcelabel&&(ib=H.replacePlaceholders(La,Ta.sourcelabel,G)+(ib||""));null!=Ta.tolabel&&(ib=(ib||"")+(gb.getAttribute(Ta.tolabel)||""));null!=Ta.targetlabel&&(ib=(ib||"")+H.replacePlaceholders(gb,Ta.targetlabel,G));var tb="target"==Ta.placeholders==!Ta.invert?gb:Ea;tb=null!=Ta.style?H.replacePlaceholders(tb,
+Ta.style,G):H.createCurrentEdgeStyle();ib=H.insertEdge(null,null,ib||"",Ta.invert?gb:Ea,Ta.invert?Ea:gb,tb);if(null!=Ta.labels)for(tb=0;tb<Ta.labels.length;tb++){var qb=Ta.labels[tb],cb=new mxCell(qb.label||tb,new mxGeometry(null!=qb.x?qb.x:0,null!=qb.y?qb.y:0,0,0),"resizable=0;html=1;");cb.vertex=!0;cb.connectable=!1;cb.geometry.relative=!0;null!=qb.placeholders&&(cb.value=H.replacePlaceholders("target"==qb.placeholders==!Ta.invert?gb:Ea,cb.value,G));if(null!=qb.dx||null!=qb.dy)cb.geometry.offset=
+new mxPoint(null!=qb.dx?qb.dx:0,null!=qb.dy?qb.dy:0);ib.insert(cb)}ma.push(ib);mxUtils.remove(Ta.invert?Ea:gb,ia)}}}});ua(Ka,Ka,pa);if(null!=F[Ka.id])for($a=0;$a<F[Ka.id].length;$a++)ua(Ka,F[Ka.id][$a],pa)}}if(null!=va)for(ta=0;ta<m.length;ta++)for(Ka=m[ta],$a=0;$a<va.length;$a++)H.setAttributeForCell(Ka,mxUtils.trim(va[$a]),null);if(0<y.length){var ya=new mxParallelEdgeLayout(H);ya.spacing=R;ya.checkOverlap=!0;var Fa=function(){0<ya.spacing&&ya.execute(H.getDefaultParent());for(var Ea=0;Ea<y.length;Ea++){var La=
+H.getCellGeometry(y[Ea]);La.x=Math.round(H.snap(La.x));La.y=Math.round(H.snap(La.y));"auto"==U&&(La.width=Math.round(H.snap(La.width)));"auto"==I&&(La.height=Math.round(H.snap(La.height)))}};if("["==P.charAt(0)){var Ma=u;H.view.validate();this.executeLayouts(H.createLayouts(JSON.parse(P)),function(){Fa();Ma()});u=null}else if("circle"==P){var Oa=new mxCircleLayout(H);Oa.disableEdgeStyle=!1;Oa.resetEdges=!1;var Pa=Oa.isVertexIgnored;Oa.isVertexIgnored=function(Ea){return Pa.apply(this,arguments)||
+0>mxUtils.indexOf(y,Ea)};this.executeLayout(function(){Oa.execute(H.getDefaultParent());Fa()},!0,u);u=null}else if("horizontaltree"==P||"verticaltree"==P||"auto"==P&&ma.length==2*y.length-1&&1==ia.length){H.view.validate();var Sa=new mxCompactTreeLayout(H,"horizontaltree"==P);Sa.levelDistance=fa;Sa.edgeRouting=!1;Sa.resetEdges=!1;this.executeLayout(function(){Sa.execute(H.getDefaultParent(),0<ia.length?ia[0]:null)},!0,u);u=null}else if("horizontalflow"==P||"verticalflow"==P||"auto"==P&&1==ia.length){H.view.validate();
+var za=new mxHierarchicalLayout(H,"horizontalflow"==P?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);za.intraCellSpacing=fa;za.parallelEdgeSpacing=R;za.interRankCellSpacing=la;za.disableEdgeStyle=!1;this.executeLayout(function(){za.execute(H.getDefaultParent(),ma);H.moveCells(ma,N,W)},!0,u);u=null}else if("organic"==P||"auto"==P&&ma.length>y.length){H.view.validate();var wa=new mxFastOrganicLayout(H);wa.forceConstant=3*fa;wa.disableEdgeStyle=!1;wa.resetEdges=!1;var Da=wa.isVertexIgnored;
+wa.isVertexIgnored=function(Ea){return Da.apply(this,arguments)||0>mxUtils.indexOf(y,Ea)};this.executeLayout(function(){wa.execute(H.getDefaultParent());Fa()},!0,u);u=null}}this.hideDialog()}finally{H.model.endUpdate()}null!=u&&u()}}catch(Ea){this.handleError(Ea)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",m;for(m in urlParams)0>mxUtils.indexOf(d,m)&&null!=urlParams[m]&&(f+=g+m+"="+urlParams[m],
+g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),m;for(m in urlParams)0>mxUtils.indexOf(g,m)&&(d=0==f?d+"?":d+"&",null!=urlParams[m]&&(d+=m+"="+urlParams[m],f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,m,q){d=new LinkDialog(this,
+d,f,g,!0,m,q);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;d&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();
+var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);
+Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("resetView").setEnabled(f);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);
+this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=
+function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var t=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){t.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),m=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(m);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());
+this.actions.get("guides").setEnabled(m);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(m);this.actions.get("connectionArrows").setEnabled(m);this.actions.get("connectionPoints").setEnabled(m);this.actions.get("copyStyle").setEnabled(m&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(m&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(m);this.actions.get("createRevision").setEnabled(m);
+this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(m&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);
+this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"")+"...";d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(m&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};
+var E=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);E.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,g,m,q,y,F,C){var H=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,
+"svg",mxUtils.getXml(H.getSvg(m,q,y)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),aa=H.getGraphBounds(),da=Math.floor(aa.width*q/H.view.scale),ba=Math.floor(aa.height*q/H.view.scale);if(G.length<=MAX_REQUEST_SIZE&&da*ba<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var Y={globalVars:H.getExportVariables()};C&&(Y.grid={size:H.gridSize,steps:H.view.gridSteps,color:H.view.gridColor});d.saveRequest(f,g,function(qa,O){return new mxXmlRequest(EXPORT_URL,
+"format="+g+"&base64="+(O||"0")+(null!=qa?"&filename="+encodeURIComponent(qa):"")+"&extras="+encodeURIComponent(JSON.stringify(Y))+(0<F?"&dpi="+F:"")+"&bg="+(null!=m?m:"none")+"&w="+da+"&h="+ba+"&border="+y+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(q,null==m||"none"==m,!0,!1,!1,y,!0,!1,null,C,F):d.exportImage(q,!1,!0,!1,!1,y,!0,!1,"jpeg",C);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);
+var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var m=d;this.currentPage!=this.pages[g]&&(m=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),m.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+m.getIndexableText()+" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var m=
+document.createElement("h3");mxUtils.write(m,mxUtils.htmlEntities(d));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(m);var q=document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var y={};try{var F=mxSettings.getCustomLibraries();for(d=0;d<F.length;d++){var C=F[d];if("R"==C.substring(0,1)){var H=JSON.parse(decodeURIComponent(C.substring(1)));
+y[H[0]]={id:H[0],title:H[1],downloadUrl:H[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){q.innerHTML="";if(0==G.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var aa=0;aa<G.length;aa++){var da=G[aa];y[da.id]&&(f[da.id]=da);var ba=this.addCheckbox(q,da.title,y[da.id]);(function(Y,qa){mxEvent.addListener(qa,"change",function(){this.checked?f[Y.id]=Y:delete f[Y.id]})})(da,
+ba)}},mxUtils.bind(this,function(G){q.innerHTML="";var aa=document.createElement("div");aa.style.padding="8px";aa.style.textAlign="center";mxUtils.write(aa,mxResources.get("error")+": ");mxUtils.write(aa,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));q.appendChild(aa)}));g.appendChild(q);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,aa;for(aa in f)null==y[aa]&&(G++,mxUtils.bind(this,function(da){this.remoteInvoke("getFileContent",
+[da.downloadUrl],null,mxUtils.bind(this,function(ba){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ba,da))}catch(Y){this.handleError(Y,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[aa]));for(aa in y)f[aa]||this.closeLibrary(new RemoteLibrary(this,null,y[aa]));0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");
+this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=
+d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,m,q){var y=
+!0,F=window.setTimeout(mxUtils.bind(this,function(){y=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),C=mxUtils.bind(this,function(){window.clearTimeout(F);y&&m.apply(this,arguments)}),H=mxUtils.bind(this,function(){window.clearTimeout(F);y&&q.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:C,error:H});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?
+this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,aa){var da={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=aa?da.error={errResp:aa}:null!=G&&(da.resp=G);this.remoteWin.postMessage(JSON.stringify(da),"*")});try{var m=d.funtionName,q=this.remoteInvokableFns[m];if(null!=q&&"function"===typeof this[m]){if(q.allowedDomains){for(var y=!1,F=0;F<q.allowedDomains.length;F++)if(f=="https://"+
+q.allowedDomains[F]){y=!0;break}if(!y){g(null,"Invalid Call: "+m+" is not allowed.");return}}var C=d.functionArgs;Array.isArray(C)||(C=[]);if(q.isAsync)C.push(function(){g(Array.prototype.slice.apply(arguments))}),C.push(function(G){g(null,G||"Unkown Error")}),this[m].apply(this,C);else{var H=this[m].apply(this,C);g([H])}}else g(null,"Invalid Call: "+m+" is not found.")}catch(G){g(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=
+window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var m=g.open("database",2);m.onupgradeneeded=function(q){try{var y=m.result;1>q.oldVersion&&y.createObjectStore("objects",{keyPath:"key"});2>q.oldVersion&&(y.createObjectStore("files",{keyPath:"title"}),y.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(F){null!=f&&f(F)}};m.onsuccess=mxUtils.bind(this,function(q){var y=m.result;this.database=y;EditorUi.migrateStorageFiles&&
+(StorageFile.migrate(y),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(F){if(!F||"1"==urlParams.forceMigration){var C=document.createElement("iframe");C.style.display="none";C.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(C);var H=!0,G=!1,aa,da=0,ba=mxUtils.bind(this,function(){G=
+!0;this.setDatabaseItem(".drawioMigrated3",!0);C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),Y=mxUtils.bind(this,function(){da++;qa()}),qa=mxUtils.bind(this,function(){try{if(da>=aa.length)ba();else{var X=aa[da];StorageFile.getFileContent(this,X,mxUtils.bind(this,function(ea){null==ea||".scratchpad"==X&&ea==this.emptyLibraryXml?C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[X]}),
+"*"):Y()}),Y)}}catch(ea){console.log(ea)}}),O=mxUtils.bind(this,function(X){try{this.setDatabaseItem(null,[{title:X.title,size:X.data.length,lastModified:Date.now(),type:X.isLib?"L":"F"},{title:X.title,data:X.data}],Y,Y,["filesInfo","files"])}catch(ea){console.log(ea)}});F=mxUtils.bind(this,function(X){try{if(X.source==C.contentWindow){var ea={};try{ea=JSON.parse(X.data)}catch(ka){}"init"==ea.event?(C.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=ea.event||G||(H?null!=ea.resp&&0<ea.resp.length&&null!=ea.resp[0]?(aa=ea.resp[0],H=!1,qa()):ba():null!=ea.resp&&0<ea.resp.length&&null!=ea.resp[0]?O(ea.resp[0]):Y())}}catch(ka){console.log(ka)}});window.addEventListener("message",F)}})));d(y);y.onversionchange=function(){y.close()}});m.onerror=f;m.onblocked=function(){}}catch(q){null!=f&&f(q)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,
+f,g,m,q){this.openDatabase(mxUtils.bind(this,function(y){try{q=q||"objects";Array.isArray(q)||(q=[q],d=[d],f=[f]);var F=y.transaction(q,"readwrite");F.oncomplete=g;F.onerror=m;for(y=0;y<q.length;y++)F.objectStore(q[y]).put(null!=d&&null!=d[y]?{key:d[y],data:f[y]}:f[y])}catch(C){null!=m&&m(C)}}),m)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,m){this.openDatabase(mxUtils.bind(this,function(q){m=m||"objects";Array.isArray(m)||(m=[m],d=[d]);q=q.transaction(m,"readwrite");q.oncomplete=f;q.onerror=
+g;for(var y=0;y<m.length;y++)q.objectStore(m[y]).delete(d[y])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,m){this.openDatabase(mxUtils.bind(this,function(q){try{m=m||"objects";var y=q.transaction([m],"readonly").objectStore(m).get(d);y.onsuccess=function(){f(y.result)};y.onerror=g}catch(F){null!=g&&g(F)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";var q=m.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),
+y=[];q.onsuccess=function(F){null==F.target.result?d(y):(y.push(F.target.result.value),F.target.result.continue())};q.onerror=f}catch(F){null!=f&&f(F)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";var q=m.transaction([g],"readonly").objectStore(g).getAllKeys();q.onsuccess=function(){d(q.result)};q.onerror=f}catch(y){null!=f&&f(y)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=
+d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var m=this.getCurrentFile();null!=m?m.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=
+function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,f){var g=this.getCurrentFile();return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=
+function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=
+function(d,f,g,m,q,y,F,C){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,m,q,y,F,C)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,
+f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,m,q,y,F,C,H,G,aa,da,ba,Y,qa,O){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,m,q,y,F,C,H,G,aa,da,ba,Y,qa,O)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};
+EditorUi.prototype.convertImages=function(d,f,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,m)};EditorUi.prototype.convertImageToDataUri=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,f,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");
+return Editor.updateCRC(d,f,g,m)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,f,g,m,q){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,m,q)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g=
+localStorage.key(f),m=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<m.length){var q="<mxfile "===m.substring(0,8)||"<?xml"===m.substring(0,5)||"\x3c!--[if IE]>"===m.substring(0,12);m="<mxlibrary>"===m.substring(0,11);(q||m)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"===
+f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
var CommentsWindow=function(b,e,k,n,D,t){function E(){for(var ja=da.getElementsByTagName("div"),U=0,I=0;I<ja.length;I++)"none"!=ja[I].style.display&&ja[I].parentNode==da&&U++;ba.style.display=0==U?"block":"none"}function d(ja,U,I,V){function Q(){U.removeChild(la);U.removeChild(ra);fa.style.display="block";R.style.display="block"}H={div:U,comment:ja,saveCallback:I,deleteOnCancel:V};var R=U.querySelector(".geCommentTxt"),fa=U.querySelector(".geCommentActionsList"),la=document.createElement("textarea");
la.className="geCommentEditTxtArea";la.style.minHeight=R.offsetHeight+"px";la.value=ja.content;U.insertBefore(la,R);var ra=document.createElement("div");ra.className="geCommentEditBtns";var u=mxUtils.button(mxResources.get("cancel"),function(){V?(U.parentNode.removeChild(U),E()):Q();H=null});u.className="geCommentEditBtn";ra.appendChild(u);var J=mxUtils.button(mxResources.get("save"),function(){R.innerHTML="";ja.content=la.value;mxUtils.write(R,ja.content);Q();I(ja);H=null});mxEvent.addListener(la,
"keydown",mxUtils.bind(this,function(N){mxEvent.isConsumed(N)||((mxEvent.isControlDown(N)||mxClient.IS_MAC&&mxEvent.isMetaDown(N))&&13==N.keyCode?(J.click(),mxEvent.consume(N)):27==N.keyCode&&(u.click(),mxEvent.consume(N)))}));J.focus();J.className="geCommentEditBtn gePrimaryBtn";ra.appendChild(J);U.insertBefore(ra,R);fa.style.display="none";R.style.display="none";la.focus()}function f(ja,U){U.innerHTML="";ja=new Date(ja.modifiedDate);var I=b.timeSince(ja);null==I&&(I=mxResources.get("lessThanAMinute"));
-mxUtils.write(U,mxResources.get("timeAgo",[I],"{1} ago"));U.setAttribute("title",ja.toLocaleDateString()+" "+ja.toLocaleTimeString())}function g(ja){var U=document.createElement("img");U.className="geCommentBusyImg";U.src=IMAGE_PATH+"/spin.gif";ja.appendChild(U);ja.busyImg=U}function l(ja){ja.style.border="1px solid red";ja.removeChild(ja.busyImg)}function q(ja){ja.style.border="";ja.removeChild(ja.busyImg)}function y(ja,U,I,V,Q){function R(S,P,Z){var oa=document.createElement("li");oa.className=
+mxUtils.write(U,mxResources.get("timeAgo",[I],"{1} ago"));U.setAttribute("title",ja.toLocaleDateString()+" "+ja.toLocaleTimeString())}function g(ja){var U=document.createElement("img");U.className="geCommentBusyImg";U.src=IMAGE_PATH+"/spin.gif";ja.appendChild(U);ja.busyImg=U}function m(ja){ja.style.border="1px solid red";ja.removeChild(ja.busyImg)}function q(ja){ja.style.border="";ja.removeChild(ja.busyImg)}function y(ja,U,I,V,Q){function R(S,P,Z){var oa=document.createElement("li");oa.className=
"geCommentAction";var va=document.createElement("a");va.className="geCommentActionLnk";mxUtils.write(va,S);oa.appendChild(va);mxEvent.addListener(va,"click",function(Aa){P(Aa,ja);Aa.preventDefault();mxEvent.consume(Aa)});W.appendChild(oa);Z&&(oa.style.display="none")}function fa(){function S(oa){P.push(Z);if(null!=oa.replies)for(var va=0;va<oa.replies.length;va++)Z=Z.nextSibling,S(oa.replies[va])}var P=[],Z=ra;S(ja);return{pdiv:Z,replies:P}}function la(S,P,Z,oa,va){function Aa(){g(Na);ja.addReply(ta,
-function(Ca){ta.id=Ca;ja.replies.push(ta);q(Na);Z&&Z()},function(Ca){sa();l(Na);b.handleError(Ca,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},oa,va)}function sa(){d(ta,Na,function(Ca){Aa()},!0)}var Ba=fa().pdiv,ta=b.newComment(S,b.getCurrentUser());ta.pCommentId=ja.id;null==ja.replies&&(ja.replies=[]);var Na=y(ta,ja.replies,Ba,V+1);P?sa():Aa()}if(Q||!ja.isResolved){ba.style.display="none";var ra=document.createElement("div");ra.className="geCommentContainer";ra.setAttribute("data-commentId",
+function(Ca){ta.id=Ca;ja.replies.push(ta);q(Na);Z&&Z()},function(Ca){sa();m(Na);b.handleError(Ca,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},oa,va)}function sa(){d(ta,Na,function(Ca){Aa()},!0)}var Ba=fa().pdiv,ta=b.newComment(S,b.getCurrentUser());ta.pCommentId=ja.id;null==ja.replies&&(ja.replies=[]);var Na=y(ta,ja.replies,Ba,V+1);P?sa():Aa()}if(Q||!ja.isResolved){ba.style.display="none";var ra=document.createElement("div");ra.className="geCommentContainer";ra.setAttribute("data-commentId",
ja.id);ra.style.marginLeft=20*V+5+"px";ja.isResolved&&!Editor.isDarkMode()&&(ra.style.backgroundColor="ghostWhite");var u=document.createElement("div");u.className="geCommentHeader";var J=document.createElement("img");J.className="geCommentUserImg";J.src=ja.user.pictureUrl||Editor.userImage;u.appendChild(J);J=document.createElement("div");J.className="geCommentHeaderTxt";u.appendChild(J);var N=document.createElement("div");N.className="geCommentUsername";mxUtils.write(N,ja.user.displayName||"");J.appendChild(N);
N=document.createElement("div");N.className="geCommentDate";N.setAttribute("data-commentId",ja.id);f(ja,N);J.appendChild(N);ra.appendChild(u);u=document.createElement("div");u.className="geCommentTxt";mxUtils.write(u,ja.content||"");ra.appendChild(u);ja.isLocked&&(ra.style.opacity="0.5");u=document.createElement("div");u.className="geCommentActions";var W=document.createElement("ul");W.className="geCommentActionsList";u.appendChild(W);F||ja.isLocked||0!=V&&!C||R(mxResources.get("reply"),function(){la("",
-!0)},ja.isResolved);J=b.getCurrentUser();null==J||J.id!=ja.user.id||F||ja.isLocked||(R(mxResources.get("edit"),function(){function S(){d(ja,ra,function(){g(ra);ja.editComment(ja.content,function(){q(ra)},function(P){l(ra);S();b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}S()},ja.isResolved),R(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){g(ra);ja.deleteComment(function(S){if(!0===S){S=ra.querySelector(".geCommentTxt");
-S.innerHTML="";mxUtils.write(S,mxResources.get("msgDeleted"));var P=ra.querySelectorAll(".geCommentAction");for(S=0;S<P.length;S++)P[S].parentNode.removeChild(P[S]);q(ra);ra.style.opacity="0.5"}else{P=fa(ja).replies;for(S=0;S<P.length;S++)da.removeChild(P[S]);for(S=0;S<U.length;S++)if(U[S]==ja){U.splice(S,1);break}ba.style.display=0==da.getElementsByTagName("div").length?"block":"none"}},function(S){l(ra);b.handleError(S,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
+!0)},ja.isResolved);J=b.getCurrentUser();null==J||J.id!=ja.user.id||F||ja.isLocked||(R(mxResources.get("edit"),function(){function S(){d(ja,ra,function(){g(ra);ja.editComment(ja.content,function(){q(ra)},function(P){m(ra);S();b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}S()},ja.isResolved),R(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){g(ra);ja.deleteComment(function(S){if(!0===S){S=ra.querySelector(".geCommentTxt");
+S.innerHTML="";mxUtils.write(S,mxResources.get("msgDeleted"));var P=ra.querySelectorAll(".geCommentAction");for(S=0;S<P.length;S++)P[S].parentNode.removeChild(P[S]);q(ra);ra.style.opacity="0.5"}else{P=fa(ja).replies;for(S=0;S<P.length;S++)da.removeChild(P[S]);for(S=0;S<U.length;S++)if(U[S]==ja){U.splice(S,1);break}ba.style.display=0==da.getElementsByTagName("div").length?"block":"none"}},function(S){m(ra);b.handleError(S,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
ja.isResolved));F||ja.isLocked||0!=V||R(ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(S){function P(){var Z=S.target;Z.innerHTML="";ja.isResolved=!ja.isResolved;mxUtils.write(Z,ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var oa=ja.isResolved?"none":"",va=fa(ja).replies,Aa=Editor.isDarkMode()?"transparent":ja.isResolved?"ghostWhite":"white",sa=0;sa<va.length;sa++){va[sa].style.backgroundColor=Aa;for(var Ba=va[sa].querySelectorAll(".geCommentAction"),
ta=0;ta<Ba.length;ta++)Ba[ta]!=Z.parentNode&&(Ba[ta].style.display=oa);O||(va[sa].style.display="none")}E()}ja.isResolved?la(mxResources.get("reOpened")+": ",!0,P,!1,!0):la(mxResources.get("markedAsResolved"),!1,P,!0)});ra.appendChild(u);null!=I?da.insertBefore(ra,I.nextSibling):da.appendChild(ra);for(I=0;null!=ja.replies&&I<ja.replies.length;I++)u=ja.replies[I],u.isResolved=ja.isResolved,y(u,ja.replies,null,V+1,Q);null!=H&&(H.comment.id==ja.id?(Q=ja.content,ja.content=H.comment.content,d(ja,ra,H.saveCallback,
H.deleteOnCancel),ja.content=Q):null==H.comment.id&&H.comment.pCommentId==ja.id&&(da.appendChild(H.div),d(H.comment,H.div,H.saveCallback,H.deleteOnCancel)));return ra}}var F=!b.canComment(),C=b.canReplyToReplies(),H=null,G=document.createElement("div");G.className="geCommentsWin";G.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var aa=EditorUi.compactUi?"26px":"30px",da=document.createElement("div");da.className="geCommentsList";da.style.backgroundColor=Editor.isDarkMode()?
Dialog.backdropColor:"whiteSmoke";da.style.bottom=parseInt(aa)+7+"px";G.appendChild(da);var ba=document.createElement("span");ba.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(ba,mxResources.get("noCommentsFound"));var Y=document.createElement("div");Y.className="geToolbarContainer geCommentsToolbar";Y.style.height=aa;Y.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";Y.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";aa=document.createElement("a");
-aa.className="geButton";if(!F){var qa=aa.cloneNode();qa.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';qa.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(qa,"click",function(ja){function U(){d(I,V,function(Q){g(V);b.addComment(Q,function(R){Q.id=R;X.push(Q);q(V)},function(R){l(V);U();b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var I=b.newComment("",b.getCurrentUser()),V=y(I,X,null,0);
+aa.className="geButton";if(!F){var qa=aa.cloneNode();qa.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';qa.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(qa,"click",function(ja){function U(){d(I,V,function(Q){g(V);b.addComment(Q,function(R){Q.id=R;X.push(Q);q(V)},function(R){m(V);U();b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var I=b.newComment("",b.getCurrentUser()),V=y(I,X,null,0);
U();ja.preventDefault();mxEvent.consume(ja)});Y.appendChild(qa)}qa=aa.cloneNode();qa.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';qa.setAttribute("title",mxResources.get("showResolved"));var O=!1;Editor.isDarkMode()&&(qa.style.filter="invert(100%)");mxEvent.addListener(qa,"click",function(ja){this.className=(O=!O)?"geButton geCheckedBtn":"geButton";ea();ja.preventDefault();mxEvent.consume(ja)});Y.appendChild(qa);b.commentsRefreshNeeded()&&(qa=aa.cloneNode(),
qa.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',qa.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(qa.style.filter="invert(100%)"),mxEvent.addListener(qa,"click",function(ja){ea();ja.preventDefault();mxEvent.consume(ja)}),Y.appendChild(qa));b.commentsSaveNeeded()&&(aa=aa.cloneNode(),aa.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',aa.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&
(aa.style.filter="invert(100%)"),mxEvent.addListener(aa,"click",function(ja){t();ja.preventDefault();mxEvent.consume(ja)}),Y.appendChild(aa));G.appendChild(Y);var X=[],ea=mxUtils.bind(this,function(){this.hasError=!1;if(null!=H)try{H.div=H.div.cloneNode(!0);var ja=H.div.querySelector(".geCommentEditTxtArea"),U=H.div.querySelector(".geCommentEditBtns");H.comment.content=ja.value;ja.parentNode.removeChild(ja);U.parentNode.removeChild(U)}catch(I){b.handleError(I)}da.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
@@ -3786,7 +3790,7 @@ IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("
y(X[I],X,null,0,O);null!=H&&null==H.comment.id&&null==H.comment.pCommentId&&(da.appendChild(H.div),d(H.comment,H.div,H.saveCallback,H.deleteOnCancel))},mxUtils.bind(this,function(I){da.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(I&&I.message?": "+I.message:""));this.hasError=!0})):da.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ea();this.refreshComments=ea;Y=mxUtils.bind(this,function(){function ja(R){var fa=I[R.id];if(null!=fa)for(f(R,fa),fa=0;null!=R.replies&&fa<R.replies.length;fa++)ja(R.replies[fa])}
if(this.window.isVisible()){for(var U=da.querySelectorAll(".geCommentDate"),I={},V=0;V<U.length;V++){var Q=U[V];I[Q.getAttribute("data-commentId")]=Q}for(V=0;V<X.length;V++)ja(X[V])}});setInterval(Y,6E4);this.refreshCommentsTime=Y;this.window=new mxWindow(mxResources.get("comments"),G,e,k,n,D,!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(ja,U){var I=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;ja=Math.max(0,Math.min(ja,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));U=Math.max(0,Math.min(U,I-this.table.clientHeight-48));this.getX()==ja&&this.getY()==U||mxWindow.prototype.setLocation.apply(this,arguments)};var ka=mxUtils.bind(this,function(){var ja=
-this.window.getX(),U=this.window.getY();this.window.setLocation(ja,U)});mxEvent.addListener(window,"resize",ka);this.destroy=function(){mxEvent.removeListener(window,"resize",ka);this.window.destroy()}},ConfirmDialog=function(b,e,k,n,D,t,E,d,f,g,l){var q=document.createElement("div");q.style.textAlign="center";l=null!=l?l:44;var y=document.createElement("div");y.style.padding="6px";y.style.overflow="auto";y.style.maxHeight=l+"px";y.style.lineHeight="1.2em";mxUtils.write(y,e);q.appendChild(y);null!=
+this.window.getX(),U=this.window.getY();this.window.setLocation(ja,U)});mxEvent.addListener(window,"resize",ka);this.destroy=function(){mxEvent.removeListener(window,"resize",ka);this.window.destroy()}},ConfirmDialog=function(b,e,k,n,D,t,E,d,f,g,m){var q=document.createElement("div");q.style.textAlign="center";m=null!=m?m:44;var y=document.createElement("div");y.style.padding="6px";y.style.overflow="auto";y.style.maxHeight=m+"px";y.style.lineHeight="1.2em";mxUtils.write(y,e);q.appendChild(y);null!=
g&&(y=document.createElement("div"),y.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",g),y.appendChild(e),q.appendChild(y));g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";var F=document.createElement("input");F.setAttribute("type","checkbox");t=mxUtils.button(t||mxResources.get("cancel"),function(){b.hideDialog();null!=n&&n(F.checked)});t.className="geBtn";null!=d&&(t.innerHTML=d+"<br>"+t.innerHTML,t.style.paddingBottom="8px",
t.style.paddingTop="8px",t.style.height="auto",t.style.width="40%");b.editor.cancelFirst&&g.appendChild(t);var C=mxUtils.button(D||mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(F.checked)});g.appendChild(C);null!=E?(C.innerHTML=E+"<br>"+C.innerHTML+"<br>",C.style.paddingBottom="8px",C.style.paddingTop="8px",C.style.height="auto",C.className="geBtn",C.style.width="40%"):C.className="geBtn gePrimaryBtn";b.editor.cancelFirst||g.appendChild(t);q.appendChild(g);f?(g.style.marginTop="10px",
y=document.createElement("p"),y.style.marginTop="20px",y.style.marginBottom="0px",y.appendChild(F),D=document.createElement("span"),mxUtils.write(D," "+mxResources.get("rememberThisSetting")),y.appendChild(D),q.appendChild(y),mxEvent.addListener(D,"click",function(H){F.checked=!F.checked;mxEvent.consume(H)})):g.style.marginTop="12px";this.init=function(){C.focus()};this.container=q};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):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")};
@@ -3834,8 +3838,8 @@ EditorUi.prototype.clonePages=function(b){for(var e=[],k=0;k<b.length;k++)e.push
EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(k){null!=k&&0<k.length&&this.editor.graph.model.execute(new RenamePage(this,b,k))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};
EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b};
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display="inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="13px";e.style.marginLeft="30px";for(var k=this.editor.isChromelessView()?29:59,n=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-k)/this.pages.length)+
-1),D=null,t=0;t<this.pages.length;t++)mxUtils.bind(this,function(g,l){this.pages[g]==this.currentPage?(l.className="geActivePage",l.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):l.className="geInactivePage";l.setAttribute("draggable","true");mxEvent.addListener(l,"dragstart",mxUtils.bind(this,function(q){b.isEnabled()?(mxClient.IS_FF&&q.dataTransfer.setData("Text","<diagram/>"),D=g):mxEvent.consume(q)}));mxEvent.addListener(l,"dragend",mxUtils.bind(this,function(q){D=null;q.stopPropagation();
-q.preventDefault()}));mxEvent.addListener(l,"dragover",mxUtils.bind(this,function(q){null!=D&&(q.dataTransfer.dropEffect="move");q.stopPropagation();q.preventDefault()}));mxEvent.addListener(l,"drop",mxUtils.bind(this,function(q){null!=D&&g!=D&&this.movePage(D,g);q.stopPropagation();q.preventDefault()}));e.appendChild(l)})(t,this.createTabForPage(this.pages[t],n,this.pages[t]!=this.currentPage,t+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(e);n=this.createPageMenuTab();this.tabContainer.appendChild(n);
+1),D=null,t=0;t<this.pages.length;t++)mxUtils.bind(this,function(g,m){this.pages[g]==this.currentPage?(m.className="geActivePage",m.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):m.className="geInactivePage";m.setAttribute("draggable","true");mxEvent.addListener(m,"dragstart",mxUtils.bind(this,function(q){b.isEnabled()?(mxClient.IS_FF&&q.dataTransfer.setData("Text","<diagram/>"),D=g):mxEvent.consume(q)}));mxEvent.addListener(m,"dragend",mxUtils.bind(this,function(q){D=null;q.stopPropagation();
+q.preventDefault()}));mxEvent.addListener(m,"dragover",mxUtils.bind(this,function(q){null!=D&&(q.dataTransfer.dropEffect="move");q.stopPropagation();q.preventDefault()}));mxEvent.addListener(m,"drop",mxUtils.bind(this,function(q){null!=D&&g!=D&&this.movePage(D,g);q.stopPropagation();q.preventDefault()}));e.appendChild(m)})(t,this.createTabForPage(this.pages[t],n,this.pages[t]!=this.currentPage,t+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(e);n=this.createPageMenuTab();this.tabContainer.appendChild(n);
n=null;this.isPageInsertTabVisible()&&(n=this.createPageInsertTab(),this.tabContainer.appendChild(n));if(e.clientWidth>this.tabContainer.clientWidth-k){null!=n&&(n.style.position="absolute",n.style.right="0px",e.style.marginRight="30px");var E=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");E.style.position="absolute";E.style.right=this.editor.chromeless?"29px":"55px";E.style.fontSize="13pt";this.tabContainer.appendChild(E);var d=this.createControlTab(4,"&nbsp;&#10095;");d.style.position="absolute";
d.style.right=this.editor.chromeless?"0px":"29px";d.style.fontSize="13pt";this.tabContainer.appendChild(d);var f=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=f+"px";mxEvent.addListener(E,"click",mxUtils.bind(this,function(g){e.scrollLeft-=Math.max(20,f-20);mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(d,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(g)}));mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(d,
e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(d,"click",mxUtils.bind(this,function(g){e.scrollLeft+=Math.max(20,f-20);mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(d,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(g)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
@@ -3843,9 +3847,9 @@ EditorUi.prototype.createTab=function(b){var e=document.createElement("div");e.s
this.tabContainer.style.backgroundColor;e.style.cursor="move";e.style.color="gray";b&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(k){this.editor.graph.isMouseDown||(e.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(k))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(k){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(k)})));return e};
EditorUi.prototype.createControlTab=function(b,e,k){k=this.createTab(null!=k?k:!0);k.style.lineHeight=this.tabContainerHeight+"px";k.style.paddingTop=b+"px";k.style.cursor="pointer";k.style.width="30px";k.innerHTML=e;null!=k.firstChild&&null!=k.firstChild.style&&mxUtils.setOpacity(k.firstChild,40);return k};
EditorUi.prototype.createPageMenuTab=function(b,e){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var k=b.getElementsByTagName("div")[0];k.style.display="inline-block";k.style.marginTop="5px";k.style.width="21px";k.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(n){this.editor.graph.popupMenuHandler.hideMenu();
-var D=new mxPopupMenu(mxUtils.bind(this,function(d,f){var g=mxUtils.bind(this,function(){for(var F=0;F<this.pages.length;F++)mxUtils.bind(this,function(C){var H=d.addItem(this.pages[C].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[C])}),f),G=this.pages[C].getId();H.setAttribute("title",this.pages[C].getName()+" ("+(C+1)+"/"+this.pages.length+")"+(null!=G?" ["+G+"]":""));this.pages[C]==this.currentPage&&d.addCheckmark(H,Editor.checkmarkImage)})(F)}),l=mxUtils.bind(this,function(){d.addItem(mxResources.get("insertPage"),
-null,mxUtils.bind(this,function(){this.insertPage()}),f)});e||g();if(this.editor.graph.isEnabled()){e||(d.addSeparator(f),l());var q=this.currentPage;if(null!=q){d.addSeparator(f);var y=q.getName();d.addItem(mxResources.get("removeIt",[y]),null,mxUtils.bind(this,function(){this.removePage(q)}),f);d.addItem(mxResources.get("renameIt",[y]),null,mxUtils.bind(this,function(){this.renamePage(q,q.getName())}),f);e||d.addSeparator(f);d.addItem(mxResources.get("duplicateIt",[y]),null,mxUtils.bind(this,function(){this.duplicatePage(q,
-mxResources.get("copyOf",[q.getName()]))}),f)}}e&&(d.addSeparator(f),l(),d.addSeparator(f),g())}));D.div.className+=" geMenubarMenu";D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);D.destroy()});var t=mxEvent.getClientX(n),E=mxEvent.getClientY(n);D.popup(t,E,null,n);this.setCurrentMenu(D);mxEvent.consume(n)}));return b};
+var D=new mxPopupMenu(mxUtils.bind(this,function(d,f){var g=mxUtils.bind(this,function(){for(var F=0;F<this.pages.length;F++)mxUtils.bind(this,function(C){var H=d.addItem(this.pages[C].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[C])}),f),G=this.pages[C].getId();H.setAttribute("title",this.pages[C].getName()+" ("+(C+1)+"/"+this.pages.length+")"+(null!=G?" ["+G+"]":""));this.pages[C]==this.currentPage&&d.addCheckmark(H,Editor.checkmarkImage)})(F)}),m=mxUtils.bind(this,function(){d.addItem(mxResources.get("insertPage"),
+null,mxUtils.bind(this,function(){this.insertPage()}),f)});e||g();if(this.editor.graph.isEnabled()){e||(d.addSeparator(f),m());var q=this.currentPage;if(null!=q){d.addSeparator(f);var y=q.getName();d.addItem(mxResources.get("removeIt",[y]),null,mxUtils.bind(this,function(){this.removePage(q)}),f);d.addItem(mxResources.get("renameIt",[y]),null,mxUtils.bind(this,function(){this.renamePage(q,q.getName())}),f);e||d.addSeparator(f);d.addItem(mxResources.get("duplicateIt",[y]),null,mxUtils.bind(this,function(){this.duplicatePage(q,
+mxResources.get("copyOf",[q.getName()]))}),f)}}e&&(d.addSeparator(f),m(),d.addSeparator(f),g())}));D.div.className+=" geMenubarMenu";D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);D.destroy()});var t=mxEvent.getClientX(n),E=mxEvent.getClientY(n);D.popup(t,E,null,n);this.setCurrentMenu(D);mxEvent.consume(n)}));return b};
EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(k){this.insertPage();mxEvent.consume(k)}));var e=b.getElementsByTagName("div")[0];e.style.display="inline-block";e.style.width="21px";e.style.height="21px";return b};
EditorUi.prototype.createTabForPage=function(b,e,k,n){k=this.createTab(k);var D=b.getName()||mxResources.get("untitled"),t=b.getId();k.setAttribute("title",D+(null!=t?" ("+t+")":"")+" ["+n+"]");mxUtils.write(k,D);k.style.maxWidth=e+"px";k.style.width=e+"px";this.addTabListeners(b,k);42<e&&(k.style.textOverflow="ellipsis");return k};
EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var k=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(t){this.renamePage(b);mxEvent.consume(t)}));var n=!1,D=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(t){n=null!=this.currentMenu;D=b==this.currentPage;k.isMouseDown||D||this.selectPage(b)}),null,mxUtils.bind(this,function(t){if(k.isEnabled()&&!k.isMouseDown&&(mxEvent.isTouchEvent(t)&&D||mxEvent.isPopupTrigger(t))){k.popupMenuHandler.hideMenu();
@@ -3853,7 +3857,7 @@ this.hideCurrentMenu();if(!mxEvent.isTouchEvent(t)||!n){var E=new mxPopupMenu(th
EditorUi.prototype.getLinkForPage=function(b,e,k){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var n=this.getCurrentFile();if(null!=n&&n.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var D=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));D+=(0==D.length?"?":"&")+"page-id="+b.getId();null!=e&&(D+="&"+e.join("&"));return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
EditorUi.drawHost:"https://"+window.location.host)+"/"+D+"#"+n.getHash()}}return null};
EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(k,n){var D=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),n);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),n);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,e)}),n);null!=this.getLinkForPage(b)&&(k.addSeparator(n),k.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(t,E,d,f,g,l){t=this.createUrlParameters(t,E,d,f,g,l);d||t.push("hide-pages=1");D.isSelectionEmpty()||(d=D.getBoundingBox(D.getSelectionCells()),E=D.view.translate,g=D.view.scale,d.width/=g,d.height/=g,d.x=d.x/g-E.x,d.y=d.y/g-E.y,t.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),border:100}))));
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(t,E,d,f,g,m){t=this.createUrlParameters(t,E,d,f,g,m);d||t.push("hide-pages=1");D.isSelectionEmpty()||(d=D.getBoundingBox(D.getSelectionCells()),E=D.view.translate,g=D.view.scale,d.width/=g,d.height/=g,d.x=d.x/g-E.x,d.y=d.y/g-E.y,t.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),border:100}))));
f=new EmbedDialog(this,this.getLinkForPage(b,t,f));this.showDialog(f.container,450,240,!0,!0);f.init()}))})));k.addSeparator(n);k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),n);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(k.addSeparator(n),k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
!0,!0))}),n))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(e){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};b.afterDecode=function(e,k,n){e=n.oldIndex;n.oldIndex=n.newIndex;n.newIndex=e;return n};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};b.afterDecode=function(e,k,n){e=n.previous;n.previous=n.name;n.name=e;return n};mxCodecRegistry.register(b)})();
@@ -3868,7 +3872,7 @@ null!=V&&0<V.length&&(V=V[V.length-1],null!=V)))){if(V.y==I.y&&Math.abs(V.x-I.ge
10)*J:N.y+=(V?I.geometry.height+10:-fa[1].geometry.height-10)*J;var W=C.getOutgoingTreeEdges(C.model.getTerminal(R[0],!0));if(null!=W){for(var S=la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH,P=ra=R=0;P<W.length;P++){var Z=C.model.getTerminal(W[P],!1);if(la==d(Z)){var oa=C.view.getState(Z);Z!=I&&null!=oa&&(S&&V!=oa.getCenterX()<u.getCenterX()||!S&&V!=oa.getCenterY()<u.getCenterY())&&mxUtils.intersects(N,oa)&&(R=10+Math.max(R,(Math.min(N.x+N.width,oa.x+oa.width)-Math.max(N.x,oa.x))/
J),ra=10+Math.max(ra,(Math.min(N.y+N.height,oa.y+oa.height)-Math.max(N.y,oa.y))/J))}}S?ra=0:R=0;for(P=0;P<W.length;P++)if(Z=C.model.getTerminal(W[P],!1),la==d(Z)&&(oa=C.view.getState(Z),Z!=I&&null!=oa&&(S&&V!=oa.getCenterX()<u.getCenterX()||!S&&V!=oa.getCenterY()<u.getCenterY()))){var va=[];C.traverse(oa.cell,!0,function(Aa,sa){var Ba=null!=sa&&C.isTreeEdge(sa);Ba&&va.push(sa);(null==sa||Ba)&&va.push(Aa);return null==sa||Ba});C.moveCells(va,(V?1:-1)*R,(V?1:-1)*ra)}}}return C.addCells(fa,Q)}finally{C.model.endUpdate()}}
function g(I){C.model.beginUpdate();try{var V=d(I),Q=C.getIncomingTreeEdges(I),R=C.cloneCells([Q[0],I]);C.model.setTerminal(Q[0],R[1],!1);C.model.setTerminal(R[0],R[1],!0);C.model.setTerminal(R[0],I,!1);var fa=C.model.getParent(I),la=fa.geometry,ra=[];C.view.currentRoot!=fa&&(R[1].geometry.x-=la.x,R[1].geometry.y-=la.y);C.traverse(I,!0,function(N,W){var S=null!=W&&C.isTreeEdge(W);S&&ra.push(W);(null==W||S)&&ra.push(N);return null==W||S});var u=I.geometry.width+40,J=I.geometry.height+40;V==mxConstants.DIRECTION_SOUTH?
-u=0:V==mxConstants.DIRECTION_NORTH?(u=0,J=-J):V==mxConstants.DIRECTION_WEST?(u=-u,J=0):V==mxConstants.DIRECTION_EAST&&(J=0);C.moveCells(ra,u,J);return C.addCells(R,fa)}finally{C.model.endUpdate()}}function l(I,V){C.model.beginUpdate();try{var Q=C.model.getParent(I),R=C.getIncomingTreeEdges(I),fa=d(I);0==R.length&&(R=[C.createEdge(Q,null,"",null,null,C.createCurrentEdgeStyle())],fa=V);var la=C.cloneCells([R[0],I]);C.model.setTerminal(la[0],I,!0);if(null==C.model.getTerminal(la[0],!1)){C.model.setTerminal(la[0],
+u=0:V==mxConstants.DIRECTION_NORTH?(u=0,J=-J):V==mxConstants.DIRECTION_WEST?(u=-u,J=0):V==mxConstants.DIRECTION_EAST&&(J=0);C.moveCells(ra,u,J);return C.addCells(R,fa)}finally{C.model.endUpdate()}}function m(I,V){C.model.beginUpdate();try{var Q=C.model.getParent(I),R=C.getIncomingTreeEdges(I),fa=d(I);0==R.length&&(R=[C.createEdge(Q,null,"",null,null,C.createCurrentEdgeStyle())],fa=V);var la=C.cloneCells([R[0],I]);C.model.setTerminal(la[0],I,!0);if(null==C.model.getTerminal(la[0],!1)){C.model.setTerminal(la[0],
la[1],!1);var ra=C.getCellStyle(la[1]).newEdgeStyle;if(null!=ra)try{var u=JSON.parse(ra),J;for(J in u)C.setCellStyles(J,u[J],[la[0]]),"edgeStyle"==J&&"elbowEdgeStyle"==u[J]&&C.setCellStyles("elbow",fa==mxConstants.DIRECTION_SOUTH||fa==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[la[0]])}catch(oa){}}R=C.getOutgoingTreeEdges(I);var N=Q.geometry;V=[];C.view.currentRoot==Q&&(N=new mxRectangle);for(ra=0;ra<R.length;ra++){var W=C.model.getTerminal(R[ra],!1);null!=W&&V.push(W)}var S=C.view.getBounds(V),
P=C.view.translate,Z=C.view.scale;fa==mxConstants.DIRECTION_SOUTH?(la[1].geometry.x=null==S?I.geometry.x+(I.geometry.width-la[1].geometry.width)/2:(S.x+S.width)/Z-P.x-N.x+10,la[1].geometry.y+=la[1].geometry.height-N.y+40):fa==mxConstants.DIRECTION_NORTH?(la[1].geometry.x=null==S?I.geometry.x+(I.geometry.width-la[1].geometry.width)/2:(S.x+S.width)/Z-P.x+-N.x+10,la[1].geometry.y-=la[1].geometry.height+N.y+40):(la[1].geometry.x=fa==mxConstants.DIRECTION_WEST?la[1].geometry.x-(la[1].geometry.width+N.x+
40):la[1].geometry.x+(la[1].geometry.width-N.x+40),la[1].geometry.y=null==S?I.geometry.y+(I.geometry.height-la[1].geometry.height)/2:(S.y+S.height)/Z-P.y+-N.y+10);return C.addCells(la,Q)}finally{C.model.endUpdate()}}function q(I,V,Q){I=C.getOutgoingTreeEdges(I);Q=C.view.getState(Q);var R=[];if(null!=Q&&null!=I){for(var fa=0;fa<I.length;fa++){var la=C.view.getState(C.model.getTerminal(I[fa],!1));null!=la&&(!V&&Math.min(la.x+la.width,Q.x+Q.width)>=Math.max(la.x,Q.x)||V&&Math.min(la.y+la.height,Q.y+
@@ -3883,10 +3887,10 @@ for(fa=0;fa<la.length;fa++)mxUtils.remove(la[fa],I)}}this.model.beginUpdate();tr
try{var J=fa,N=this.getCurrentCellStyle(fa);if(null!=I&&n(fa)&&"1"==mxUtils.getValue(N,"treeFolding","0")){for(var W=0;W<I.length;W++)if(n(I[W])||C.model.isEdge(I[W])&&null==C.model.getTerminal(I[W],!0)){fa=C.model.getParent(I[W]);break}if(null!=J&&fa!=J&&null!=this.view.getState(I[0])){var S=C.getIncomingTreeEdges(I[0]);if(0<S.length){var P=C.view.getState(C.model.getTerminal(S[0],!0));if(null!=P){var Z=C.view.getState(J);null!=Z&&(V=(Z.getCenterX()-P.getCenterX())/C.view.scale,Q=(Z.getCenterY()-
P.getCenterY())/C.view.scale)}}}}u=ba.apply(this,arguments);if(null!=u&&null!=I&&u.length==I.length)for(W=0;W<u.length;W++)if(this.model.isEdge(u[W]))n(J)&&0>mxUtils.indexOf(u,this.model.getTerminal(u[W],!0))&&this.model.setTerminal(u[W],J,!0);else if(n(I[W])&&(S=C.getIncomingTreeEdges(I[W]),0<S.length))if(!R)n(J)&&0>mxUtils.indexOf(I,this.model.getTerminal(S[0],!0))&&this.model.setTerminal(S[0],J,!0);else if(0==C.getIncomingTreeEdges(u[W]).length){N=J;if(null==N||N==C.model.getParent(I[W]))N=C.model.getTerminal(S[0],
!0);R=this.cloneCell(S[0]);this.addEdge(R,C.getDefaultParent(),N,u[W])}}finally{this.model.endUpdate()}return u};if(null!=F.sidebar){var Y=F.sidebar.dropAndConnect;F.sidebar.dropAndConnect=function(I,V,Q,R){var fa=C.model,la=null;fa.beginUpdate();try{if(la=Y.apply(this,arguments),n(I))for(var ra=0;ra<la.length;ra++)if(fa.isEdge(la[ra])&&null==fa.getTerminal(la[ra],!0)){fa.setTerminal(la[ra],I,!0);var u=C.getCellGeometry(la[ra]);u.points=null;null!=u.getTerminalPoint(!0)&&u.setTerminalPoint(null,!0)}}finally{fa.endUpdate()}return la}}var qa=
-{88:F.actions.get("selectChildren"),84:F.actions.get("selectSubtree"),80:F.actions.get("selectParent"),83:F.actions.get("selectSiblings")},O=F.onKeyDown;F.onKeyDown=function(I){try{if(C.isEnabled()&&!C.isEditing()&&n(C.getSelectionCell())&&1==C.getSelectionCount()){var V=null;0<C.getIncomingTreeEdges(C.getSelectionCell()).length&&(9==I.which?V=mxEvent.isShiftDown(I)?g(C.getSelectionCell()):l(C.getSelectionCell()):13==I.which&&(V=f(C.getSelectionCell(),!mxEvent.isShiftDown(I))));if(null!=V&&0<V.length)1==
+{88:F.actions.get("selectChildren"),84:F.actions.get("selectSubtree"),80:F.actions.get("selectParent"),83:F.actions.get("selectSiblings")},O=F.onKeyDown;F.onKeyDown=function(I){try{if(C.isEnabled()&&!C.isEditing()&&n(C.getSelectionCell())&&1==C.getSelectionCount()){var V=null;0<C.getIncomingTreeEdges(C.getSelectionCell()).length&&(9==I.which?V=mxEvent.isShiftDown(I)?g(C.getSelectionCell()):m(C.getSelectionCell()):13==I.which&&(V=f(C.getSelectionCell(),!mxEvent.isShiftDown(I))));if(null!=V&&0<V.length)1==
V.length&&C.model.isEdge(V[0])?C.setSelectionCell(C.model.getTerminal(V[0],!1)):C.setSelectionCell(V[V.length-1]),null!=F.hoverIcons&&F.hoverIcons.update(C.view.getState(C.getSelectionCell())),C.startEditingAtCell(C.getSelectionCell()),mxEvent.consume(I);else if(mxEvent.isAltDown(I)&&mxEvent.isShiftDown(I)){var Q=qa[I.keyCode];null!=Q&&(Q.funct(I),mxEvent.consume(I))}else 37==I.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(I)):38==I.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_NORTH),
mxEvent.consume(I)):39==I.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(I)):40==I.keyCode&&(y(C.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(I))}}catch(R){F.handleError(R)}mxEvent.isConsumed(I)||O.apply(this,arguments)};var X=C.connectVertex;C.connectVertex=function(I,V,Q,R,fa,la,ra){var u=C.getIncomingTreeEdges(I);if(n(I)){var J=d(I),N=J==mxConstants.DIRECTION_EAST||J==mxConstants.DIRECTION_WEST,W=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;
-return J==V||0==u.length?l(I,V):N==W?g(I):f(I,V!=mxConstants.DIRECTION_NORTH&&V!=mxConstants.DIRECTION_WEST)}return X.apply(this,arguments)};C.getSubtree=function(I){var V=[I];!D(I)&&!n(I)||E(I)||C.traverse(I,!0,function(Q,R){var fa=null!=R&&C.isTreeEdge(R);fa&&0>mxUtils.indexOf(V,R)&&V.push(R);(null==R||fa)&&0>mxUtils.indexOf(V,Q)&&V.push(Q);return null==R||fa});return V};var ea=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ea.apply(this,arguments);(D(this.state.cell)||
+return J==V||0==u.length?m(I,V):N==W?g(I):f(I,V!=mxConstants.DIRECTION_NORTH&&V!=mxConstants.DIRECTION_WEST)}return X.apply(this,arguments)};C.getSubtree=function(I){var V=[I];!D(I)&&!n(I)||E(I)||C.traverse(I,!0,function(Q,R){var fa=null!=R&&C.isTreeEdge(R);fa&&0>mxUtils.indexOf(V,R)&&V.push(R);(null==R||fa)&&0>mxUtils.indexOf(V,Q)&&V.push(Q);return null==R||fa});return V};var ea=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ea.apply(this,arguments);(D(this.state.cell)||
n(this.state.cell))&&!E(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(I){this.graph.graphHandler.start(this.state.cell,
mxEvent.getClientX(I),mxEvent.getClientY(I),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(I);this.graph.isMouseDown=!0;F.hoverIcons.reset();mxEvent.consume(I)})))};var ka=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){ka.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 ja=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(I){ja.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=I?"":"none")};var U=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(I,V){U.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==
@@ -3894,16 +3898,16 @@ typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.c
E.vertex=!0;var d=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);t.insert(f);t.insert(E);t.insert(d);return sb.createVertexTemplateFromCells([t],t.geometry.width,
t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var t=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");t.vertex=!0;var E=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');E.vertex=!0;var d=new mxCell("Topic",
new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');d.vertex=!0;var 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;E.insertEdge(f,!0);d.insertEdge(f,!1);
-var g=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');g.vertex=!0;var 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;E.insertEdge(l,!0);g.insertEdge(l,!1);var q=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');q.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+var g=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');g.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+m.geometry.relative=!0;m.edge=!0;E.insertEdge(m,!0);g.insertEdge(m,!1);var q=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');q.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
y.geometry.relative=!0;y.edge=!0;E.insertEdge(y,!0);q.insertEdge(y,!1);var F=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');F.vertex=!0;var C=new mxCell("",new mxGeometry(0,
-0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");C.geometry.relative=!0;C.edge=!0;E.insertEdge(C,!0);F.insertEdge(C,!1);t.insert(f);t.insert(l);t.insert(y);t.insert(C);t.insert(E);t.insert(d);t.insert(g);t.insert(q);t.insert(F);return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var t=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
+0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");C.geometry.relative=!0;C.edge=!0;E.insertEdge(C,!0);F.insertEdge(C,!1);t.insert(f);t.insert(m);t.insert(y);t.insert(C);t.insert(E);t.insert(d);t.insert(g);t.insert(q);t.insert(F);return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var t=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
t.vertex=!0;return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var t=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
t.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!0);E.geometry.relative=!0;E.edge=!0;t.insertEdge(E,!1);return sb.createVertexTemplateFromCells([t,E],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var t=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
t.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!0);E.geometry.relative=!0;E.edge=!0;t.insertEdge(E,!1);return sb.createVertexTemplateFromCells([t,E],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree orgchart organization division",function(){var t=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
t.vertex=!0;var E=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');D.setAttributeForCell(E,"treeRoot","1");E.vertex=!0;var d=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);var g=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');g.vertex=!0;var 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;E.insertEdge(l,!0);g.insertEdge(l,!1);t.insert(f);t.insert(l);t.insert(E);t.insert(d);t.insert(g);return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree root",function(){var t=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');D.setAttributeForCell(t,"treeRoot",
+d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);var g=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');g.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+m.geometry.relative=!0;m.edge=!0;E.insertEdge(m,!0);g.insertEdge(m,!1);t.insert(f);t.insert(m);t.insert(E);t.insert(d);t.insert(g);return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree root",function(){var t=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');D.setAttributeForCell(t,"treeRoot",
"1");t.vertex=!0;return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree division",function(){var t=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');t.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
E.geometry.setTerminalPoint(new mxPoint(0,0),!0);E.geometry.relative=!0;E.edge=!0;t.insertEdge(E,!1);return sb.createVertexTemplateFromCells([t,E],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree sub sections",function(){var t=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");t.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;t.insertEdge(E,!1);var d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");d.vertex=!0;var 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=
@@ -3938,8 +3942,8 @@ Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMo
(Editor.isDarkMode()?Editor.darkColor:"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};var d=document.createElement("style");d.type="text/css";d.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(d);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var f=EditorUi.prototype.updateTabContainer;
-EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");f.apply(this,arguments)};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var l=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(O,
-X){null!=X.shortcut&&900>n&&!mxClient.IS_IOS?O.firstChild.nextSibling.setAttribute("title",X.shortcut):l.apply(this,arguments)};var q=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){q.apply(this,arguments);if(null!=this.userElement){var O=this.userElement;O.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+O.style.display;O.className="geToolbarButton";O.innerHTML="";O.style.backgroundImage="url("+Editor.userImage+")";O.style.backgroundPosition="center center";
+EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");f.apply(this,arguments)};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var m=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(O,
+X){null!=X.shortcut&&900>n&&!mxClient.IS_IOS?O.firstChild.nextSibling.setAttribute("title",X.shortcut):m.apply(this,arguments)};var q=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){q.apply(this,arguments);if(null!=this.userElement){var O=this.userElement;O.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+O.style.display;O.className="geToolbarButton";O.innerHTML="";O.style.backgroundImage="url("+Editor.userImage+")";O.style.backgroundPosition="center center";
O.style.backgroundRepeat="no-repeat";O.style.backgroundSize="24px 24px";O.style.height="24px";O.style.width="24px";O.style.cssFloat="right";O.setAttribute("title",mxResources.get("changeUser"));if("none"!=O.style.display){O.style.display="inline-block";var X=this.getCurrentFile();if(null!=X&&X.isRealtimeEnabled()&&X.isRealtimeSupported()){var ea=document.createElement("img");ea.setAttribute("border","0");ea.style.position="absolute";ea.style.left="18px";ea.style.top="2px";ea.style.width="12px";ea.style.height=
"12px";var ka=X.getRealtimeError();X=X.getRealtimeState();var ja=mxResources.get("realtimeCollaboration");1==X?(ea.src=Editor.syncImage,ja+=" ("+mxResources.get("online")+")"):(ea.src=Editor.syncProblemImage,ja=null!=ka&&null!=ka.message?ja+(" ("+ka.message+")"):ja+(" ("+mxResources.get("disconnected")+")"));ea.setAttribute("title",ja);O.style.paddingRight="4px";O.appendChild(ea)}}}};var y=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){y.apply(this,arguments);if(null!=
this.shareButton){var O=this.shareButton;O.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";O.className="geToolbarButton";O.innerHTML="";O.style.backgroundImage="url("+Editor.shareImage+")";O.style.backgroundPosition="center center";O.style.backgroundRepeat="no-repeat";O.style.backgroundSize="24px 24px";O.style.height="24px";O.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop=
@@ -3972,7 +3976,7 @@ new Menu(mxUtils.bind(this,function(R,fa){ja.funct(R,fa);mxClient.IS_CHROMEAPP||
this.addMenuItems(R,["-","pageScale","-","ruler"],fa)})))}this.put("extras",new Menu(mxUtils.bind(this,function(R,fa){null!=U&&O.menus.addSubmenu("language",R,fa);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&O.mode!=App.MODE_ATLAS&&O.menus.addSubmenu("theme",R,fa);O.menus.addSubmenu("units",R,fa);R.addSeparator(fa);"1"!=urlParams.sketch&&O.menus.addMenuItems(R,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),fa);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=
urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&O.mode!=App.MODE_ATLAS&&O.menus.addMenuItems(R,["-","showStartScreen","search","scratchpad"],fa);R.addSeparator(fa);"1"==urlParams.sketch?O.menus.addMenuItems(R,"configuration - copyConnect collapseExpand tooltips -".split(" "),fa):(O.mode!=App.MODE_ATLAS&&O.menus.addMenuItem(R,"configuration",fa),!O.isOfflineApp()&&isLocalStorage&&O.mode!=App.MODE_ATLAS&&O.menus.addMenuItem(R,"plugins",fa));var la=O.getCurrentFile();null!=la&&la.isRealtimeEnabled()&&
la.isRealtimeSupported()&&this.addMenuItems(R,["-","showRemoteCursors","shareCursor","-"],fa);R.addSeparator(fa);"1"!=urlParams.sketch&&O.mode!=App.MODE_ATLAS&&this.addMenuItems(R,["fullscreen"],fa);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(R,["toggleDarkMode"],fa);R.addSeparator(fa)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(R,fa){O.menus.addMenuItems(R,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),
-fa)})));mxUtils.bind(this,function(){var R=this.get("insert"),fa=R.funct;R.funct=function(la,ra){"1"==urlParams.sketch?(O.insertTemplateEnabled&&!O.isOffline()&&O.menus.addMenuItems(la,["insertTemplate"],ra),O.menus.addMenuItems(la,["insertImage","insertLink","-"],ra),O.menus.addSubmenu("insertLayout",la,ra,mxResources.get("layout")),O.menus.addSubmenu("insertAdvanced",la,ra,mxResources.get("advanced"))):(fa.apply(this,arguments),O.menus.addSubmenu("table",la,ra))}})();var V="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
+fa)})));mxUtils.bind(this,function(){var R=this.get("insert"),fa=R.funct;R.funct=function(la,ra){"1"==urlParams.sketch?(O.insertTemplateEnabled&&!O.isOffline()&&O.menus.addMenuItems(la,["insertTemplate"],ra),O.menus.addMenuItems(la,["insertImage","insertLink","-"],ra),O.menus.addSubmenu("insertAdvanced",la,ra,mxResources.get("advanced")),O.menus.addSubmenu("layout",la,ra)):(fa.apply(this,arguments),O.menus.addSubmenu("table",la,ra))}})();var V="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
Q=function(R,fa,la,ra){R.addItem(la,null,mxUtils.bind(this,function(){var u=new CreateGraphDialog(O,la,ra);O.showDialog(u.container,620,420,!0,!1);u.init()}),fa)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(R,fa){for(var la=0;la<V.length;la++)"-"==V[la]?R.addSeparator(fa):Q(R,fa,mxResources.get(V[la])+"...",V[la])})))};EditorUi.prototype.installFormatToolbar=function(O){var X=this.editor.graph,ea=document.createElement("div");ea.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
X.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(ka,ja){0<X.getSelectionCount()?(O.appendChild(ea),ea.innerHTML="Selected: "+X.getSelectionCount()):null!=ea.parentNode&&ea.parentNode.removeChild(ea)}))};var Y=!1;EditorUi.prototype.initFormatWindow=function(){if(!Y&&null!=this.formatWindow){Y=!0;this.formatWindow.window.setClosable(!1);var O=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){O.apply(this,arguments);this.minimized?
(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(X){mxEvent.getSource(X)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var qa=EditorUi.prototype.init;EditorUi.prototype.init=
@@ -4043,7 +4047,7 @@ this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageI
this.graph.dialect==mxConstants.DIALECT_SVG){var E=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?E.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(E.style.padding="8px");E.style.boxSizing="border-box";E.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var H=this.view.graphBounds,G=this.view.translate;E.setAttribute("viewBox",H.x+G.x-this.panDx+" "+(H.y+G.y-this.panDy)+" "+(H.width+1)+
" "+(H.height+1));this.container.style.backgroundColor=E.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",H))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(H){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&
(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=e&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var d=this;this.graph.getImageFromBundles=function(H){return d.getImageUrl(H)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var f=this.xmlNode.getElementsByTagName("diagram");if(0<f.length){if(null!=this.pageId)for(var g=
-0;g<f.length;g++)if(this.pageId==f[g].getAttribute("id")){this.currentPage=g;break}var l=this.graph.getGlobalVariable;d=this;this.graph.getGlobalVariable=function(H){var G=f[d.currentPage];return"page"==H?G.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==H?d.currentPage+1:"pagecount"==H?f.length:l.apply(this,arguments)}}}this.diagrams=[];var q=null;this.selectPage=function(H){this.handlingResize||(this.currentPage=mxUtils.mod(H,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};
+0;g<f.length;g++)if(this.pageId==f[g].getAttribute("id")){this.currentPage=g;break}var m=this.graph.getGlobalVariable;d=this;this.graph.getGlobalVariable=function(H){var G=f[d.currentPage];return"page"==H?G.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==H?d.currentPage+1:"pagecount"==H?f.length:m.apply(this,arguments)}}}this.diagrams=[];var q=null;this.selectPage=function(H){this.handlingResize||(this.currentPage=mxUtils.mod(H,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};
this.selectPageById=function(H){H=this.getIndexById(H);var G=0<=H;G&&this.selectPage(H);return G};g=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=q&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),q=this.xmlNode)});var y=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(H){if(null!=H&&Graph.isPageLink(H.src)){var G=H.src,aa=G.indexOf(",");0<aa&&(aa=d.getIndexById(G.substring(aa+1)),0<=aa&&(H=d.getImageForGraphModel(Editor.parseDiagramNode(d.diagrams[aa])),
H.originalSrc=G))}y.apply(this,arguments)};var F=this.graph.getGraphBounds;this.graph.getGraphBounds=function(H){var G=F.apply(this,arguments);H=this.backgroundImage;if(null!=H){var aa=this.view.translate,da=this.view.scale;G=mxRectangle.fromRectangle(G);G.add(new mxRectangle((aa.x+H.x)*da,(aa.y+H.y)*da,H.width*da,H.height*da))}return G};this.addListener("xmlNodeChanged",g);g();urlParams.page=d.currentPage;g=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",
this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,g=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(H){return!mxEvent.isPopupTrigger(H.getEvent())&&"auto"==this.graph.container.style.overflow},this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=
@@ -4069,11 +4073,11 @@ GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),k=b.
GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var n=this.graphConfig.layerIds,D=null!=n&&0<n.length,t=!1;if(0<k.length||D||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var E=b.getChildCount(b.root);if(null==e){e=!1;t={};if(D)for(var d=0;d<n.length;d++){var f=b.getCell(n[d]);null!=f&&(e=!0,t[f.id]=!0)}else for(d=0;d<k.length;d++)f=b.getChildAt(b.root,parseInt(k[d])),null!=f&&(e=!0,t[f.id]=!0);for(d=0;e&&
d<E;d++)f=b.getChildAt(b.root,d),b.setVisible(f,t[f.id]||!1)}else for(d=0;d<E;d++)b.setVisible(b.getChildAt(b.root,d),e.isVisible(e.getChildAt(e.root,d)))}finally{b.endUpdate()}t=!0}return t};
GraphViewer.prototype.addToolbar=function(){function b(ea,ka,ja,U){var I=document.createElement("div");I.style.borderRight="1px solid #d0d0d0";I.style.padding="3px 6px 3px 6px";mxEvent.addListener(I,"click",ea);null!=ja&&I.setAttribute("title",ja);I.style.display="inline-block";ea=document.createElement("img");ea.setAttribute("border","0");ea.setAttribute("src",ka);ea.style.width="18px";null==U||U?(mxEvent.addListener(I,"mouseenter",function(){I.style.backgroundColor="#ddd"}),mxEvent.addListener(I,
-"mouseleave",function(){I.style.backgroundColor="#eee"}),mxUtils.setOpacity(ea,60),I.style.cursor="pointer"):mxUtils.setOpacity(I,30);I.appendChild(ea);k.appendChild(I);l++;return I}var e=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?e.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(e.style.marginTop=this.toolbarHeight+"px");var k=e.ownerDocument.createElement("div");k.style.position="absolute";k.style.overflow="hidden";k.style.boxSizing=
+"mouseleave",function(){I.style.backgroundColor="#eee"}),mxUtils.setOpacity(ea,60),I.style.cursor="pointer"):mxUtils.setOpacity(I,30);I.appendChild(ea);k.appendChild(I);m++;return I}var e=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?e.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(e.style.marginTop=this.toolbarHeight+"px");var k=e.ownerDocument.createElement("div");k.style.position="absolute";k.style.overflow="hidden";k.style.boxSizing=
"border-box";k.style.whiteSpace="nowrap";k.style.textAlign="left";k.style.zIndex=this.toolbarZIndex;k.style.backgroundColor="#eee";k.style.height=this.toolbarHeight+"px";this.toolbar=k;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(k.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(k,30);var n=null,D=null,t=mxUtils.bind(this,function(ea){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=D&&(window.clearTimeout(D),fadeThead2=null);n=window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setOpacity(k,0);n=null;D=window.setTimeout(mxUtils.bind(this,function(){k.style.display="none";D=null}),100)}),ea||200)}),E=mxUtils.bind(this,function(ea){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=D&&(window.clearTimeout(D),fadeThead2=null);k.style.display="";mxUtils.setOpacity(k,ea||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ea){mxEvent.isTouchEvent(ea)||(E(30),t())}));mxEvent.addListener(k,
mxClient.IS_POINTER?"pointermove":"mousemove",function(ea){mxEvent.consume(ea)});mxEvent.addListener(k,"mouseenter",mxUtils.bind(this,function(ea){E(100)}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(ea){E(100);mxEvent.consume(ea)}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(ea){mxEvent.isTouchEvent(ea)||E(30)}));var d=this.graph,f=d.getTolerance();d.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ea,ka){this.startX=ka.getGraphX();
-this.startY=ka.getGraphY();this.scrollLeft=d.container.scrollLeft;this.scrollTop=d.container.scrollTop},mouseMove:function(ea,ka){},mouseUp:function(ea,ka){mxEvent.isTouchEvent(ka.getEvent())&&Math.abs(this.scrollLeft-d.container.scrollLeft)<f&&Math.abs(this.scrollTop-d.container.scrollTop)<f&&Math.abs(this.startX-ka.getGraphX())<f&&Math.abs(this.startY-ka.getGraphY())<f&&(0<parseFloat(k.style.opacity||0)?t():E(30))}})}for(var g=this.toolbarItems,l=0,q=null,y=null,F=null,C=null,H=0;H<g.length;H++){var G=
+this.startY=ka.getGraphY();this.scrollLeft=d.container.scrollLeft;this.scrollTop=d.container.scrollTop},mouseMove:function(ea,ka){},mouseUp:function(ea,ka){mxEvent.isTouchEvent(ka.getEvent())&&Math.abs(this.scrollLeft-d.container.scrollLeft)<f&&Math.abs(this.scrollTop-d.container.scrollTop)<f&&Math.abs(this.startX-ka.getGraphX())<f&&Math.abs(this.startY-ka.getGraphY())<f&&(0<parseFloat(k.style.opacity||0)?t():E(30))}})}for(var g=this.toolbarItems,m=0,q=null,y=null,F=null,C=null,H=0;H<g.length;H++){var G=
g[H];if("pages"==G){C=e.ownerDocument.createElement("div");C.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(C,70);var aa=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");aa.style.borderRightStyle="none";aa.style.paddingLeft="0px";aa.style.paddingRight="0px";k.appendChild(C);var da=
b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");da.style.paddingLeft="0px";da.style.paddingRight="0px";G=mxUtils.bind(this,function(){C.innerHTML="";mxUtils.write(C,this.currentPage+1+" / "+this.diagrams.length);C.style.display=1<this.diagrams.length?"inline-block":"none";aa.style.display=C.style.display;da.style.display=C.style.display});this.addListener("graphChanged",G);G()}else if("zoom"==G)this.zoomEnabled&&(b(mxUtils.bind(this,
function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),b(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),b(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==G){if(this.layersEnabled){var ba=this.graph.getModel(),
@@ -4083,8 +4087,8 @@ q.style.backgroundColor="#eee";q.style.fontFamily=Editor.defaultHtmlFont;q.style
1<ba.getChildCount(ba.root)?"inline-block":"none"});Y.style.display=1<ba.getChildCount(ba.root)?"inline-block":"none"}}else if("tags"==G){if(this.tagsEnabled){var qa=b(mxUtils.bind(this,function(ea){null==y&&(y=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),y.div.getElementsByTagName("div")[0].style.position="",y.div.style.maxHeight="160px",y.div.style.maxWidth="120px",y.div.style.padding="2px",y.div.style.overflow="auto",y.div.style.height="auto",y.div.style.position="fixed",
y.div.style.fontFamily=Editor.defaultHtmlFont,y.div.style.fontSize="11px",y.div.style.backgroundColor="#eee",y.div.style.color="#000",y.div.style.border="1px solid #d0d0d0",y.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(y.div,80));if(null!=F)F.parentNode.removeChild(F),F=null;else{F=y.div;mxEvent.addListener(F,"mouseleave",function(){F.parentNode.removeChild(F);F=null});ea=qa.getBoundingClientRect();var ka=mxUtils.getDocumentScrollOrigin(document);F.style.left=ka.x+ea.left-1+"px";F.style.top=
ka.y+ea.bottom-2+"px";document.body.appendChild(F);y.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");ba.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){qa.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));qa.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==G?this.lightboxEnabled&&b(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&
-(G=this.graphConfig["toolbar-buttons"][G],null!=G&&(G.elem=b(null==G.enabled||G.enabled?G.handler:function(){},G.image,G.title,G.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*l);null!=this.graphConfig.title&&(g=e.ownerDocument.createElement("div"),g.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",g.setAttribute("title",this.graphConfig.title),
-mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),k.appendChild(g),this.filename=g);this.minToolbarWidth=34*l;var O=e.style.border,X=mxUtils.bind(this,function(){k.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,e.offsetWidth)+"px";k.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ea=e.getBoundingClientRect(),ka=mxUtils.getScrollOrigin(document.body);ka="relative"===document.body.style.position?document.body.getBoundingClientRect():
+(G=this.graphConfig["toolbar-buttons"][G],null!=G&&(G.elem=b(null==G.enabled||G.enabled?G.handler:function(){},G.image,G.title,G.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*m);null!=this.graphConfig.title&&(g=e.ownerDocument.createElement("div"),g.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",g.setAttribute("title",this.graphConfig.title),
+mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),k.appendChild(g),this.filename=g);this.minToolbarWidth=34*m;var O=e.style.border,X=mxUtils.bind(this,function(){k.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,e.offsetWidth)+"px";k.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ea=e.getBoundingClientRect(),ka=mxUtils.getScrollOrigin(document.body);ka="relative"===document.body.style.position?document.body.getBoundingClientRect():
{left:-ka.x,top:-ka.y};ea={left:ea.left-ka.left,top:ea.top-ka.top,bottom:ea.bottom-ka.top,right:ea.right-ka.left};k.style.left=ea.left+"px";"bottom"==this.graphConfig["toolbar-position"]?k.style.top=ea.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(k.style.marginTop=-this.toolbarHeight+"px",k.style.top=ea.top+1+"px"):k.style.top=ea.top+"px";"1px solid transparent"==O&&(e.style.border="1px solid #d0d0d0");document.body.appendChild(k);var ja=mxUtils.bind(this,function(){null!=k.parentNode&&
k.parentNode.removeChild(k);null!=q&&(q.parentNode.removeChild(q),q=null);e.style.border=O});mxEvent.addListener(document,"mousemove",function(U){for(U=mxEvent.getSource(U);null!=U;){if(U==e||U==k||U==q)return;U=U.parentNode}ja()});mxEvent.addListener(document.body,"mouseleave",function(U){ja()})}else k.style.top=-this.toolbarHeight+"px",e.appendChild(k)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(e,"mouseenter",X):X();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
k.parentNode&&X()})).observe(e)};GraphViewer.prototype.disableButton=function(b){var e=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=e&&(mxUtils.setOpacity(e.elem,30),mxEvent.removeListener(e.elem,"click",e.handler),mxEvent.addListener(e.elem,"mouseenter",function(){e.elem.style.backgroundColor="#eee"}))};
@@ -4096,8 +4100,8 @@ this.graphConfig.highlight&&(k.highlight=this.graphConfig.highlight.substring(1)
GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrigin(document);var b=document.createElement("div");b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeBlackImage);e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";
mxEvent.addListener(e,"click",function(){n.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=
this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var k=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var n=new EditorUi(new Editor(!0),document.createElement("div"),!0);n.editor.editBlankUrl=this.editBlankUrl;n.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=k;
-n.refresh=function(){};var D=mxUtils.bind(this,function(l){27==l.keyCode&&n.destroy()}),t=n.destroy;n.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",D);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;t.apply(this,arguments)};var E=n.editor.graph,d=E.container;d.style.overflow="hidden";this.lightboxChrome?(d.style.border="1px solid #c0c0c0",d.style.margin="40px",mxEvent.addListener(document.documentElement,
-"keydown",D)):(b.style.display="none",e.style.display="none");var f=this;E.getImageFromBundles=function(l){return f.getImageUrl(l)};var g=n.createTemporaryGraph;n.createTemporaryGraph=function(){var l=g.apply(this,arguments);l.getImageFromBundles=function(q){return f.getImageUrl(q)};return l};this.graphConfig.move&&(E.isMoveCellsEvent=function(l){return!0});mxUtils.setPrefixedStyle(d.style,"border-radius","4px");d.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
+n.refresh=function(){};var D=mxUtils.bind(this,function(m){27==m.keyCode&&n.destroy()}),t=n.destroy;n.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",D);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;t.apply(this,arguments)};var E=n.editor.graph,d=E.container;d.style.overflow="hidden";this.lightboxChrome?(d.style.border="1px solid #c0c0c0",d.style.margin="40px",mxEvent.addListener(document.documentElement,
+"keydown",D)):(b.style.display="none",e.style.display="none");var f=this;E.getImageFromBundles=function(m){return f.getImageUrl(m)};var g=n.createTemporaryGraph;n.createTemporaryGraph=function(){var m=g.apply(this,arguments);m.getImageFromBundles=function(q){return f.getImageUrl(q)};return m};this.graphConfig.move&&(E.isMoveCellsEvent=function(m){return!0});mxUtils.setPrefixedStyle(d.style,"border-radius","4px");d.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(d.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(d.style,"transition","all .25s ease-in-out"));this.addClickHandler(E,n);window.setTimeout(mxUtils.bind(this,function(){d.style.outline="none";d.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(d);document.body.appendChild(e);n.setFileData(this.xml);mxUtils.setPrefixedStyle(d.style,"transform","rotateY(0deg)");n.chromelessToolbar.style.bottom=
"60px";n.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(n.chromelessToolbar);n.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});n.lightboxFit();n.chromelessResize();this.showLayers(E,this.graph);mxEvent.addListener(b,"click",function(){n.destroy()})}),0);return n};
GraphViewer.prototype.updateTitle=function(b){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",b);null!=this.filename&&(this.filename.innerHTML="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",b))};
@@ -4109,6 +4113,6 @@ GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,k){if(null!=GraphViewe
(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},e=function(k,n){function D(){this.q=[];this.add=function(F){this.q.push(F)};var q,y;this.call=function(){q=0;for(y=this.q.length;q<y;q++)this.q[q].call()}}function t(q,y){return q.currentStyle?q.currentStyle[y]:window.getComputedStyle?window.getComputedStyle(q,null).getPropertyValue(y):q.style[y]}function E(q,y){if(!q.resizedAttached)q.resizedAttached=
new D,q.resizedAttached.add(y);else if(q.resizedAttached){q.resizedAttached.add(y);return}q.resizeSensor=document.createElement("div");q.resizeSensor.className="resize-sensor";q.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";q.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>';
q.appendChild(q.resizeSensor);"static"==t(q,"position")&&(q.style.position="relative");var F=q.resizeSensor.childNodes[0],C=F.childNodes[0],H=q.resizeSensor.childNodes[1],G=function(){C.style.width="100000px";C.style.height="100000px";F.scrollLeft=1E5;F.scrollTop=1E5;H.scrollLeft=1E5;H.scrollTop=1E5};G();var aa=!1,da=function(){q.resizedAttached&&(aa&&(q.resizedAttached.call(),aa=!1),b(da))};b(da);var ba,Y,qa,O;y=function(){if((qa=q.offsetWidth)!=ba||(O=q.offsetHeight)!=Y)aa=!0,ba=qa,Y=O;G()};var X=
-function(ea,ka,ja){ea.attachEvent?ea.attachEvent("on"+ka,ja):ea.addEventListener(ka,ja)};X(F,"scroll",y);X(H,"scroll",y)}var d=function(){GraphViewer.resizeSensorEnabled&&n()},f=Object.prototype.toString.call(k),g="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(g){f=0;for(var l=k.length;f<l;f++)E(k[f],d)}else E(k,d);this.detach=function(){if(g)for(var q=0,y=k.length;q<
+function(ea,ka,ja){ea.attachEvent?ea.attachEvent("on"+ka,ja):ea.addEventListener(ka,ja)};X(F,"scroll",y);X(H,"scroll",y)}var d=function(){GraphViewer.resizeSensorEnabled&&n()},f=Object.prototype.toString.call(k),g="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(g){f=0;for(var m=k.length;f<m;f++)E(k[f],d)}else E(k,d);this.detach=function(){if(g)for(var q=0,y=k.length;q<
y;q++)e.detach(k[q]);else e.detach(k)}};e.detach=function(k){k.resizeSensor&&(k.removeChild(k.resizeSensor),delete k.resizeSensor,delete k.resizedAttached)};window.ResizeSensor=e})();
(function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();